exports.id = 184; exports.ids = [184]; exports.modules = { /***/ 28231: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const GraphemeSplitter = __webpack_require__(30323); const ANSI_SEQUENCE = /^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/; const splitter = new GraphemeSplitter(); module.exports = (orig, at = 0, until = orig.length) => { // Because to do this we'd need to know the printable length of the string, // which would require to do two passes (or would complexify the main one) if (at < 0 || until < 0) throw new RangeError(`Negative indices aren't supported by this implementation`); const length = until - at; let output = ``; let skipped = 0; let visible = 0; while (orig.length > 0) { const lookup = orig.match(ANSI_SEQUENCE) || [orig, orig, undefined]; let graphemes = splitter.splitGraphemes(lookup[1]); const skipping = Math.min(at - skipped, graphemes.length); graphemes = graphemes.slice(skipping); const displaying = Math.min(length - visible, graphemes.length); output += graphemes.slice(0, displaying).join(``); skipped += skipping; visible += displaying; if (typeof lookup[2] !== `undefined`) output += lookup[2]; orig = orig.slice(lookup[0].length); } return output; }; /***/ }), /***/ 54916: /***/ ((__unused_webpack_module, exports) => { exports.file = `# Write glob rules for ignored files. # Check syntax on https://deepcode.freshdesk.com/support/solutions/articles/60000531055-how-can-i-ignore-files-or-directories- # Check examples on https://github.com/github/gitignore `; /***/ }), /***/ 78105: /***/ ((__unused_webpack_module, exports) => { exports.file = `# Write glob rules for ignored files. # Check syntax on https://deepcode.freshdesk.com/support/solutions/articles/60000531055-how-can-i-ignore-files-or-directories- # Check examples on https://github.com/github/gitignore # Hidden directories .*/ # Julia deps/downloads/ deps/usr/ docs/build/ docs/site/ # CakePHP /vendor/* /tmp/cache/models/* !/tmp/cache/models/empty /tmp/cache/persistent/* !/tmp/cache/persistent/empty /tmp/cache/views/* !/tmp/cache/views/empty /tmp/sessions/* !/tmp/sessions/empty /tmp/tests/* !/tmp/tests/empty /logs/* !/logs/empty /app/tmp/* /vendors/* # KiCad *~ _autosave-* fp-info-cache # Dart build/ doc/api/ # PlayFramework bin/ /db /lib/ /logs/ /modules /project/project /project/target /target tmp/ test-result /dist/ # Zephir ext/build/ ext/modules/ ext/Makefile* ext/config* ext/autom4te* ext/install-sh ext/missing ext/mkinstalldirs ext/libtool # RhodesRhomobile rholog-* sim-* bin/libs bin/RhoBundle bin/tmp bin/target # AppEngine appengine-generated/ # Textpattern rpc/ sites/site*/admin/ sites/site*/private/ sites/site*/public/admin/ sites/site*/public/setup/ sites/site*/public/theme/ textpattern/ # ExpressionEngine images/avatars/ images/captchas/ images/smileys/ images/member_photos/ images/signature_attachments/ images/pm_attachments/ sized/ thumbs/ _thumbs/ */expressionengine/cache/* # CMake CMakeFiles CMakeScripts Testing Makefile _deps # Qt Makefile* *build-* # Yeoman node_modules/ bower_components/ build/ dist/ # ExtJs build/ ext/ # R /*.Rcheck/ *_cache/ /cache/ docs/ po/*~ # Python __pycache__/ build/ develop-eggs/ dist/ downloads/ eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ MANIFEST htmlcov/ cover/ instance/ docs/_build/ target/ profile_default/ __pypackages__/ celerybeat-schedule env/ venv/ ENV/ env.bak/ venv.bak/ /site cython_debug/ # Magento /media/* !/media/customer /media/customer/* !/media/dhl /media/dhl/* !/media/downloadable /media/downloadable/* !/media/xmlconnect /media/xmlconnect/* !/media/xmlconnect/custom /media/xmlconnect/custom/* !/media/xmlconnect/original /media/xmlconnect/original/* !/media/xmlconnect/system /media/xmlconnect/system/* /var/* !/var/package /var/package/* # CodeIgniter */config/development */cache/* application/logs/* /vendor/ # Haskell dist dist-* cabal-dev # ArchLinuxPackages pkg/ # Elm elm-stuff repl-temp-* # Lithium libraries/* resources/tmp/* # Erlang rel/example_project deps _build/ _checkouts/ # ForceDotCom Referenced Packages # Plone bin/ build/ develop-eggs/ downloads/ eggs/ fake-eggs/ parts/ dist/ var/ # AppceleratorTitanium build/ # ChefCookbook /cookbooks bin/* # Objective-C xcuserdata/ build/ DerivedData/ Carthage/Build/ fastlane/test_output iOSInjectionProject/ # Opa _build _tracks opa-debug-js # Smalltalk /package-cache /play-cache /play-stash /github-cache # SeamGen /bootstrap/data /bootstrap/tmp /classes/ /dist/ /exploded-archives/ /test-build/ /test-output/ /test-report/ /target/ # Xilinx *_synth_* */*/bd/*/hdl */*/*/bd/*/hdl */*/bd/*/ip/*/*/ */*/*/bd/*/ip/*/*/ hw_handoff ipshared # Strapi Icon *~ $RECYCLE.BIN/ *# nbproject lib-cov pids logs results build node_modules testApp coverage cypress/screenshots cypress/videos dist packages/strapi-generate-new/files/public/ # Snap parts/ prime/ stage/ # Logtalk lgt_tmp/ logtalk_tester_logs/ logtalk_doclet_logs/ # SPFx logs node_modules dist lib solution temp coverage bin obj # Vue docs/_book test/ # NWjs locales/ pnacl/ # Cordova /platforms # Bazel /bazel-* # AltiumDesigner History __Previews Project\ Logs* Project\ Outputs* # ThinkPHP /Application/Runtime/ # Jigsaw build_* # Bitrix /bitrix/* !/bitrix/templates !/bitrix/components /bitrix/components/bitrix !/bitrix/gadgets /bitrix/gadgets/bitrix !/bitrix/php_interface/ /upload/ # CodeSniffer /wpcs/* # Pimcore /pimcore /website/var/assets/* /website/var/backup/* /website/var/cache/* /website/var/classes/Object* !/website/var/classes/objectbricks /website/var/config/Geo* /website/var/config/object/* /website/var/config/portal/* /website/var/config/sqlreport/* /website/var/email/* /website/var/recyclebin/* /website/var/search/* /website/var/system/* /website/var/tmp/* /website/var/versions/asset/* /website/var/versions/document/* /website/var/versions/object/* /website/var/user-image/* # Magento1 /media/* !/media/customer /media/customer/* !/media/dhl /media/dhl/* !/media/downloadable /media/downloadable/* !/media/xmlconnect /media/xmlconnect/* !/media/xmlconnect/custom /media/xmlconnect/custom/* !/media/xmlconnect/original /media/xmlconnect/original/* !/media/xmlconnect/system /media/xmlconnect/system/* /var/* !/var/package /var/package/* # Magento2 /sitemap /pub/sitemap /app/config_sandbox /app/code/Magento/TestModule* /pub/media/attribute/* /pub/media/analytics/* /pub/media/catalog/* /pub/media/customer/* /pub/media/downloadable/* /pub/media/favicon/* /pub/media/import/* /pub/media/logo/* /pub/media/theme/* /pub/media/theme_customization/* /pub/media/wysiwyg/* /pub/media/tmp/* /pub/media/captcha/* /pub/static/* /var/* /vendor/* /generated/* # Drupal7 files/ sites/*/files sites/*/private sites/*/translations /includes /misc /modules /profiles /scripts /themes # InforCMS [Mm]odel/[Dd]eployment !Model/Portal/*/SupportFiles/[Bb]in/ !Model/Portal/PortalTemplates/*/SupportFiles/[Bb]in # Kentico !CMS/CMSAdminControls/*/ !CMS/CMSModules/System/*/ !CMS/App_Data/CIRepository/** CMS/App_Data/AzureCache CMS/App_Data/AzureTemp CMS/App_Data/CMSTemp CMS/App_Data/Persistent CMS/CMSSiteUtils/Export CMS/CMSSiteUtils/Import CMS/App_Data/CMSModules/SmartSearch/** !CMS/App_Data/CMSModules/SmartSearch/*/ !CMS/App_Data/CMSModules/SmartSearch/_StopWords/** !CMS/App_Data/CMSModules/SmartSearch/_Synonyms/** CMS/App_Data/DancingGoat CMS/App_Data/Templates/CommunitySite CMS/App_Data/Templates/CorporateSite CMS/App_Data/Templates/DancingGoat CMS/App_Data/Templates/EcommerceSite CMS/App_Data/Templates/IntranetPortal CMS/App_Data/Templates/PersonalSite CMS/App_Themes/CommunitySite CMS/App_Themes/CorporateSite CMS/App_Themes/EcommerceSite CMS/App_Themes/IntranetPortal* CMS/App_Themes/PersonalSite CMS/CMSTemplates/CorporateSite CMS/CommunitySite CMS/CorporateSite CMS/DancingGoat CMS/EcommerceSite CMS/IntranetPortal CMS/PersonalSite # ROS2 install/ log/ build/ qtcreator-* *~ COLCON_IGNORE AMENT_IGNORE # Splunk local # Racket compiled/ # JupyterNotebooks profile_default/ # Nikola cache/ output/ # Red quick-test/runnable/ system/tests/source/units/auto-tests/ tests/source/units/auto-tests/ # AtmelStudio [Dd]ebug/ [Rr]elease/ # IAR_EWARM EWARM/**/Obj EWARM/**/List EWARM/**/Exe EWARM/settings # esp-idf build/ sdkconfig # Phoenix /tmp /node_modules /assets/node_modules /priv/static/ /installer/_build /installer/tmp /installer/doc /installer/deps # JBoss4 /server/all/data /server/all/log /server/all/tmp /server/all/work /server/default/data /server/default/log /server/default/tmp /server/default/work /server/minimal/data /server/minimal/log /server/minimal/tmp /server/minimal/work # JBoss6 /server/all/data /server/all/log /server/all/tmp /server/all/work /server/default/data /server/default/log /server/default/tmp /server/default/work /server/minimal/data /server/minimal/log /server/minimal/tmp /server/minimal/work /server/jbossweb-standalone/data /server/jbossweb-standalone/log /server/jbossweb-standalone/tmp /server/jbossweb-standalone/work /server/standard/data /server/standard/log /server/standard/tmp /server/standard/work # Hugo /public/ /resources/_gen/ # Puppet pkg/* spec/fixtures/* coverage/* vendor/* # Kotlin hs_err_pid* # Composer /vendor/ # Android bin/ gen/ out/ build/ proguard/ captures/ freeline/ fastlane/screenshots fastlane/test_output lint/intermediates/ lint/generated/ lint/outputs/ lint/tmp/ # Nim nimcache/ nimblecache/ htmldocs/ # Actionscript bin-debug/ bin-release/ [Oo]bj/ [Bb]in/ # Maven target/ # Agda MAlonzo/** # Unity /[Ll]ibrary/ /[Tt]emp/ /[Oo]bj/ /[Bb]uild/ /[Bb]uilds/ /[Ll]ogs/ /[Uu]ser[Ss]ettings/ /[Mm]emoryCaptures/ /[Aa]ssets/Plugins/Editor/JetBrains* ExportedObj/ /[Aa]ssets/[Ss]treamingAssets/aa/* # GWT war/gwt_bree/ gwt-unitCache/ war/WEB-INF/deploy/ war/WEB-INF/classes/ www-test/ # VirtualEnv [Bb]in [Ii]nclude [Ll]ib [Ll]ib64 [Ll]ocal [Ss]cripts # SBT dist/* target/ lib_managed/ project/boot/ project/plugins/project/ # PSoCCreator Debug/ Release/ Export/ */codegentemp */Generated_Source # TextMate tmtags # MonoDevelop test-results/ # SublimeText Package Control.cache/ Package Control.ca-certs/ # Dreamweaver _notes _compareTemp configs/ # NetBeans **/nbproject/private/ build/ nbbuild/ dist/ nbdist/ # Windows $RECYCLE.BIN/ # MATLAB helpsearch*/ slprj/ sccprj/ codegen/ octave-workspace # Octave helpsearch*/ slprj/ sccprj/ codegen/ octave-workspace # FlexBuilder bin/ bin-debug/ bin-release/ # Xcode xcuserdata/ build/ DerivedData/ # Lazarus backup/ lib/ *.app/ # CVS /CVS/* **/CVS/* # Eclipse bin/ tmp/ # Momentics x86/ arm/ arm-p/ # Linux *~ # Virtuoso lvsRunDir/* drcRunDir/* # Emacs *~ \#*\# auto-save-list tramp *_archive /eshell/history /eshell/lastdir /elpa/ /auto/ dist/ /server/ # EiffelStudio EIFGENs # macOS Icon Network Trash Folder Temporary Items # XilinxISE iseconfig/ xlnx_auto_0_xdb/ xst/ _ngo/ _xmsgs/ # CodeKit /min # SynopsysVCS simv simv.daidir/ simv.db.dir/ simv.vdb/ urgReport/ DVEfiles/ # Tags TAGS !TAGS/ tags !tags/ GTAGS GRTAGS GPATH GSYMS # ModelSim [_@]* wlf* cov*/ transcript* # JetBrains cmake-build-*/ out/ # WebMethods **/IntegrationServer/datastore/ **/IntegrationServer/db/ **/IntegrationServer/DocumentStore/ **/IntegrationServer/lib/ **/IntegrationServer/logs/ **/IntegrationServer/replicate/ **/IntegrationServer/sdk/ **/IntegrationServer/support/ **/IntegrationServer/update/ **/IntegrationServer/userFtpRoot/ **/IntegrationServer/web/ **/IntegrationServer/WmRepository4/ **/IntegrationServer/XAStore/ **/IntegrationServer/packages/Wm*/ # Vim *~ tags # Calabash rerun/ reports/ screenshots/ test-servers/ vendor # JDeveloper temp/ classes/ deploy/ javadoc/ # Drupal /sites/*/files /sites/*/public /sites/*/private /sites/*/files-public /sites/*/files-private /sites/*/translations /sites/*/tmp /sites/*/cache /sites/simpletest /core /vendor # UnrealEngine Binaries/* Plugins/*/Binaries/* Build/* !Build/*/ Build/*/** Saved/* Intermediate/* Plugins/*/Intermediate/* DerivedDataCache/* # Symfony /app/cache/* /app/logs/* /app/spool/* /var/cache/* /var/logs/* /var/sessions/* /var/log/* /bin/* !bin/console !bin/symfony_requirements /vendor/ /web/bundles/ /web/uploads/ /build/ **/Entity/*~ # JBoss jboss/server/all/tmp/**/* jboss/server/all/data/**/* jboss/server/all/work/**/* jboss/server/default/tmp/**/* jboss/server/default/data/**/* jboss/server/default/work/**/* jboss/server/minimal/tmp/**/* jboss/server/minimal/data/**/* jboss/server/minimal/work/**/* # SugarCRM /cache/* /custom/history/ /custom/modulebuilder/ /custom/working/ /custom/modules/*/Ext/ /custom/application/Ext/ /upload/* /upload_backup/ # Leiningen /lib/ /classes/ /target/ /checkouts/ # OpenCart download/ image/data/ image/cache/ system/cache/ system/logs/ system/storage/ vqmod/logs/* vqmod/vqcache/* # VVVV bin/ # Gradle **/build/ # FuelPHP /fuel/vendor /docs/ /fuel/app/logs/*/*/* /fuel/app/cache/*/* # Autotools /ar-lib /mdate-sh /py-compile /test-driver /ylwrap /compile /configure /depcomp /install-sh /missing /stamp-h1 Makefile # Delphi __history/ __recovery/ modules/ # GitBook node_modules _book # Prestashop /cache/* !/cache/push/activity !/cache/push/trends /download/* /img/* !/img/jquery-ui !/img/scenes /upload/* /vendor/* /docs/phpdoc-sf/ /admin-dev/autoupgrade/* /admin-dev/backups/* /admin-dev/import/* /admin-dev/export/* themes/*/cache/* config/xml/* config/themes/* modules/* override/* themes/*/ !themes/classic !themes/_core !themes/_libraries bower_components/ node_modules/ php-cs-fixer translations/* mails/* !mails/themes/ !mails/_partials/ themes/default-bootstrap/lang/* themes/default-bootstrap/mails/* !themes/default-bootstrap/mails/en/ themes/default-bootstrap/modules/*/mails/* !themes/default-bootstrap/modules/*/mails/en /bin/ /app/Resources/translations/* !/app/Resources/translations/default /build/ /var/* !/var/cache /var/cache/* !/var/logs /var/logs/* !/var/sessions /var/sessions/* /vendor/ /web/bundles/ # Xojo Builds* Debug*/Debug*\ Libs # WordPress !wp-content/ wp-content/* !wp-content/mu-plugins/ !wp-content/plugins/ !wp-content/themes/ wp-content/themes/twenty*/ node_modules/ # ROS devel/ logs/ build/ bin/ lib/ msg_gen/ srv_gen/ build_isolated/ devel_isolated/ /cfg/cpp/ qtcreator-* /planning/cfg /planning/docs *~ CATKIN_IGNORE # Scala hs_err_pid* # VisualStudio [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ Generated\ Files/ [Tt]est[Rr]esult*/ [Dd]ebugPS/ [Rr]eleasePS/ BenchmarkDotNet.Artifacts/ artifacts/ _Chutzpah* ipch/ $tf/ _ReSharper*/ _TeamCity* _NCrunch_* nCrunchTemp_* AutoTest.Net/ [Ee]xpress/ DocProject/buildhelp/ DocProject/Help/Html2 DocProject/Help/html publish/ PublishScripts/ **/[Pp]ackages/* !**/[Pp]ackages/build/ csx/ ecf/ rcf/ AppPackages/ BundleArtifacts/ !?*.[Cc]ache/ ClientBin/ ~$* *~ Generated_Code/ _UpgradeReport_Files/ Backup*/ ServiceFabricBackup/ FakesAssemblies/ node_modules/ **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.Server/GeneratedArtifacts _Pvt_Extensions paket-files/ __pycache__/ OpenCover/ ASALocalRun/ healthchecksdb MigrationBackup/ # Qooxdoo cache cache-downloads inspector api # Concrete5 error_log files/cache/* files/tmp/* /application/files/* /updates/* # Grails /web-app/WEB-INF/classes /test/reports /logs /plugins /web-app/plugins /target # Stella obj/ # Processing applet out # Rails /public/system /coverage/ /spec/tmp /log/* /tmp/* /vendor/bundle /vendor/assets/bower_components node_modules/ /public/packs /public/packs-test /public/assets /storage/* /public/uploads # PureScript bower_components node_modules output # Laravel /vendor/ node_modules/ app/storage/ public/storage public/hot public_html/storage public_html/hot # TwinCAT3 _Boot/ _CompileInfo/ _Libraries/ # Elixir /_build /cover /deps /doc # TurboGears2 data/* dist build # Godot data_*/ # Java hs_err_pid* # Swift xcuserdata/ build/ DerivedData/ Carthage/Build/ Dependencies/ fastlane/test_output iOSInjectionProject/ # Lilypond *~ # Joomla /administrator/cache/* /administrator/components/com_actionlogs/* /administrator/components/com_admin/* /administrator/components/com_ajax/* /administrator/components/com_associations/* /administrator/components/com_banners/* /administrator/components/com_cache/* /administrator/components/com_categories/* /administrator/components/com_checkin/* /administrator/components/com_config/* /administrator/components/com_contact/* /administrator/components/com_content/* /administrator/components/com_contenthistory/* /administrator/components/com_cpanel/* /administrator/components/com_fields/* /administrator/components/com_finder/* /administrator/components/com_installer/* /administrator/components/com_joomlaupdate/* /administrator/components/com_languages/* /administrator/components/com_login/* /administrator/components/com_media/* /administrator/components/com_menus/* /administrator/components/com_messages/* /administrator/components/com_modules/* /administrator/components/com_newsfeeds/* /administrator/components/com_plugins/* /administrator/components/com_postinstall/* /administrator/components/com_privacy/* /administrator/components/com_redirect/* /administrator/components/com_search/* /administrator/components/com_tags/* /administrator/components/com_templates/* /administrator/components/com_users/* /administrator/help/* /administrator/includes/* /administrator/language/overrides/* /administrator/logs/* /administrator/modules/mod_custom/* /administrator/modules/mod_feed/* /administrator/modules/mod_latest/* /administrator/modules/mod_latestactions/* /administrator/modules/mod_logged/* /administrator/modules/mod_login/* /administrator/modules/mod_menu/* /administrator/modules/mod_multilangstatus/* /administrator/modules/mod_online/* /administrator/modules/mod_popular/* /administrator/modules/mod_privacy_dashboard/* /administrator/modules/mod_quickicon/* /administrator/modules/mod_sampledata/* /administrator/modules/mod_stats_admin/* /administrator/modules/mod_status/* /administrator/modules/mod_submenu/* /administrator/modules/mod_title/* /administrator/modules/mod_toolbar/* /administrator/modules/mod_unread/* /administrator/modules/mod_version/* /administrator/templates/hathor/* /administrator/templates/isis/* /administrator/templates/system/* /bin/* /cache/* /cli/* /components/com_ajax/* /components/com_banners/* /components/com_config/* /components/com_contact/* /components/com_content/* /components/com_contenthistory/* /components/com_fields/* /components/com_finder/* /components/com_mailto/* /components/com_media/* /components/com_menus/* /components/com_modules/* /components/com_newsfeeds/* /components/com_privacy/* /components/com_search/* /components/com_tags/* /components/com_users/* /components/com_wrapper/* /images/banners/* /images/headers/* /images/sampledata/* /images/joomla* /includes/* /installation/* /language/overrides/* /layouts/joomla/* /layouts/libraries/* /layouts/plugins/* /libraries/cms/* /libraries/fof/* /libraries/idna_convert/* /libraries/joomla/* /libraries/legacy/* /libraries/php-encryption/* /libraries/phpass/* /libraries/phpmailer/* /libraries/phputf8/* /libraries/simplepie/* /libraries/vendor/* /media/cms/* /media/com_associations/* /media/com_contact/* /media/com_content/* /media/com_contenthistory/* /media/com_fields/* /media/com_finder/* /media/com_joomlaupdate/* /media/com_menus/* /media/com_modules/* /media/com_wrapper/* /media/contacts/* /media/editors/* /media/jui/* /media/mailto/* /media/media/* /media/mod_languages/* /media/mod_sampledata/* /media/overrider/* /media/plg_captcha_recaptcha/* /media/plg_captcha_recaptcha_invisible/* /media/plg_quickicon_extensionupdate/* /media/plg_quickicon_joomlaupdate/* /media/plg_quickicon_privacycheck/* /media/plg_system_highlight/* /media/plg_system_stats/* /media/plg_twofactorauth_totp/* /media/system/* /modules/mod_articles_archive/* /modules/mod_articles_categories/* /modules/mod_articles_category/* /modules/mod_articles_latest/* /modules/mod_articles_news/* /modules/mod_articles_popular/* /modules/mod_banners/* /modules/mod_breadcrumbs/* /modules/mod_custom/* /modules/mod_feed/* /modules/mod_finder/* /modules/mod_footer/* /modules/mod_languages/* /modules/mod_login/* /modules/mod_menu/* /modules/mod_random_image/* /modules/mod_related_items/* /modules/mod_search/* /modules/mod_stats/* /modules/mod_syndicate/* /modules/mod_tags_popular/* /modules/mod_tags_similar/* /modules/mod_users_latest/* /modules/mod_whosonline/* /modules/mod_wrapper/* /plugins/actionlog/joomla/* /plugins/authentication/cookie/* /plugins/authentication/example/* /plugins/authentication/gmail/* /plugins/authentication/joomla/* /plugins/authentication/ldap/* /plugins/captcha/recaptcha/* /plugins/captcha/recaptcha_invisible/* /plugins/content/confirmconsent/* /plugins/content/contact/* /plugins/content/emailcloak/* /plugins/content/example/* /plugins/content/fields/* /plugins/content/finder/* /plugins/content/geshi/* /plugins/content/joomla/* /plugins/content/loadmodule/* /plugins/content/pagebreak/* /plugins/content/pagenavigation/* /plugins/content/vote/* /plugins/editors/codemirror/* /plugins/editors/none/* /plugins/editors/tinymce/* /plugins/editors-xtd/article/* /plugins/editors-xtd/contact/* /plugins/editors-xtd/fields/* /plugins/editors-xtd/image/* /plugins/editors-xtd/menu/* /plugins/editors-xtd/module/* /plugins/editors-xtd/pagebreak/* /plugins/editors-xtd/readmore/* /plugins/extension/example/* /plugins/extension/joomla/* /plugins/fields/calendar/* /plugins/fields/checkboxes/* /plugins/fields/color/* /plugins/fields/editor/* /plugins/fields/imagelist/* /plugins/fields/integer/* /plugins/fields/list/* /plugins/fields/media/* /plugins/fields/radio/* /plugins/fields/repeatable/* /plugins/fields/sql/* /plugins/fields/text/* /plugins/fields/textarea/* /plugins/fields/url/* /plugins/fields/user/* /plugins/fields/usergrouplist/* /plugins/finder/categories/* /plugins/finder/contacts/* /plugins/finder/content/* /plugins/finder/newsfeeds/* /plugins/finder/tags/* /plugins/installer/folderinstaller/* /plugins/installer/packageinstaller/* /plugins/installer/urlinstaller/* /plugins/privacy/actionlogs/* /plugins/privacy/consents/* /plugins/privacy/contact/* /plugins/privacy/content/* /plugins/privacy/message/* /plugins/privacy/user/* /plugins/quickicon/extensionupdate/* /plugins/quickicon/joomlaupdate/* /plugins/quickicon/phpversioncheck/* /plugins/quickicon/privacycheck/* /plugins/sampledata/blog/* /plugins/search/categories/* /plugins/search/contacts/* /plugins/search/content/* /plugins/search/newsfeeds/* /plugins/search/tags/* /plugins/search/weblinks/* /plugins/system/actionlogs/* /plugins/system/cache/* /plugins/system/debug/* /plugins/system/fields/* /plugins/system/highlight/* /plugins/system/languagecode/* /plugins/system/languagefilter/* /plugins/system/log/* /plugins/system/logout/* /plugins/system/logrotation/* /plugins/system/p3p/* /plugins/system/privacyconsent/* /plugins/system/redirect/* /plugins/system/remember/* /plugins/system/sef/* /plugins/system/sessiongc/* /plugins/system/stats/* /plugins/system/updatenotification/* /plugins/twofactorauth/totp/* /plugins/twofactorauth/yubikey/* /plugins/user/contactcreator/* /plugins/user/example/* /plugins/user/joomla/* /plugins/user/profile/* /plugins/user/terms/* /templates/beez3/* /templates/protostar/* /templates/system/* /tmp/* # SymphonyCMS manifest/cache/ manifest/logs/ manifest/tmp/ symphony/ workspace/uploads/ # ZendFramework vendor/ data/logs/ data/cache/ data/sessions/ data/tmp/ temp/ data/DoctrineORMModule/Proxy/ data/DoctrineORMModule/cache/ demos/ extras/documentation # C *.dSYM/ # Node logs pids lib-cov coverage bower_components build/Release node_modules/ jspm_packages/ web_modules/ out dist # LemonStand /config/* /controllers/* /init/* /logs/* /phproad/* /temp/* /uploaded/* /installer_files/* /modules/backend/* /modules/blog/* /modules/cms/* /modules/core/* /modules/session/* /modules/shop/* /modules/system/* /modules/users/* # Waf waf-*-*/ waf3-*-*/ # TeX latex.out/ *-gnuplottex-* *-tikzDictionary _minted* sympy-plots-for-*.tex/ pythontex-files-*/ TSWLatexianTemp* *~[0-9]* # Rust debug/ target/ # Yii assets/* protected/runtime/* themes/classic/views/ # Mercury Mercury/ # Scrivener */QuickLook/ # Clojure /lib/ /classes/ /target/ /checkouts/ # Phalcon /cache/ /config/development/ # Typo3 /fileadmin/user_upload/ /fileadmin/_temp_/ /fileadmin/_processed_/ /uploads/ /typo3conf/temp_CACHED* /typo3conf/ENABLE_INSTALL_TOOL /FIRST_INSTALL /typo3 /Packages /typo3temp/ # JENKINS_HOME !/jobs jobs/** !jobs/**/ builds indexing jobs/**/*workspace # MetaProgrammingSystem classes_gen source_gen test_gen # CraftCMS /craft/storage/* !/craft/storage/rebrand # CFWheels plugins/**/* files db/sql javascripts/bundles stylesheets/bundles # OCaml _build/ _opam/ # Ruby /coverage/ /InstalledFiles /pkg/ /spec/reports/ /test/tmp/ /test/version_tmp/ /tmp/ build/ build-iPhoneOS/ build-iPhoneSimulator/ /_yardoc/ /doc/ /rdoc/ /vendor/bundle /lib/bundler/man/ # Perl !Build/ cover_db/ _build/ Build inc/ /blib/ /_eumm/ /Makefile /pm_to_blib # Elisp *~ # Jekyll _site/ # D docs/ # Packer packer_cache/ # Umbraco **/App_Data/Logs/ **/App_Data/[Pp]review/ **/App_Data/TEMP/ **/App_Data/NuGetBackup/ !**/App_Data/[Pp]ackages/* !**/[Uu]mbraco/[Dd]eveloper/[Pp]ackages/* !**/[Uu]mbraco/[Vv]iews/[Pp]ackages/* **/App_Data/cache/ # Kohana application/cache/* application/logs/* # Nanoc output/ tmp/nanoc/ `; /***/ }), /***/ 55086: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const { file: DefaultDCIgnore } = __webpack_require__(78105); const { file: CustomDCIgnore } = __webpack_require__(54916); module.exports = { DefaultDCIgnore, CustomDCIgnore, }; /***/ }), /***/ 98925: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const f = __webpack_require__(98633) const DateTime = global.Date class Date extends DateTime { constructor (value) { super(value) this.isDate = true } toISOString () { return `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}` } } module.exports = value => { const date = new Date(value) /* istanbul ignore if */ if (isNaN(date)) { throw new TypeError('Invalid Datetime') } else { return date } } /***/ }), /***/ 58904: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const f = __webpack_require__(98633) class FloatingDateTime extends Date { constructor (value) { super(value + 'Z') this.isFloating = true } toISOString () { const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}` const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}` return `${date}T${time}` } } module.exports = value => { const date = new FloatingDateTime(value) /* istanbul ignore if */ if (isNaN(date)) { throw new TypeError('Invalid Datetime') } else { return date } } /***/ }), /***/ 76114: /***/ ((module) => { "use strict"; module.exports = value => { const date = new Date(value) /* istanbul ignore if */ if (isNaN(date)) { throw new TypeError('Invalid Datetime') } else { return date } } /***/ }), /***/ 99439: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const f = __webpack_require__(98633) class Time extends Date { constructor (value) { super(`0000-01-01T${value}Z`) this.isTime = true } toISOString () { return `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}` } } module.exports = value => { const date = new Time(value) /* istanbul ignore if */ if (isNaN(date)) { throw new TypeError('Invalid Datetime') } else { return date } } /***/ }), /***/ 98633: /***/ ((module) => { "use strict"; module.exports = (d, num) => { num = String(num) while (num.length < d) num = '0' + num return num } /***/ }), /***/ 98818: /***/ ((module) => { "use strict"; const ParserEND = 0x110000 class ParserError extends Error { /* istanbul ignore next */ constructor (msg, filename, linenumber) { super('[ParserError] ' + msg, filename, linenumber) this.name = 'ParserError' this.code = 'ParserError' if (Error.captureStackTrace) Error.captureStackTrace(this, ParserError) } } class State { constructor (parser) { this.parser = parser this.buf = '' this.returned = null this.result = null this.resultTable = null this.resultArr = null } } class Parser { constructor () { this.pos = 0 this.col = 0 this.line = 0 this.obj = {} this.ctx = this.obj this.stack = [] this._buf = '' this.char = null this.ii = 0 this.state = new State(this.parseStart) } parse (str) { /* istanbul ignore next */ if (str.length === 0 || str.length == null) return this._buf = String(str) this.ii = -1 this.char = -1 let getNext while (getNext === false || this.nextChar()) { getNext = this.runOne() } this._buf = null } nextChar () { if (this.char === 0x0A) { ++this.line this.col = -1 } ++this.ii this.char = this._buf.codePointAt(this.ii) ++this.pos ++this.col return this.haveBuffer() } haveBuffer () { return this.ii < this._buf.length } runOne () { return this.state.parser.call(this, this.state.returned) } finish () { this.char = ParserEND let last do { last = this.state.parser this.runOne() } while (this.state.parser !== last) this.ctx = null this.state = null this._buf = null return this.obj } next (fn) { /* istanbul ignore next */ if (typeof fn !== 'function') throw new ParserError('Tried to set state to non-existent state: ' + JSON.stringify(fn)) this.state.parser = fn } goto (fn) { this.next(fn) return this.runOne() } call (fn, returnWith) { if (returnWith) this.next(returnWith) this.stack.push(this.state) this.state = new State(fn) } callNow (fn, returnWith) { this.call(fn, returnWith) return this.runOne() } return (value) { /* istanbul ignore next */ if (this.stack.length === 0) throw this.error(new ParserError('Stack underflow')) if (value === undefined) value = this.state.buf this.state = this.stack.pop() this.state.returned = value } returnNow (value) { this.return(value) return this.runOne() } consume () { /* istanbul ignore next */ if (this.char === ParserEND) throw this.error(new ParserError('Unexpected end-of-buffer')) this.state.buf += this._buf[this.ii] } error (err) { err.line = this.line err.col = this.col err.pos = this.pos return err } /* istanbul ignore next */ parseStart () { throw new ParserError('Must declare a parseStart method') } } Parser.END = ParserEND Parser.Error = ParserError module.exports = Parser /***/ }), /***/ 8676: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable no-new-wrappers, no-eval, camelcase, operator-linebreak */ module.exports = makeParserClass(__webpack_require__(98818)) module.exports.makeParserClass = makeParserClass class TomlError extends Error { constructor (msg) { super(msg) this.name = 'TomlError' /* istanbul ignore next */ if (Error.captureStackTrace) Error.captureStackTrace(this, TomlError) this.fromTOML = true this.wrapped = null } } TomlError.wrap = err => { const terr = new TomlError(err.message) terr.code = err.code terr.wrapped = err return terr } module.exports.TomlError = TomlError const createDateTime = __webpack_require__(76114) const createDateTimeFloat = __webpack_require__(58904) const createDate = __webpack_require__(98925) const createTime = __webpack_require__(99439) const CTRL_I = 0x09 const CTRL_J = 0x0A const CTRL_M = 0x0D const CTRL_CHAR_BOUNDARY = 0x1F // the last non-character in the latin1 region of unicode, except DEL const CHAR_SP = 0x20 const CHAR_QUOT = 0x22 const CHAR_NUM = 0x23 const CHAR_APOS = 0x27 const CHAR_PLUS = 0x2B const CHAR_COMMA = 0x2C const CHAR_HYPHEN = 0x2D const CHAR_PERIOD = 0x2E const CHAR_0 = 0x30 const CHAR_1 = 0x31 const CHAR_7 = 0x37 const CHAR_9 = 0x39 const CHAR_COLON = 0x3A const CHAR_EQUALS = 0x3D const CHAR_A = 0x41 const CHAR_E = 0x45 const CHAR_F = 0x46 const CHAR_T = 0x54 const CHAR_U = 0x55 const CHAR_Z = 0x5A const CHAR_LOWBAR = 0x5F const CHAR_a = 0x61 const CHAR_b = 0x62 const CHAR_e = 0x65 const CHAR_f = 0x66 const CHAR_i = 0x69 const CHAR_l = 0x6C const CHAR_n = 0x6E const CHAR_o = 0x6F const CHAR_r = 0x72 const CHAR_s = 0x73 const CHAR_t = 0x74 const CHAR_u = 0x75 const CHAR_x = 0x78 const CHAR_z = 0x7A const CHAR_LCUB = 0x7B const CHAR_RCUB = 0x7D const CHAR_LSQB = 0x5B const CHAR_BSOL = 0x5C const CHAR_RSQB = 0x5D const CHAR_DEL = 0x7F const SURROGATE_FIRST = 0xD800 const SURROGATE_LAST = 0xDFFF const escapes = { [CHAR_b]: '\u0008', [CHAR_t]: '\u0009', [CHAR_n]: '\u000A', [CHAR_f]: '\u000C', [CHAR_r]: '\u000D', [CHAR_QUOT]: '\u0022', [CHAR_BSOL]: '\u005C' } function isDigit (cp) { return cp >= CHAR_0 && cp <= CHAR_9 } function isHexit (cp) { return (cp >= CHAR_A && cp <= CHAR_F) || (cp >= CHAR_a && cp <= CHAR_f) || (cp >= CHAR_0 && cp <= CHAR_9) } function isBit (cp) { return cp === CHAR_1 || cp === CHAR_0 } function isOctit (cp) { return (cp >= CHAR_0 && cp <= CHAR_7) } function isAlphaNumQuoteHyphen (cp) { return (cp >= CHAR_A && cp <= CHAR_Z) || (cp >= CHAR_a && cp <= CHAR_z) || (cp >= CHAR_0 && cp <= CHAR_9) || cp === CHAR_APOS || cp === CHAR_QUOT || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN } function isAlphaNumHyphen (cp) { return (cp >= CHAR_A && cp <= CHAR_Z) || (cp >= CHAR_a && cp <= CHAR_z) || (cp >= CHAR_0 && cp <= CHAR_9) || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN } const _type = Symbol('type') const _declared = Symbol('declared') const hasOwnProperty = Object.prototype.hasOwnProperty const defineProperty = Object.defineProperty const descriptor = {configurable: true, enumerable: true, writable: true, value: undefined} function hasKey (obj, key) { if (hasOwnProperty.call(obj, key)) return true if (key === '__proto__') defineProperty(obj, '__proto__', descriptor) return false } const INLINE_TABLE = Symbol('inline-table') function InlineTable () { return Object.defineProperties({}, { [_type]: {value: INLINE_TABLE} }) } function isInlineTable (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === INLINE_TABLE } const TABLE = Symbol('table') function Table () { return Object.defineProperties({}, { [_type]: {value: TABLE}, [_declared]: {value: false, writable: true} }) } function isTable (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === TABLE } const _contentType = Symbol('content-type') const INLINE_LIST = Symbol('inline-list') function InlineList (type) { return Object.defineProperties([], { [_type]: {value: INLINE_LIST}, [_contentType]: {value: type} }) } function isInlineList (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === INLINE_LIST } const LIST = Symbol('list') function List () { return Object.defineProperties([], { [_type]: {value: LIST} }) } function isList (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === LIST } // in an eval, to let bundlers not slurp in a util proxy let _custom try { const utilInspect = eval("require('util').inspect") _custom = utilInspect.custom } catch (_) { /* eval require not available in transpiled bundle */ } /* istanbul ignore next */ const _inspect = _custom || 'inspect' class BoxedBigInt { constructor (value) { try { this.value = global.BigInt.asIntN(64, value) } catch (_) { /* istanbul ignore next */ this.value = null } Object.defineProperty(this, _type, {value: INTEGER}) } isNaN () { return this.value === null } /* istanbul ignore next */ toString () { return String(this.value) } /* istanbul ignore next */ [_inspect] () { return `[BigInt: ${this.toString()}]}` } valueOf () { return this.value } } const INTEGER = Symbol('integer') function Integer (value) { let num = Number(value) // -0 is a float thing, not an int thing if (Object.is(num, -0)) num = 0 /* istanbul ignore else */ if (global.BigInt && !Number.isSafeInteger(num)) { return new BoxedBigInt(value) } else { /* istanbul ignore next */ return Object.defineProperties(new Number(num), { isNaN: {value: function () { return isNaN(this) }}, [_type]: {value: INTEGER}, [_inspect]: {value: () => `[Integer: ${value}]`} }) } } function isInteger (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === INTEGER } const FLOAT = Symbol('float') function Float (value) { /* istanbul ignore next */ return Object.defineProperties(new Number(value), { [_type]: {value: FLOAT}, [_inspect]: {value: () => `[Float: ${value}]`} }) } function isFloat (obj) { if (obj === null || typeof (obj) !== 'object') return false return obj[_type] === FLOAT } function tomlType (value) { const type = typeof value if (type === 'object') { /* istanbul ignore if */ if (value === null) return 'null' if (value instanceof Date) return 'datetime' /* istanbul ignore else */ if (_type in value) { switch (value[_type]) { case INLINE_TABLE: return 'inline-table' case INLINE_LIST: return 'inline-list' /* istanbul ignore next */ case TABLE: return 'table' /* istanbul ignore next */ case LIST: return 'list' case FLOAT: return 'float' case INTEGER: return 'integer' } } } return type } function makeParserClass (Parser) { class TOMLParser extends Parser { constructor () { super() this.ctx = this.obj = Table() } /* MATCH HELPER */ atEndOfWord () { return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine() } atEndOfLine () { return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M } parseStart () { if (this.char === Parser.END) { return null } else if (this.char === CHAR_LSQB) { return this.call(this.parseTableOrList) } else if (this.char === CHAR_NUM) { return this.call(this.parseComment) } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { return null } else if (isAlphaNumQuoteHyphen(this.char)) { return this.callNow(this.parseAssignStatement) } else { throw this.error(new TomlError(`Unknown character "${this.char}"`)) } } // HELPER, this strips any whitespace and comments to the end of the line // then RETURNS. Last state in a production. parseWhitespaceToEOL () { if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { return null } else if (this.char === CHAR_NUM) { return this.goto(this.parseComment) } else if (this.char === Parser.END || this.char === CTRL_J) { return this.return() } else { throw this.error(new TomlError('Unexpected character, expected only whitespace or comments till end of line')) } } /* ASSIGNMENT: key = value */ parseAssignStatement () { return this.callNow(this.parseAssign, this.recordAssignStatement) } recordAssignStatement (kv) { let target = this.ctx let finalKey = kv.key.pop() for (let kw of kv.key) { if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { throw this.error(new TomlError("Can't redefine existing key")) } target = target[kw] = target[kw] || Table() } if (hasKey(target, finalKey)) { throw this.error(new TomlError("Can't redefine existing key")) } // unbox our numbers if (isInteger(kv.value) || isFloat(kv.value)) { target[finalKey] = kv.value.valueOf() } else { target[finalKey] = kv.value } return this.goto(this.parseWhitespaceToEOL) } /* ASSSIGNMENT expression, key = value possibly inside an inline table */ parseAssign () { return this.callNow(this.parseKeyword, this.recordAssignKeyword) } recordAssignKeyword (key) { if (this.state.resultTable) { this.state.resultTable.push(key) } else { this.state.resultTable = [key] } return this.goto(this.parseAssignKeywordPreDot) } parseAssignKeywordPreDot () { if (this.char === CHAR_PERIOD) { return this.next(this.parseAssignKeywordPostDot) } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { return this.goto(this.parseAssignEqual) } } parseAssignKeywordPostDot () { if (this.char !== CHAR_SP && this.char !== CTRL_I) { return this.callNow(this.parseKeyword, this.recordAssignKeyword) } } parseAssignEqual () { if (this.char === CHAR_EQUALS) { return this.next(this.parseAssignPreValue) } else { throw this.error(new TomlError('Invalid character, expected "="')) } } parseAssignPreValue () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else { return this.callNow(this.parseValue, this.recordAssignValue) } } recordAssignValue (value) { return this.returnNow({key: this.state.resultTable, value: value}) } /* COMMENTS: #...eol */ parseComment () { do { if (this.char === Parser.END || this.char === CTRL_J) { return this.return() } } while (this.nextChar()) } /* TABLES AND LISTS, [foo] and [[foo]] */ parseTableOrList () { if (this.char === CHAR_LSQB) { this.next(this.parseList) } else { return this.goto(this.parseTable) } } /* TABLE [foo.bar.baz] */ parseTable () { this.ctx = this.obj return this.goto(this.parseTableNext) } parseTableNext () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else { return this.callNow(this.parseKeyword, this.parseTableMore) } } parseTableMore (keyword) { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else if (this.char === CHAR_RSQB) { if (hasKey(this.ctx, keyword) && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { throw this.error(new TomlError("Can't redefine existing key")) } else { this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table() this.ctx[_declared] = true } return this.next(this.parseWhitespaceToEOL) } else if (this.char === CHAR_PERIOD) { if (!hasKey(this.ctx, keyword)) { this.ctx = this.ctx[keyword] = Table() } else if (isTable(this.ctx[keyword])) { this.ctx = this.ctx[keyword] } else if (isList(this.ctx[keyword])) { this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1] } else { throw this.error(new TomlError("Can't redefine existing key")) } return this.next(this.parseTableNext) } else { throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) } } /* LIST [[a.b.c]] */ parseList () { this.ctx = this.obj return this.goto(this.parseListNext) } parseListNext () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else { return this.callNow(this.parseKeyword, this.parseListMore) } } parseListMore (keyword) { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else if (this.char === CHAR_RSQB) { if (!hasKey(this.ctx, keyword)) { this.ctx[keyword] = List() } if (isInlineList(this.ctx[keyword])) { throw this.error(new TomlError("Can't extend an inline array")) } else if (isList(this.ctx[keyword])) { const next = Table() this.ctx[keyword].push(next) this.ctx = next } else { throw this.error(new TomlError("Can't redefine an existing key")) } return this.next(this.parseListEnd) } else if (this.char === CHAR_PERIOD) { if (!hasKey(this.ctx, keyword)) { this.ctx = this.ctx[keyword] = Table() } else if (isInlineList(this.ctx[keyword])) { throw this.error(new TomlError("Can't extend an inline array")) } else if (isInlineTable(this.ctx[keyword])) { throw this.error(new TomlError("Can't extend an inline table")) } else if (isList(this.ctx[keyword])) { this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1] } else if (isTable(this.ctx[keyword])) { this.ctx = this.ctx[keyword] } else { throw this.error(new TomlError("Can't redefine an existing key")) } return this.next(this.parseListNext) } else { throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) } } parseListEnd (keyword) { if (this.char === CHAR_RSQB) { return this.next(this.parseWhitespaceToEOL) } else { throw this.error(new TomlError('Unexpected character, expected whitespace, . or ]')) } } /* VALUE string, number, boolean, inline list, inline object */ parseValue () { if (this.char === Parser.END) { throw this.error(new TomlError('Key without value')) } else if (this.char === CHAR_QUOT) { return this.next(this.parseDoubleString) } if (this.char === CHAR_APOS) { return this.next(this.parseSingleString) } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { return this.goto(this.parseNumberSign) } else if (this.char === CHAR_i) { return this.next(this.parseInf) } else if (this.char === CHAR_n) { return this.next(this.parseNan) } else if (isDigit(this.char)) { return this.goto(this.parseNumberOrDateTime) } else if (this.char === CHAR_t || this.char === CHAR_f) { return this.goto(this.parseBoolean) } else if (this.char === CHAR_LSQB) { return this.call(this.parseInlineList, this.recordValue) } else if (this.char === CHAR_LCUB) { return this.call(this.parseInlineTable, this.recordValue) } else { throw this.error(new TomlError('Unexpected character, expecting string, number, datetime, boolean, inline array or inline table')) } } recordValue (value) { return this.returnNow(value) } parseInf () { if (this.char === CHAR_n) { return this.next(this.parseInf2) } else { throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')) } } parseInf2 () { if (this.char === CHAR_f) { if (this.state.buf === '-') { return this.return(-Infinity) } else { return this.return(Infinity) } } else { throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')) } } parseNan () { if (this.char === CHAR_a) { return this.next(this.parseNan2) } else { throw this.error(new TomlError('Unexpected character, expected "nan"')) } } parseNan2 () { if (this.char === CHAR_n) { return this.return(NaN) } else { throw this.error(new TomlError('Unexpected character, expected "nan"')) } } /* KEYS, barewords or basic, literal, or dotted */ parseKeyword () { if (this.char === CHAR_QUOT) { return this.next(this.parseBasicString) } else if (this.char === CHAR_APOS) { return this.next(this.parseLiteralString) } else { return this.goto(this.parseBareKey) } } /* KEYS: barewords */ parseBareKey () { do { if (this.char === Parser.END) { throw this.error(new TomlError('Key ended without value')) } else if (isAlphaNumHyphen(this.char)) { this.consume() } else if (this.state.buf.length === 0) { throw this.error(new TomlError('Empty bare keys are not allowed')) } else { return this.returnNow() } } while (this.nextChar()) } /* STRINGS, single quoted (literal) */ parseSingleString () { if (this.char === CHAR_APOS) { return this.next(this.parseLiteralMultiStringMaybe) } else { return this.goto(this.parseLiteralString) } } parseLiteralString () { do { if (this.char === CHAR_APOS) { return this.return() } else if (this.atEndOfLine()) { throw this.error(new TomlError('Unterminated string')) } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I)) { throw this.errorControlCharInString() } else { this.consume() } } while (this.nextChar()) } parseLiteralMultiStringMaybe () { if (this.char === CHAR_APOS) { return this.next(this.parseLiteralMultiString) } else { return this.returnNow() } } parseLiteralMultiString () { if (this.char === CTRL_M) { return null } else if (this.char === CTRL_J) { return this.next(this.parseLiteralMultiStringContent) } else { return this.goto(this.parseLiteralMultiStringContent) } } parseLiteralMultiStringContent () { do { if (this.char === CHAR_APOS) { return this.next(this.parseLiteralMultiEnd) } else if (this.char === Parser.END) { throw this.error(new TomlError('Unterminated multi-line string')) } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M)) { throw this.errorControlCharInString() } else { this.consume() } } while (this.nextChar()) } parseLiteralMultiEnd () { if (this.char === CHAR_APOS) { return this.next(this.parseLiteralMultiEnd2) } else { this.state.buf += "'" return this.goto(this.parseLiteralMultiStringContent) } } parseLiteralMultiEnd2 () { if (this.char === CHAR_APOS) { return this.return() } else { this.state.buf += "''" return this.goto(this.parseLiteralMultiStringContent) } } /* STRINGS double quoted */ parseDoubleString () { if (this.char === CHAR_QUOT) { return this.next(this.parseMultiStringMaybe) } else { return this.goto(this.parseBasicString) } } parseBasicString () { do { if (this.char === CHAR_BSOL) { return this.call(this.parseEscape, this.recordEscapeReplacement) } else if (this.char === CHAR_QUOT) { return this.return() } else if (this.atEndOfLine()) { throw this.error(new TomlError('Unterminated string')) } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I)) { throw this.errorControlCharInString() } else { this.consume() } } while (this.nextChar()) } recordEscapeReplacement (replacement) { this.state.buf += replacement return this.goto(this.parseBasicString) } parseMultiStringMaybe () { if (this.char === CHAR_QUOT) { return this.next(this.parseMultiString) } else { return this.returnNow() } } parseMultiString () { if (this.char === CTRL_M) { return null } else if (this.char === CTRL_J) { return this.next(this.parseMultiStringContent) } else { return this.goto(this.parseMultiStringContent) } } parseMultiStringContent () { do { if (this.char === CHAR_BSOL) { return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement) } else if (this.char === CHAR_QUOT) { return this.next(this.parseMultiEnd) } else if (this.char === Parser.END) { throw this.error(new TomlError('Unterminated multi-line string')) } else if (this.char === CHAR_DEL || (this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M)) { throw this.errorControlCharInString() } else { this.consume() } } while (this.nextChar()) } errorControlCharInString () { let displayCode = '\\u00' if (this.char < 16) { displayCode += '0' } displayCode += this.char.toString(16) return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)) } recordMultiEscapeReplacement (replacement) { this.state.buf += replacement return this.goto(this.parseMultiStringContent) } parseMultiEnd () { if (this.char === CHAR_QUOT) { return this.next(this.parseMultiEnd2) } else { this.state.buf += '"' return this.goto(this.parseMultiStringContent) } } parseMultiEnd2 () { if (this.char === CHAR_QUOT) { return this.return() } else { this.state.buf += '""' return this.goto(this.parseMultiStringContent) } } parseMultiEscape () { if (this.char === CTRL_M || this.char === CTRL_J) { return this.next(this.parseMultiTrim) } else if (this.char === CHAR_SP || this.char === CTRL_I) { return this.next(this.parsePreMultiTrim) } else { return this.goto(this.parseEscape) } } parsePreMultiTrim () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else if (this.char === CTRL_M || this.char === CTRL_J) { return this.next(this.parseMultiTrim) } else { throw this.error(new TomlError("Can't escape whitespace")) } } parseMultiTrim () { // explicitly whitespace here, END should follow the same path as chars if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { return null } else { return this.returnNow() } } parseEscape () { if (this.char in escapes) { return this.return(escapes[this.char]) } else if (this.char === CHAR_u) { return this.call(this.parseSmallUnicode, this.parseUnicodeReturn) } else if (this.char === CHAR_U) { return this.call(this.parseLargeUnicode, this.parseUnicodeReturn) } else { throw this.error(new TomlError('Unknown escape character: ' + this.char)) } } parseUnicodeReturn (char) { try { const codePoint = parseInt(char, 16) if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { throw this.error(new TomlError('Invalid unicode, character in range 0xD800 - 0xDFFF is reserved')) } return this.returnNow(String.fromCodePoint(codePoint)) } catch (err) { throw this.error(TomlError.wrap(err)) } } parseSmallUnicode () { if (!isHexit(this.char)) { throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')) } else { this.consume() if (this.state.buf.length >= 4) return this.return() } } parseLargeUnicode () { if (!isHexit(this.char)) { throw this.error(new TomlError('Invalid character in unicode sequence, expected hex')) } else { this.consume() if (this.state.buf.length >= 8) return this.return() } } /* NUMBERS */ parseNumberSign () { this.consume() return this.next(this.parseMaybeSignedInfOrNan) } parseMaybeSignedInfOrNan () { if (this.char === CHAR_i) { return this.next(this.parseInf) } else if (this.char === CHAR_n) { return this.next(this.parseNan) } else { return this.callNow(this.parseNoUnder, this.parseNumberIntegerStart) } } parseNumberIntegerStart () { if (this.char === CHAR_0) { this.consume() return this.next(this.parseNumberIntegerExponentOrDecimal) } else { return this.goto(this.parseNumberInteger) } } parseNumberIntegerExponentOrDecimal () { if (this.char === CHAR_PERIOD) { this.consume() return this.call(this.parseNoUnder, this.parseNumberFloat) } else if (this.char === CHAR_E || this.char === CHAR_e) { this.consume() return this.next(this.parseNumberExponentSign) } else { return this.returnNow(Integer(this.state.buf)) } } parseNumberInteger () { if (isDigit(this.char)) { this.consume() } else if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnder) } else if (this.char === CHAR_E || this.char === CHAR_e) { this.consume() return this.next(this.parseNumberExponentSign) } else if (this.char === CHAR_PERIOD) { this.consume() return this.call(this.parseNoUnder, this.parseNumberFloat) } else { const result = Integer(this.state.buf) /* istanbul ignore if */ if (result.isNaN()) { throw this.error(new TomlError('Invalid number')) } else { return this.returnNow(result) } } } parseNoUnder () { if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD || this.char === CHAR_E || this.char === CHAR_e) { throw this.error(new TomlError('Unexpected character, expected digit')) } else if (this.atEndOfWord()) { throw this.error(new TomlError('Incomplete number')) } return this.returnNow() } parseNoUnderHexOctBinLiteral () { if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD) { throw this.error(new TomlError('Unexpected character, expected digit')) } else if (this.atEndOfWord()) { throw this.error(new TomlError('Incomplete number')) } return this.returnNow() } parseNumberFloat () { if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnder, this.parseNumberFloat) } else if (isDigit(this.char)) { this.consume() } else if (this.char === CHAR_E || this.char === CHAR_e) { this.consume() return this.next(this.parseNumberExponentSign) } else { return this.returnNow(Float(this.state.buf)) } } parseNumberExponentSign () { if (isDigit(this.char)) { return this.goto(this.parseNumberExponent) } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { this.consume() this.call(this.parseNoUnder, this.parseNumberExponent) } else { throw this.error(new TomlError('Unexpected character, expected -, + or digit')) } } parseNumberExponent () { if (isDigit(this.char)) { this.consume() } else if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnder) } else { return this.returnNow(Float(this.state.buf)) } } /* NUMBERS or DATETIMES */ parseNumberOrDateTime () { if (this.char === CHAR_0) { this.consume() return this.next(this.parseNumberBaseOrDateTime) } else { return this.goto(this.parseNumberOrDateTimeOnly) } } parseNumberOrDateTimeOnly () { // note, if two zeros are in a row then it MUST be a date if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnder, this.parseNumberInteger) } else if (isDigit(this.char)) { this.consume() if (this.state.buf.length > 4) this.next(this.parseNumberInteger) } else if (this.char === CHAR_E || this.char === CHAR_e) { this.consume() return this.next(this.parseNumberExponentSign) } else if (this.char === CHAR_PERIOD) { this.consume() return this.call(this.parseNoUnder, this.parseNumberFloat) } else if (this.char === CHAR_HYPHEN) { return this.goto(this.parseDateTime) } else if (this.char === CHAR_COLON) { return this.goto(this.parseOnlyTimeHour) } else { return this.returnNow(Integer(this.state.buf)) } } parseDateTimeOnly () { if (this.state.buf.length < 4) { if (isDigit(this.char)) { return this.consume() } else if (this.char === CHAR_COLON) { return this.goto(this.parseOnlyTimeHour) } else { throw this.error(new TomlError('Expected digit while parsing year part of a date')) } } else { if (this.char === CHAR_HYPHEN) { return this.goto(this.parseDateTime) } else { throw this.error(new TomlError('Expected hyphen (-) while parsing year part of date')) } } } parseNumberBaseOrDateTime () { if (this.char === CHAR_b) { this.consume() return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerBin) } else if (this.char === CHAR_o) { this.consume() return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerOct) } else if (this.char === CHAR_x) { this.consume() return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerHex) } else if (this.char === CHAR_PERIOD) { return this.goto(this.parseNumberInteger) } else if (isDigit(this.char)) { return this.goto(this.parseDateTimeOnly) } else { return this.returnNow(Integer(this.state.buf)) } } parseIntegerHex () { if (isHexit(this.char)) { this.consume() } else if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnderHexOctBinLiteral) } else { const result = Integer(this.state.buf) /* istanbul ignore if */ if (result.isNaN()) { throw this.error(new TomlError('Invalid number')) } else { return this.returnNow(result) } } } parseIntegerOct () { if (isOctit(this.char)) { this.consume() } else if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnderHexOctBinLiteral) } else { const result = Integer(this.state.buf) /* istanbul ignore if */ if (result.isNaN()) { throw this.error(new TomlError('Invalid number')) } else { return this.returnNow(result) } } } parseIntegerBin () { if (isBit(this.char)) { this.consume() } else if (this.char === CHAR_LOWBAR) { return this.call(this.parseNoUnderHexOctBinLiteral) } else { const result = Integer(this.state.buf) /* istanbul ignore if */ if (result.isNaN()) { throw this.error(new TomlError('Invalid number')) } else { return this.returnNow(result) } } } /* DATETIME */ parseDateTime () { // we enter here having just consumed the year and about to consume the hyphen if (this.state.buf.length < 4) { throw this.error(new TomlError('Years less than 1000 must be zero padded to four characters')) } this.state.result = this.state.buf this.state.buf = '' return this.next(this.parseDateMonth) } parseDateMonth () { if (this.char === CHAR_HYPHEN) { if (this.state.buf.length < 2) { throw this.error(new TomlError('Months less than 10 must be zero padded to two characters')) } this.state.result += '-' + this.state.buf this.state.buf = '' return this.next(this.parseDateDay) } else if (isDigit(this.char)) { this.consume() } else { throw this.error(new TomlError('Incomplete datetime')) } } parseDateDay () { if (this.char === CHAR_T || this.char === CHAR_SP) { if (this.state.buf.length < 2) { throw this.error(new TomlError('Days less than 10 must be zero padded to two characters')) } this.state.result += '-' + this.state.buf this.state.buf = '' return this.next(this.parseStartTimeHour) } else if (this.atEndOfWord()) { return this.returnNow(createDate(this.state.result + '-' + this.state.buf)) } else if (isDigit(this.char)) { this.consume() } else { throw this.error(new TomlError('Incomplete datetime')) } } parseStartTimeHour () { if (this.atEndOfWord()) { return this.returnNow(createDate(this.state.result)) } else { return this.goto(this.parseTimeHour) } } parseTimeHour () { if (this.char === CHAR_COLON) { if (this.state.buf.length < 2) { throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')) } this.state.result += 'T' + this.state.buf this.state.buf = '' return this.next(this.parseTimeMin) } else if (isDigit(this.char)) { this.consume() } else { throw this.error(new TomlError('Incomplete datetime')) } } parseTimeMin () { if (this.state.buf.length < 2 && isDigit(this.char)) { this.consume() } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { this.state.result += ':' + this.state.buf this.state.buf = '' return this.next(this.parseTimeSec) } else { throw this.error(new TomlError('Incomplete datetime')) } } parseTimeSec () { if (isDigit(this.char)) { this.consume() if (this.state.buf.length === 2) { this.state.result += ':' + this.state.buf this.state.buf = '' return this.next(this.parseTimeZoneOrFraction) } } else { throw this.error(new TomlError('Incomplete datetime')) } } parseOnlyTimeHour () { /* istanbul ignore else */ if (this.char === CHAR_COLON) { if (this.state.buf.length < 2) { throw this.error(new TomlError('Hours less than 10 must be zero padded to two characters')) } this.state.result = this.state.buf this.state.buf = '' return this.next(this.parseOnlyTimeMin) } else { throw this.error(new TomlError('Incomplete time')) } } parseOnlyTimeMin () { if (this.state.buf.length < 2 && isDigit(this.char)) { this.consume() } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { this.state.result += ':' + this.state.buf this.state.buf = '' return this.next(this.parseOnlyTimeSec) } else { throw this.error(new TomlError('Incomplete time')) } } parseOnlyTimeSec () { if (isDigit(this.char)) { this.consume() if (this.state.buf.length === 2) { return this.next(this.parseOnlyTimeFractionMaybe) } } else { throw this.error(new TomlError('Incomplete time')) } } parseOnlyTimeFractionMaybe () { this.state.result += ':' + this.state.buf if (this.char === CHAR_PERIOD) { this.state.buf = '' this.next(this.parseOnlyTimeFraction) } else { return this.return(createTime(this.state.result)) } } parseOnlyTimeFraction () { if (isDigit(this.char)) { this.consume() } else if (this.atEndOfWord()) { if (this.state.buf.length === 0) throw this.error(new TomlError('Expected digit in milliseconds')) return this.returnNow(createTime(this.state.result + '.' + this.state.buf)) } else { throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) } } parseTimeZoneOrFraction () { if (this.char === CHAR_PERIOD) { this.consume() this.next(this.parseDateTimeFraction) } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { this.consume() this.next(this.parseTimeZoneHour) } else if (this.char === CHAR_Z) { this.consume() return this.return(createDateTime(this.state.result + this.state.buf)) } else if (this.atEndOfWord()) { return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)) } else { throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) } } parseDateTimeFraction () { if (isDigit(this.char)) { this.consume() } else if (this.state.buf.length === 1) { throw this.error(new TomlError('Expected digit in milliseconds')) } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { this.consume() this.next(this.parseTimeZoneHour) } else if (this.char === CHAR_Z) { this.consume() return this.return(createDateTime(this.state.result + this.state.buf)) } else if (this.atEndOfWord()) { return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)) } else { throw this.error(new TomlError('Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z')) } } parseTimeZoneHour () { if (isDigit(this.char)) { this.consume() // FIXME: No more regexps if (/\d\d$/.test(this.state.buf)) return this.next(this.parseTimeZoneSep) } else { throw this.error(new TomlError('Unexpected character in datetime, expected digit')) } } parseTimeZoneSep () { if (this.char === CHAR_COLON) { this.consume() this.next(this.parseTimeZoneMin) } else { throw this.error(new TomlError('Unexpected character in datetime, expected colon')) } } parseTimeZoneMin () { if (isDigit(this.char)) { this.consume() if (/\d\d$/.test(this.state.buf)) return this.return(createDateTime(this.state.result + this.state.buf)) } else { throw this.error(new TomlError('Unexpected character in datetime, expected digit')) } } /* BOOLEAN */ parseBoolean () { /* istanbul ignore else */ if (this.char === CHAR_t) { this.consume() return this.next(this.parseTrue_r) } else if (this.char === CHAR_f) { this.consume() return this.next(this.parseFalse_a) } } parseTrue_r () { if (this.char === CHAR_r) { this.consume() return this.next(this.parseTrue_u) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseTrue_u () { if (this.char === CHAR_u) { this.consume() return this.next(this.parseTrue_e) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseTrue_e () { if (this.char === CHAR_e) { return this.return(true) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseFalse_a () { if (this.char === CHAR_a) { this.consume() return this.next(this.parseFalse_l) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseFalse_l () { if (this.char === CHAR_l) { this.consume() return this.next(this.parseFalse_s) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseFalse_s () { if (this.char === CHAR_s) { this.consume() return this.next(this.parseFalse_e) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } parseFalse_e () { if (this.char === CHAR_e) { return this.return(false) } else { throw this.error(new TomlError('Invalid boolean, expected true or false')) } } /* INLINE LISTS */ parseInlineList () { if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { return null } else if (this.char === Parser.END) { throw this.error(new TomlError('Unterminated inline array')) } else if (this.char === CHAR_NUM) { return this.call(this.parseComment) } else if (this.char === CHAR_RSQB) { return this.return(this.state.resultArr || InlineList()) } else { return this.callNow(this.parseValue, this.recordInlineListValue) } } recordInlineListValue (value) { if (this.state.resultArr) { const listType = this.state.resultArr[_contentType] const valueType = tomlType(value) if (listType !== valueType) { throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)) } } else { this.state.resultArr = InlineList(tomlType(value)) } if (isFloat(value) || isInteger(value)) { // unbox now that we've verified they're ok this.state.resultArr.push(value.valueOf()) } else { this.state.resultArr.push(value) } return this.goto(this.parseInlineListNext) } parseInlineListNext () { if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { return null } else if (this.char === CHAR_NUM) { return this.call(this.parseComment) } else if (this.char === CHAR_COMMA) { return this.next(this.parseInlineList) } else if (this.char === CHAR_RSQB) { return this.goto(this.parseInlineList) } else { throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')) } } /* INLINE TABLE */ parseInlineTable () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { throw this.error(new TomlError('Unterminated inline array')) } else if (this.char === CHAR_RCUB) { return this.return(this.state.resultTable || InlineTable()) } else { if (!this.state.resultTable) this.state.resultTable = InlineTable() return this.callNow(this.parseAssign, this.recordInlineTableValue) } } recordInlineTableValue (kv) { let target = this.state.resultTable let finalKey = kv.key.pop() for (let kw of kv.key) { if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { throw this.error(new TomlError("Can't redefine existing key")) } target = target[kw] = target[kw] || Table() } if (hasKey(target, finalKey)) { throw this.error(new TomlError("Can't redefine existing key")) } if (isInteger(kv.value) || isFloat(kv.value)) { target[finalKey] = kv.value.valueOf() } else { target[finalKey] = kv.value } return this.goto(this.parseInlineTableNext) } parseInlineTableNext () { if (this.char === CHAR_SP || this.char === CTRL_I) { return null } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { throw this.error(new TomlError('Unterminated inline array')) } else if (this.char === CHAR_COMMA) { return this.next(this.parseInlineTable) } else if (this.char === CHAR_RCUB) { return this.goto(this.parseInlineTable) } else { throw this.error(new TomlError('Invalid character, expected whitespace, comma (,) or close bracket (])')) } } } return TOMLParser } /***/ }), /***/ 22950: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = parseAsync const TOMLParser = __webpack_require__(8676) const prettyError = __webpack_require__(22418) function parseAsync (str, opts) { if (!opts) opts = {} const index = 0 const blocksize = opts.blocksize || 40960 const parser = new TOMLParser() return new Promise((resolve, reject) => { setImmediate(parseAsyncNext, index, blocksize, resolve, reject) }) function parseAsyncNext (index, blocksize, resolve, reject) { if (index >= str.length) { try { return resolve(parser.finish()) } catch (err) { return reject(prettyError(err, str)) } } try { parser.parse(str.slice(index, index + blocksize)) setImmediate(parseAsyncNext, index + blocksize, blocksize, resolve, reject) } catch (err) { reject(prettyError(err, str)) } } } /***/ }), /***/ 22418: /***/ ((module) => { "use strict"; module.exports = prettyError function prettyError (err, buf) { /* istanbul ignore if */ if (err.pos == null || err.line == null) return err let msg = err.message msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}:\n` /* istanbul ignore else */ if (buf && buf.split) { const lines = buf.split(/\n/) const lineNumWidth = String(Math.min(lines.length, err.line + 3)).length let linePadding = ' ' while (linePadding.length < lineNumWidth) linePadding += ' ' for (let ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { let lineNum = String(ii + 1) if (lineNum.length < lineNumWidth) lineNum = ' ' + lineNum if (err.line === ii) { msg += lineNum + '> ' + lines[ii] + '\n' msg += linePadding + ' ' for (let hh = 0; hh < err.col; ++hh) { msg += ' ' } msg += '^\n' } else { msg += lineNum + ': ' + lines[ii] + '\n' } } } err.message = msg + '\n' return err } /***/ }), /***/ 6435: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = parseStream const stream = __webpack_require__(92413) const TOMLParser = __webpack_require__(8676) function parseStream (stm) { if (stm) { return parseReadable(stm) } else { return parseTransform(stm) } } function parseReadable (stm) { const parser = new TOMLParser() stm.setEncoding('utf8') return new Promise((resolve, reject) => { let readable let ended = false let errored = false function finish () { ended = true if (readable) return try { resolve(parser.finish()) } catch (err) { reject(err) } } function error (err) { errored = true reject(err) } stm.once('end', finish) stm.once('error', error) readNext() function readNext () { readable = true let data while ((data = stm.read()) !== null) { try { parser.parse(data) } catch (err) { return error(err) } } readable = false /* istanbul ignore if */ if (ended) return finish() /* istanbul ignore if */ if (errored) return stm.once('readable', readNext) } }) } function parseTransform () { const parser = new TOMLParser() return new stream.Transform({ objectMode: true, transform (chunk, encoding, cb) { try { parser.parse(chunk.toString(encoding)) } catch (err) { this.emit('error', err) } cb() }, flush (cb) { try { this.push(parser.finish()) } catch (err) { this.emit('error', err) } cb() } }) } /***/ }), /***/ 56530: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = parseString const TOMLParser = __webpack_require__(8676) const prettyError = __webpack_require__(22418) function parseString (str) { if (global.Buffer && global.Buffer.isBuffer(str)) { str = str.toString('utf8') } const parser = new TOMLParser() try { parser.parse(str) return parser.finish() } catch (err) { throw prettyError(err, str) } } /***/ }), /***/ 83512: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__(56530) module.exports.async = __webpack_require__(22950) module.exports.stream = __webpack_require__(6435) module.exports.prettyError = __webpack_require__(22418) /***/ }), /***/ 36921: /***/ ((module) => { "use strict"; module.exports = stringify module.exports.value = stringifyInline function stringify (obj) { if (obj === null) throw typeError('null') if (obj === void (0)) throw typeError('undefined') if (typeof obj !== 'object') throw typeError(typeof obj) if (typeof obj.toJSON === 'function') obj = obj.toJSON() if (obj == null) return null const type = tomlType(obj) if (type !== 'table') throw typeError(type) return stringifyObject('', '', obj) } function typeError (type) { return new Error('Can only stringify objects, not ' + type) } function arrayOneTypeError () { return new Error("Array values can't have mixed types") } function getInlineKeys (obj) { return Object.keys(obj).filter(key => isInline(obj[key])) } function getComplexKeys (obj) { return Object.keys(obj).filter(key => !isInline(obj[key])) } function toJSON (obj) { let nobj = Array.isArray(obj) ? [] : Object.prototype.hasOwnProperty.call(obj, '__proto__') ? {['__proto__']: undefined} : {} for (let prop of Object.keys(obj)) { if (obj[prop] && typeof obj[prop].toJSON === 'function' && !('toISOString' in obj[prop])) { nobj[prop] = obj[prop].toJSON() } else { nobj[prop] = obj[prop] } } return nobj } function stringifyObject (prefix, indent, obj) { obj = toJSON(obj) var inlineKeys var complexKeys inlineKeys = getInlineKeys(obj) complexKeys = getComplexKeys(obj) var result = [] var inlineIndent = indent || '' inlineKeys.forEach(key => { var type = tomlType(obj[key]) if (type !== 'undefined' && type !== 'null') { result.push(inlineIndent + stringifyKey(key) + ' = ' + stringifyAnyInline(obj[key], true)) } }) if (result.length > 0) result.push('') var complexIndent = prefix && inlineKeys.length > 0 ? indent + ' ' : '' complexKeys.forEach(key => { result.push(stringifyComplex(prefix, complexIndent, key, obj[key])) }) return result.join('\n') } function isInline (value) { switch (tomlType(value)) { case 'undefined': case 'null': case 'integer': case 'nan': case 'float': case 'boolean': case 'string': case 'datetime': return true case 'array': return value.length === 0 || tomlType(value[0]) !== 'table' case 'table': return Object.keys(value).length === 0 /* istanbul ignore next */ default: return false } } function tomlType (value) { if (value === undefined) { return 'undefined' } else if (value === null) { return 'null' /* eslint-disable valid-typeof */ } else if (typeof value === 'bigint' || (Number.isInteger(value) && !Object.is(value, -0))) { return 'integer' } else if (typeof value === 'number') { return 'float' } else if (typeof value === 'boolean') { return 'boolean' } else if (typeof value === 'string') { return 'string' } else if ('toISOString' in value) { return isNaN(value) ? 'undefined' : 'datetime' } else if (Array.isArray(value)) { return 'array' } else { return 'table' } } function stringifyKey (key) { var keyStr = String(key) if (/^[-A-Za-z0-9_]+$/.test(keyStr)) { return keyStr } else { return stringifyBasicString(keyStr) } } function stringifyBasicString (str) { return '"' + escapeString(str).replace(/"/g, '\\"') + '"' } function stringifyLiteralString (str) { return "'" + str + "'" } function numpad (num, str) { while (str.length < num) str = '0' + str return str } function escapeString (str) { return str.replace(/\\/g, '\\\\') .replace(/[\b]/g, '\\b') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\f/g, '\\f') .replace(/\r/g, '\\r') /* eslint-disable no-control-regex */ .replace(/([\u0000-\u001f\u007f])/, c => '\\u' + numpad(4, c.codePointAt(0).toString(16))) /* eslint-enable no-control-regex */ } function stringifyMultilineString (str) { let escaped = str.split(/\n/).map(str => { return escapeString(str).replace(/"(?="")/g, '\\"') }).join('\n') if (escaped.slice(-1) === '"') escaped += '\\\n' return '"""\n' + escaped + '"""' } function stringifyAnyInline (value, multilineOk) { let type = tomlType(value) if (type === 'string') { if (multilineOk && /\n/.test(value)) { type = 'string-multiline' } else if (!/[\b\t\n\f\r']/.test(value) && /"/.test(value)) { type = 'string-literal' } } return stringifyInline(value, type) } function stringifyInline (value, type) { /* istanbul ignore if */ if (!type) type = tomlType(value) switch (type) { case 'string-multiline': return stringifyMultilineString(value) case 'string': return stringifyBasicString(value) case 'string-literal': return stringifyLiteralString(value) case 'integer': return stringifyInteger(value) case 'float': return stringifyFloat(value) case 'boolean': return stringifyBoolean(value) case 'datetime': return stringifyDatetime(value) case 'array': return stringifyInlineArray(value.filter(_ => tomlType(_) !== 'null' && tomlType(_) !== 'undefined' && tomlType(_) !== 'nan')) case 'table': return stringifyInlineTable(value) /* istanbul ignore next */ default: throw typeError(type) } } function stringifyInteger (value) { /* eslint-disable security/detect-unsafe-regex */ return String(value).replace(/\B(?=(\d{3})+(?!\d))/g, '_') } function stringifyFloat (value) { if (value === Infinity) { return 'inf' } else if (value === -Infinity) { return '-inf' } else if (Object.is(value, NaN)) { return 'nan' } else if (Object.is(value, -0)) { return '-0.0' } var chunks = String(value).split('.') var int = chunks[0] var dec = chunks[1] || 0 return stringifyInteger(int) + '.' + dec } function stringifyBoolean (value) { return String(value) } function stringifyDatetime (value) { return value.toISOString() } function isNumber (type) { return type === 'float' || type === 'integer' } function arrayType (values) { var contentType = tomlType(values[0]) if (values.every(_ => tomlType(_) === contentType)) return contentType // mixed integer/float, emit as floats if (values.every(_ => isNumber(tomlType(_)))) return 'float' return 'mixed' } function validateArray (values) { const type = arrayType(values) if (type === 'mixed') { throw arrayOneTypeError() } return type } function stringifyInlineArray (values) { values = toJSON(values) const type = validateArray(values) var result = '[' var stringified = values.map(_ => stringifyInline(_, type)) if (stringified.join(', ').length > 60 || /\n/.test(stringified)) { result += '\n ' + stringified.join(',\n ') + '\n' } else { result += ' ' + stringified.join(', ') + (stringified.length > 0 ? ' ' : '') } return result + ']' } function stringifyInlineTable (value) { value = toJSON(value) var result = [] Object.keys(value).forEach(key => { result.push(stringifyKey(key) + ' = ' + stringifyAnyInline(value[key], false)) }) return '{ ' + result.join(', ') + (result.length > 0 ? ' ' : '') + '}' } function stringifyComplex (prefix, indent, key, value) { var valueType = tomlType(value) /* istanbul ignore else */ if (valueType === 'array') { return stringifyArrayOfTables(prefix, indent, key, value) } else if (valueType === 'table') { return stringifyComplexTable(prefix, indent, key, value) } else { throw typeError(valueType) } } function stringifyArrayOfTables (prefix, indent, key, values) { values = toJSON(values) validateArray(values) var firstValueType = tomlType(values[0]) /* istanbul ignore if */ if (firstValueType !== 'table') throw typeError(firstValueType) var fullKey = prefix + stringifyKey(key) var result = '' values.forEach(table => { if (result.length > 0) result += '\n' result += indent + '[[' + fullKey + ']]\n' result += stringifyObject(fullKey + '.', indent, table) }) return result } function stringifyComplexTable (prefix, indent, key, value) { var fullKey = prefix + stringifyKey(key) var result = '' if (getInlineKeys(value).length > 0) { result += indent + '[' + fullKey + ']\n' } return result + stringifyObject(fullKey + '.', indent, value) } /***/ }), /***/ 5022: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; exports.parse = __webpack_require__(83512) exports.stringify = __webpack_require__(36921) /***/ }), /***/ 18185: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; const fs = __webpack_require__(35747); exports.FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, stat: fs.stat, lstatSync: fs.lstatSync, statSync: fs.statSync, readdir: fs.readdir, readdirSync: fs.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === undefined) { return exports.FILE_SYSTEM_ADAPTER; } return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); } exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), /***/ 91107: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); } const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); const SUPPORTED_MAJOR_VERSION = 10; const SUPPORTED_MINOR_VERSION = 10; const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; /** * IS `true` for Node.js 10.10 and greater. */ exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; /***/ }), /***/ 55923: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Settings = exports.scandirSync = exports.scandir = void 0; const async = __webpack_require__(31411); const sync = __webpack_require__(63953); const settings_1 = __webpack_require__(36913); exports.Settings = settings_1.default; function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { async.read(path, getSettings(), optionsOrSettingsOrCallback); return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } exports.scandir = scandir; function scandirSync(path, optionsOrSettings) { const settings = getSettings(optionsOrSettings); return sync.read(path, settings); } exports.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } return new settings_1.default(settingsOrOptions); } /***/ }), /***/ 31411: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; const fsStat = __webpack_require__(66203); const rpl = __webpack_require__(54595); const constants_1 = __webpack_require__(91107); const utils = __webpack_require__(66582); const common = __webpack_require__(34587); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); return; } readdir(directory, settings, callback); } exports.read = read; function readdirWithFileTypes(directory, settings, callback) { settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { if (readdirError !== null) { callFailureCallback(callback, readdirError); return; } const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { callSuccessCallback(callback, entries); return; } const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); rpl(tasks, (rplError, rplEntries) => { if (rplError !== null) { callFailureCallback(callback, rplError); return; } callSuccessCallback(callback, rplEntries); }); }); } exports.readdirWithFileTypes = readdirWithFileTypes; function makeRplTaskEntry(entry, settings) { return (done) => { if (!entry.dirent.isSymbolicLink()) { done(null, entry); return; } settings.fs.stat(entry.path, (statError, stats) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { done(statError); return; } done(null, entry); return; } entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); done(null, entry); }); }; } function readdir(directory, settings, callback) { settings.fs.readdir(directory, (readdirError, names) => { if (readdirError !== null) { callFailureCallback(callback, readdirError); return; } const tasks = names.map((name) => { const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { fsStat.stat(path, settings.fsStatSettings, (error, stats) => { if (error !== null) { done(error); return; } const entry = { name, path, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { entry.stats = stats; } done(null, entry); }); }; }); rpl(tasks, (rplError, entries) => { if (rplError !== null) { callFailureCallback(callback, rplError); return; } callSuccessCallback(callback, entries); }); }); } exports.readdir = readdir; function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, result) { callback(null, result); } /***/ }), /***/ 34587: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.joinPathSegments = void 0; function joinPathSegments(a, b, separator) { /** * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). */ if (a.endsWith(separator)) { return a + b; } return a + separator + b; } exports.joinPathSegments = joinPathSegments; /***/ }), /***/ 63953: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; const fsStat = __webpack_require__(66203); const constants_1 = __webpack_require__(91107); const utils = __webpack_require__(66582); const common = __webpack_require__(34587); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); } return readdir(directory, settings); } exports.read = read; function readdirWithFileTypes(directory, settings) { const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); return dirents.map((dirent) => { const entry = { dirent, name: dirent.name, path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { try { const stats = settings.fs.statSync(entry.path); entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); } catch (error) { if (settings.throwErrorOnBrokenSymbolicLink) { throw error; } } } return entry; }); } exports.readdirWithFileTypes = readdirWithFileTypes; function readdir(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); const stats = fsStat.statSync(entryPath, settings.fsStatSettings); const entry = { name, path: entryPath, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { entry.stats = stats; } return entry; }); } exports.readdir = readdir; /***/ }), /***/ 36913: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const fsStat = __webpack_require__(66203); const fs = __webpack_require__(18185); class Settings { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); this.fs = fs.createFileSystemAdapter(this._options.fs); this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ followSymbolicLink: this.followSymbolicLinks, fs: this.fs, throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink }); } _getValue(option, value) { return option !== null && option !== void 0 ? option : value; } } exports.default = Settings; /***/ }), /***/ 70322: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDirentFromStats = void 0; class DirentFromStats { constructor(name, stats) { this.name = name; this.isBlockDevice = stats.isBlockDevice.bind(stats); this.isCharacterDevice = stats.isCharacterDevice.bind(stats); this.isDirectory = stats.isDirectory.bind(stats); this.isFIFO = stats.isFIFO.bind(stats); this.isFile = stats.isFile.bind(stats); this.isSocket = stats.isSocket.bind(stats); this.isSymbolicLink = stats.isSymbolicLink.bind(stats); } } function createDirentFromStats(name, stats) { return new DirentFromStats(name, stats); } exports.createDirentFromStats = createDirentFromStats; /***/ }), /***/ 66582: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fs = void 0; const fs = __webpack_require__(70322); exports.fs = fs; /***/ }), /***/ 98980: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; const fs = __webpack_require__(35747); exports.FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, stat: fs.stat, lstatSync: fs.lstatSync, statSync: fs.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === undefined) { return exports.FILE_SYSTEM_ADAPTER; } return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); } exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), /***/ 66203: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.statSync = exports.stat = exports.Settings = void 0; const async = __webpack_require__(2654); const sync = __webpack_require__(88946); const settings_1 = __webpack_require__(18328); exports.Settings = settings_1.default; function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { async.read(path, getSettings(), optionsOrSettingsOrCallback); return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } exports.stat = stat; function statSync(path, optionsOrSettings) { const settings = getSettings(optionsOrSettings); return sync.read(path, settings); } exports.statSync = statSync; function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } return new settings_1.default(settingsOrOptions); } /***/ }), /***/ 2654: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.read = void 0; function read(path, settings, callback) { settings.fs.lstat(path, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; } if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { callSuccessCallback(callback, lstat); return; } settings.fs.stat(path, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); return; } callSuccessCallback(callback, lstat); return; } if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } callSuccessCallback(callback, stat); }); }); } exports.read = read; function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, result) { callback(null, result); } /***/ }), /***/ 88946: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.read = void 0; function read(path, settings) { const lstat = settings.fs.lstatSync(path); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { const stat = settings.fs.statSync(path); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } return stat; } catch (error) { if (!settings.throwErrorOnBrokenSymbolicLink) { return lstat; } throw error; } } exports.read = read; /***/ }), /***/ 18328: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs = __webpack_require__(98980); class Settings { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); this.fs = fs.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } _getValue(option, value) { return option !== null && option !== void 0 ? option : value; } } exports.default = Settings; /***/ }), /***/ 45439: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; const async_1 = __webpack_require__(9346); const stream_1 = __webpack_require__(40215); const sync_1 = __webpack_require__(64078); const settings_1 = __webpack_require__(48690); exports.Settings = settings_1.default; function walk(directory, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); return; } new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); } exports.walk = walk; function walkSync(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const provider = new sync_1.default(directory, settings); return provider.read(); } exports.walkSync = walkSync; function walkStream(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const provider = new stream_1.default(directory, settings); return provider.read(); } exports.walkStream = walkStream; function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.default) { return settingsOrOptions; } return new settings_1.default(settingsOrOptions); } /***/ }), /***/ 9346: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const async_1 = __webpack_require__(34714); class AsyncProvider { constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new async_1.default(this._root, this._settings); this._storage = []; } read(callback) { this._reader.onError((error) => { callFailureCallback(callback, error); }); this._reader.onEntry((entry) => { this._storage.push(entry); }); this._reader.onEnd(() => { callSuccessCallback(callback, this._storage); }); this._reader.read(); } } exports.default = AsyncProvider; function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, entries) { callback(null, entries); } /***/ }), /***/ 40215: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(92413); const async_1 = __webpack_require__(34714); class StreamProvider { constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new async_1.default(this._root, this._settings); this._stream = new stream_1.Readable({ objectMode: true, read: () => { }, destroy: () => { if (!this._reader.isDestroyed) { this._reader.destroy(); } } }); } read() { this._reader.onError((error) => { this._stream.emit('error', error); }); this._reader.onEntry((entry) => { this._stream.push(entry); }); this._reader.onEnd(() => { this._stream.push(null); }); this._reader.read(); return this._stream; } } exports.default = StreamProvider; /***/ }), /***/ 64078: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const sync_1 = __webpack_require__(79555); class SyncProvider { constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new sync_1.default(this._root, this._settings); } read() { return this._reader.read(); } } exports.default = SyncProvider; /***/ }), /***/ 34714: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const events_1 = __webpack_require__(28614); const fsScandir = __webpack_require__(55923); const fastq = __webpack_require__(10373); const common = __webpack_require__(26865); const reader_1 = __webpack_require__(85274); class AsyncReader extends reader_1.default { constructor(_root, _settings) { super(_root, _settings); this._settings = _settings; this._scandir = fsScandir.scandir; this._emitter = new events_1.EventEmitter(); this._queue = fastq(this._worker.bind(this), this._settings.concurrency); this._isFatalError = false; this._isDestroyed = false; this._queue.drain = () => { if (!this._isFatalError) { this._emitter.emit('end'); } }; } read() { this._isFatalError = false; this._isDestroyed = false; setImmediate(() => { this._pushToQueue(this._root, this._settings.basePath); }); return this._emitter; } get isDestroyed() { return this._isDestroyed; } destroy() { if (this._isDestroyed) { throw new Error('The reader is already destroyed'); } this._isDestroyed = true; this._queue.killAndDrain(); } onEntry(callback) { this._emitter.on('entry', callback); } onError(callback) { this._emitter.once('error', callback); } onEnd(callback) { this._emitter.once('end', callback); } _pushToQueue(directory, base) { const queueItem = { directory, base }; this._queue.push(queueItem, (error) => { if (error !== null) { this._handleError(error); } }); } _worker(item, done) { this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { if (error !== null) { done(error, undefined); return; } for (const entry of entries) { this._handleEntry(entry, item.base); } done(null, undefined); }); } _handleError(error) { if (this._isDestroyed || !common.isFatalError(this._settings, error)) { return; } this._isFatalError = true; this._isDestroyed = true; this._emitter.emit('error', error); } _handleEntry(entry, base) { if (this._isDestroyed || this._isFatalError) { return; } const fullpath = entry.path; if (base !== undefined) { entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); } } _emitEntry(entry) { this._emitter.emit('entry', entry); } } exports.default = AsyncReader; /***/ }), /***/ 26865: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; function isFatalError(settings, error) { if (settings.errorFilter === null) { return true; } return !settings.errorFilter(error); } exports.isFatalError = isFatalError; function isAppliedFilter(filter, value) { return filter === null || filter(value); } exports.isAppliedFilter = isAppliedFilter; function replacePathSegmentSeparator(filepath, separator) { return filepath.split(/[/\\]/).join(separator); } exports.replacePathSegmentSeparator = replacePathSegmentSeparator; function joinPathSegments(a, b, separator) { if (a === '') { return b; } /** * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). */ if (a.endsWith(separator)) { return a + b; } return a + separator + b; } exports.joinPathSegments = joinPathSegments; /***/ }), /***/ 85274: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const common = __webpack_require__(26865); class Reader { constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } } exports.default = Reader; /***/ }), /***/ 79555: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fsScandir = __webpack_require__(55923); const common = __webpack_require__(26865); const reader_1 = __webpack_require__(85274); class SyncReader extends reader_1.default { constructor() { super(...arguments); this._scandir = fsScandir.scandirSync; this._storage = []; this._queue = new Set(); } read() { this._pushToQueue(this._root, this._settings.basePath); this._handleQueue(); return this._storage; } _pushToQueue(directory, base) { this._queue.add({ directory, base }); } _handleQueue() { for (const item of this._queue.values()) { this._handleDirectory(item.directory, item.base); } } _handleDirectory(directory, base) { try { const entries = this._scandir(directory, this._settings.fsScandirSettings); for (const entry of entries) { this._handleEntry(entry, base); } } catch (error) { this._handleError(error); } } _handleError(error) { if (!common.isFatalError(this._settings, error)) { return; } throw error; } _handleEntry(entry, base) { const fullpath = entry.path; if (base !== undefined) { entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } if (common.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); } } _pushToStorage(entry) { this._storage.push(entry); } } exports.default = SyncReader; /***/ }), /***/ 48690: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const fsScandir = __webpack_require__(55923); class Settings { constructor(_options = {}) { this._options = _options; this.basePath = this._getValue(this._options.basePath, undefined); this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, pathSegmentSeparator: this._options.pathSegmentSeparator, stats: this._options.stats, throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink }); } _getValue(option, value) { return option !== null && option !== void 0 ? option : value; } } exports.default = Settings; /***/ }), /***/ 80657: /***/ ((module, exports) => { "use strict"; /// /// /// Object.defineProperty(exports, "__esModule", ({ value: true })); const typedArrayTypeNames = [ 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'BigInt64Array', 'BigUint64Array' ]; function isTypedArrayName(name) { return typedArrayTypeNames.includes(name); } const objectTypeNames = [ 'Function', 'Generator', 'AsyncGenerator', 'GeneratorFunction', 'AsyncGeneratorFunction', 'AsyncFunction', 'Observable', 'Array', 'Buffer', 'Object', 'RegExp', 'Date', 'Error', 'Map', 'Set', 'WeakMap', 'WeakSet', 'ArrayBuffer', 'SharedArrayBuffer', 'DataView', 'Promise', 'URL', 'HTMLElement', ...typedArrayTypeNames ]; function isObjectTypeName(name) { return objectTypeNames.includes(name); } const primitiveTypeNames = [ 'null', 'undefined', 'string', 'number', 'bigint', 'boolean', 'symbol' ]; function isPrimitiveTypeName(name) { return primitiveTypeNames.includes(name); } // eslint-disable-next-line @typescript-eslint/ban-types function isOfType(type) { return (value) => typeof value === type; } const { toString } = Object.prototype; const getObjectType = (value) => { const objectTypeName = toString.call(value).slice(8, -1); if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) { return 'HTMLElement'; } if (isObjectTypeName(objectTypeName)) { return objectTypeName; } return undefined; }; const isObjectOfType = (type) => (value) => getObjectType(value) === type; function is(value) { if (value === null) { return 'null'; } switch (typeof value) { case 'undefined': return 'undefined'; case 'string': return 'string'; case 'number': return 'number'; case 'boolean': return 'boolean'; case 'function': return 'Function'; case 'bigint': return 'bigint'; case 'symbol': return 'symbol'; default: } if (is.observable(value)) { return 'Observable'; } if (is.array(value)) { return 'Array'; } if (is.buffer(value)) { return 'Buffer'; } const tagType = getObjectType(value); if (tagType) { return tagType; } if (value instanceof String || value instanceof Boolean || value instanceof Number) { throw new TypeError('Please don\'t use object wrappers for primitive types'); } return 'Object'; } is.undefined = isOfType('undefined'); is.string = isOfType('string'); const isNumberType = isOfType('number'); is.number = (value) => isNumberType(value) && !is.nan(value); is.bigint = isOfType('bigint'); // eslint-disable-next-line @typescript-eslint/ban-types is.function_ = isOfType('function'); is.null_ = (value) => value === null; is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); is.boolean = (value) => value === true || value === false; is.symbol = isOfType('symbol'); is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value)); is.array = (value, assertion) => { if (!Array.isArray(value)) { return false; } if (!is.function_(assertion)) { return true; } return value.every(assertion); }; is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; }; is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value)); is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); }; is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); }; is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw); is.nativePromise = (value) => isObjectOfType('Promise')(value); const hasPromiseAPI = (value) => { var _a, _b; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch); }; is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); is.generatorFunction = isObjectOfType('GeneratorFunction'); is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction'; is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction'; // eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); is.regExp = isObjectOfType('RegExp'); is.date = isObjectOfType('Date'); is.error = isObjectOfType('Error'); is.map = (value) => isObjectOfType('Map')(value); is.set = (value) => isObjectOfType('Set')(value); is.weakMap = (value) => isObjectOfType('WeakMap')(value); is.weakSet = (value) => isObjectOfType('WeakSet')(value); is.int8Array = isObjectOfType('Int8Array'); is.uint8Array = isObjectOfType('Uint8Array'); is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); is.int16Array = isObjectOfType('Int16Array'); is.uint16Array = isObjectOfType('Uint16Array'); is.int32Array = isObjectOfType('Int32Array'); is.uint32Array = isObjectOfType('Uint32Array'); is.float32Array = isObjectOfType('Float32Array'); is.float64Array = isObjectOfType('Float64Array'); is.bigInt64Array = isObjectOfType('BigInt64Array'); is.bigUint64Array = isObjectOfType('BigUint64Array'); is.arrayBuffer = isObjectOfType('ArrayBuffer'); is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); is.dataView = isObjectOfType('DataView'); is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype; is.urlInstance = (value) => isObjectOfType('URL')(value); is.urlString = (value) => { if (!is.string(value)) { return false; } try { new URL(value); // eslint-disable-line no-new return true; } catch (_a) { return false; } }; // TODO: Use the `not` operator with a type guard here when it's available. // Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` is.truthy = (value) => Boolean(value); // Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` is.falsy = (value) => !value; is.nan = (value) => Number.isNaN(value); is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value); is.integer = (value) => Number.isInteger(value); is.safeInteger = (value) => Number.isSafeInteger(value); is.plainObject = (value) => { // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js if (toString.call(value) !== '[object Object]') { return false; } const prototype = Object.getPrototypeOf(value); return prototype === null || prototype === Object.getPrototypeOf({}); }; is.typedArray = (value) => isTypedArrayName(getObjectType(value)); const isValidLength = (value) => is.safeInteger(value) && value >= 0; is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); is.inRange = (value, range) => { if (is.number(range)) { return value >= Math.min(0, range) && value <= Math.max(range, 0); } if (is.array(range) && range.length === 2) { return value >= Math.min(...range) && value <= Math.max(...range); } throw new TypeError(`Invalid range: ${JSON.stringify(range)}`); }; const NODE_TYPE_ELEMENT = 1; const DOM_PROPERTIES_TO_CHECK = [ 'innerHTML', 'ownerDocument', 'style', 'attributes', 'nodeValue' ]; is.domElement = (value) => { return is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); }; is.observable = (value) => { var _a, _b, _c, _d; if (!value) { return false; } // eslint-disable-next-line no-use-extend-native/no-use-extend-native if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) { return true; } if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) { return true; } return false; }; is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value); is.infinite = (value) => value === Infinity || value === -Infinity; const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder; is.evenInteger = isAbsoluteMod2(0); is.oddInteger = isAbsoluteMod2(1); is.emptyArray = (value) => is.array(value) && value.length === 0; is.nonEmptyArray = (value) => is.array(value) && value.length > 0; is.emptyString = (value) => is.string(value) && value.length === 0; // TODO: Use `not ''` when the `not` operator is available. is.nonEmptyString = (value) => is.string(value) && value.length > 0; const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value); is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; // TODO: Use `not` operator here to remove `Map` and `Set` from type guard: // - https://github.com/Microsoft/TypeScript/pull/29317 is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0; is.emptySet = (value) => is.set(value) && value.size === 0; is.nonEmptySet = (value) => is.set(value) && value.size > 0; is.emptyMap = (value) => is.map(value) && value.size === 0; is.nonEmptyMap = (value) => is.map(value) && value.size > 0; const predicateOnArray = (method, predicate, values) => { if (!is.function_(predicate)) { throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); } if (values.length === 0) { throw new TypeError('Invalid number of values'); } return method.call(values, predicate); }; is.any = (predicate, ...values) => { const predicates = is.array(predicate) ? predicate : [predicate]; return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); }; is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); const assertType = (condition, description, value, options = {}) => { if (!condition) { const { multipleValues } = options; const valuesMessage = multipleValues ? `received values of types ${[ ...new Set(value.map(singleValue => `\`${is(singleValue)}\``)) ].join(', ')}` : `received value of type \`${is(value)}\``; throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`); } }; exports.assert = { // Unknowns. undefined: (value) => assertType(is.undefined(value), 'undefined', value), string: (value) => assertType(is.string(value), 'string', value), number: (value) => assertType(is.number(value), 'number', value), bigint: (value) => assertType(is.bigint(value), 'bigint', value), // eslint-disable-next-line @typescript-eslint/ban-types function_: (value) => assertType(is.function_(value), 'Function', value), null_: (value) => assertType(is.null_(value), 'null', value), class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value), boolean: (value) => assertType(is.boolean(value), 'boolean', value), symbol: (value) => assertType(is.symbol(value), 'symbol', value), numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value), array: (value, assertion) => { const assert = assertType; assert(is.array(value), 'Array', value); if (assertion) { value.forEach(assertion); } }, buffer: (value) => assertType(is.buffer(value), 'Buffer', value), nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value), object: (value) => assertType(is.object(value), 'Object', value), iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value), asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value), generator: (value) => assertType(is.generator(value), 'Generator', value), asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value), nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value), promise: (value) => assertType(is.promise(value), 'Promise', value), generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value), asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value), // eslint-disable-next-line @typescript-eslint/ban-types asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value), // eslint-disable-next-line @typescript-eslint/ban-types boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value), regExp: (value) => assertType(is.regExp(value), 'RegExp', value), date: (value) => assertType(is.date(value), 'Date', value), error: (value) => assertType(is.error(value), 'Error', value), map: (value) => assertType(is.map(value), 'Map', value), set: (value) => assertType(is.set(value), 'Set', value), weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value), weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value), int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value), uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value), uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value), int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value), uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value), int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value), uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value), float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value), float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value), bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value), bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value), arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value), sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value), dataView: (value) => assertType(is.dataView(value), 'DataView', value), urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value), urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value), truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value), falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value), nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value), primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value), integer: (value) => assertType(is.integer(value), "integer" /* integer */, value), safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value), plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value), typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value), arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value), domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value), observable: (value) => assertType(is.observable(value), 'Observable', value), nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value), infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value), emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value), nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value), emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value), nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value), emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value), emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value), nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value), emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value), nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value), emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value), nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value), // Numbers. evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value), oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value), // Two arguments. directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance), inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value), // Variadic functions. any: (predicate, ...values) => { return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true }); }, all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true }) }; // Some few keywords are reserved, but we'll populate them for Node.js users // See https://github.com/Microsoft/TypeScript/issues/2536 Object.defineProperties(is, { class: { value: is.class_ }, function: { value: is.function_ }, null: { value: is.null_ } }); Object.defineProperties(exports.assert, { class: { value: exports.assert.class_ }, function: { value: exports.assert.function_ }, null: { value: exports.assert.null_ } }); exports.default = is; // For CommonJS default export support module.exports = is; module.exports.default = is; module.exports.assert = exports.assert; /***/ }), /***/ 65266: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.legacyCommon = exports.legacyMonitor = exports.legacyPlugin = void 0; const legacy_1 = __webpack_require__(83888); Object.defineProperty(exports, "legacyPlugin", ({ enumerable: true, get: function () { return legacy_1.plugin; } })); Object.defineProperty(exports, "legacyMonitor", ({ enumerable: true, get: function () { return legacy_1.monitor; } })); Object.defineProperty(exports, "legacyCommon", ({ enumerable: true, get: function () { return legacy_1.common; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 78752: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); //# sourceMappingURL=common.js.map /***/ }), /***/ 83888: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.common = exports.monitor = exports.plugin = void 0; const plugin = __webpack_require__(88904); exports.plugin = plugin; const monitor = __webpack_require__(65861); exports.monitor = monitor; const common = __webpack_require__(78752); exports.common = common; //# sourceMappingURL=index.js.map /***/ }), /***/ 65861: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); //# sourceMappingURL=monitor.js.map /***/ }), /***/ 88904: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isMultiResult = exports.isMultiSubProject = exports.adaptSingleProjectPlugin = void 0; function adaptSingleProjectPlugin(plugin) { return { inspect: (root, targetFile, options) => { if (options && isMultiSubProject(options)) { const name = plugin.pluginName ? plugin.pluginName() : '[unknown]'; throw new Error(`Plugin ${name} does not support scanning multiple sub-projects`); } else { return plugin.inspect(root, targetFile, options); } } }; } exports.adaptSingleProjectPlugin = adaptSingleProjectPlugin; function isMultiSubProject(options) { return options.allSubProjects; } exports.isMultiSubProject = isMultiSubProject; function isMultiResult(res) { return !!res.scannedProjects; } exports.isMultiResult = isMultiResult; //# sourceMappingURL=plugin.js.map /***/ }), /***/ 84537: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const lockfile_parser_1 = __webpack_require__(7023); exports.LockfileParser = lockfile_parser_1.default; //# sourceMappingURL=index.js.map /***/ }), /***/ 7023: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const yaml = __webpack_require__(93320); const dep_graph_1 = __webpack_require__(71479); const utils_1 = __webpack_require__(43033); class LockfileParser { constructor(hash, rootPkgInfo) { this.rootPkgInfo = undefined; this.rootPkgInfo = rootPkgInfo; this.internalData = hash; } static async readFile(lockfilePath) { const rootName = path.basename(path.dirname(path.resolve(lockfilePath))); return new Promise((resolve, reject) => { fs.readFile(lockfilePath, { encoding: 'utf8' }, (err, fileContents) => { if (err) { reject(err); } try { const parser = this.readContents(fileContents, { name: rootName, version: '0.0.0', }); resolve(parser); } catch (err) { reject(err); } }); }); } static readFileSync(lockfilePath) { const fileContents = fs.readFileSync(lockfilePath, 'utf8'); const rootName = path.basename(path.dirname(path.resolve(lockfilePath))); return this.readContents(fileContents, { name: rootName, version: '0.0.0', }); } static readContents(contents, rootPkgInfo) { return new LockfileParser(yaml.safeLoad(contents), rootPkgInfo); } toDepGraph() { const builder = new dep_graph_1.DepGraphBuilder(this.pkgManager, this.rootPkgInfo); const allDeps = {}; // Add all package nodes first, but collect dependencies this.internalData.PODS.forEach((elem) => { let pkgInfo; let pkgDeps; if (typeof elem === 'string') { // When there are NO dependencies. This equals in yaml e.g. // - Expecta (1.0.5) pkgInfo = utils_1.pkgInfoFromSpecificationString(elem); pkgDeps = []; } else { // When there are dependencies. This equals in yaml e.g. // - React/Core (0.59.2): // - yoga (= 0.59.2.React) const objKey = Object.keys(elem)[0]; pkgInfo = utils_1.pkgInfoFromSpecificationString(objKey); pkgDeps = elem[objKey].map(utils_1.pkgInfoFromDependencyString); } const nodeId = this.nodeIdForPkgInfo(pkgInfo); builder.addPkgNode(pkgInfo, nodeId, { labels: this.nodeInfoLabelsForPod(pkgInfo.name), }); allDeps[nodeId] = pkgDeps; }); // Connect explicitly in the manifest (`Podfile`) // declared dependencies to the root node. this.internalData.DEPENDENCIES.map(utils_1.pkgInfoFromDependencyString).forEach((pkgInfo) => { builder.connectDep(builder.rootNodeId, this.nodeIdForPkgInfo(pkgInfo)); }); // Now we can start to connect dependencies Object.entries(allDeps).forEach(([nodeId, pkgDeps]) => pkgDeps.forEach((pkgInfo) => { const depNodeId = this.nodeIdForPkgInfo(pkgInfo); if (!allDeps[depNodeId]) { // The pod is not a direct dependency of any targets of the integration, // which can happen for platform-specific transitives, when their platform // is not used in any target. (e.g. PromiseKit/UIKit is iOS-specific and is // a transitive of PromiseKit, but won't be included for a macOS project.) return; } builder.connectDep(nodeId, depNodeId); })); return builder.build(); } /// CocoaPods guarantees that every pod is only present in one version, /// so we can use just the pod name as node ID. nodeIdForPkgInfo(pkgInfo) { return pkgInfo.name; } /// Gathers relevant info from the lockfile and transform /// them into the expected labels data structure. nodeInfoLabelsForPod(podName) { let nodeInfoLabels = { checksum: this.checksumForPod(podName), }; const repository = this.repositoryForPod(podName); if (repository) { nodeInfoLabels = Object.assign(Object.assign({}, nodeInfoLabels), { repository }); } const externalSourceInfo = this.externalSourceInfoForPod(podName); if (externalSourceInfo) { nodeInfoLabels = Object.assign(Object.assign({}, nodeInfoLabels), { externalSourcePodspec: externalSourceInfo[':podspec'], externalSourcePath: externalSourceInfo[':path'], externalSourceGit: externalSourceInfo[':git'], externalSourceTag: externalSourceInfo[':tag'], externalSourceCommit: externalSourceInfo[':commit'], externalSourceBranch: externalSourceInfo[':branch'] }); } const checkoutOptions = this.checkoutOptionsForPod(podName); if (checkoutOptions) { nodeInfoLabels = Object.assign(Object.assign({}, nodeInfoLabels), { checkoutOptionsPodspec: checkoutOptions[':podspec'], checkoutOptionsPath: checkoutOptions[':path'], checkoutOptionsGit: checkoutOptions[':git'], checkoutOptionsTag: checkoutOptions[':tag'], checkoutOptionsCommit: checkoutOptions[':commit'], checkoutOptionsBranch: checkoutOptions[':branch'] }); } // Sanitize labels by removing null fields // (as they don't survive a serialization/parse cycle and break tests) Object.entries(nodeInfoLabels).forEach(([key, value]) => { if (value === null || value === undefined) { delete nodeInfoLabels[key]; } }); return nodeInfoLabels; } /// The checksum of the pod. checksumForPod(podName) { const rootName = utils_1.rootSpecName(podName); return this.internalData['SPEC CHECKSUMS'][rootName]; } /// This can be either an URL or the local repository name. repositoryForPod(podName) { // Older Podfile.lock might not have this section yet. const specRepos = this.internalData['SPEC REPOS']; if (!specRepos) { return undefined; } const rootName = utils_1.rootSpecName(podName); const specRepoEntry = Object.entries(specRepos).find(([, deps]) => deps.includes(rootName)); if (specRepoEntry) { return specRepoEntry[0]; } return undefined; } /// Extracts the external source info for a given pod, if there is any. externalSourceInfoForPod(podName) { // Older Podfile.lock might not have this section yet. const externalSources = this.internalData['EXTERNAL SOURCES']; if (!externalSources) { return undefined; } const externalSourceEntry = externalSources[utils_1.rootSpecName(podName)]; if (externalSourceEntry) { return externalSourceEntry; } return undefined; } /// Extracts the checkout options for a given pod, if there is any. checkoutOptionsForPod(podName) { // Older Podfile.lock might not have this section yet. const checkoutOptions = this.internalData['CHECKOUT OPTIONS']; if (!checkoutOptions) { return undefined; } const checkoutOptionsEntry = checkoutOptions[utils_1.rootSpecName(podName)]; if (checkoutOptionsEntry) { return checkoutOptionsEntry; } return undefined; } get repositories() { // Older Podfile.lock might not have this section yet. const specRepos = this.internalData['SPEC REPOS']; if (!specRepos) { return []; } return Object.keys(specRepos).map((nameOrUrl) => { return { alias: nameOrUrl }; }); } get pkgManager() { return { name: 'cocoapods', version: this.cocoapodsVersion, repositories: this.repositories, }; } /// The CocoaPods version encoded in the lockfile which was used to /// create this resolution. get cocoapodsVersion() { return this.internalData.COCOAPODS || 'unknown'; } /// The checksum of the Podfile, which was used when resolving this integration. /// - Note: this was not tracked by earlier versions of CocoaPods. get podfileChecksum() { return this.internalData['PODFILE CHECKSUM']; } } exports.default = LockfileParser; //# sourceMappingURL=lockfile-parser.js.map /***/ }), /***/ 43033: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /// e.g. Adjust (4.17.1) /// Adjust/Core (4.17.1) function pkgInfoFromSpecificationString(stringRepresentation) { const match = stringRepresentation.match(/^((?:\s?[^\s(])+)(?: \((.+)\))?$/); if (!match) { throw new Error('Invalid string representation for a ' + `specification: \`${stringRepresentation}\`. ` + 'The string representation should include the name and ' + 'optionally the version of the Pod.'); } return { name: match[1], version: match[2] }; } exports.pkgInfoFromSpecificationString = pkgInfoFromSpecificationString; /// e.g. Expecta /// ReactiveObjC (~> 2.0) /// Pulley (from `https://github.com/l2succes/Pulley.git`, branch `master`) function pkgInfoFromDependencyString(stringRepresentation) { const match = stringRepresentation.match(/^((?:\s?[^\s(])+)(?: \((.+)\))?$/); if (!match) { throw new Error('Invalid string representation for a ' + `dependency: \`${stringRepresentation}\`. ` + 'The string representation should include the name and ' + 'a requirement of which version of the Pod should be used.'); } if (!match[2] || match[2].match(/from `(.*)(`|')/)) { return { name: match[1] }; } return { name: match[1], version: match[2] }; } exports.pkgInfoFromDependencyString = pkgInfoFromDependencyString; /// Returns the root spec name, if the given specification name /// is a subspec or just the same name. function rootSpecName(specName) { return specName.split('/')[0]; } exports.rootSpecName = rootSpecName; //# sourceMappingURL=utils.js.map /***/ }), /***/ 54151: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.extendAnalysis = exports.analyzeFolders = exports.analyzeBundle = void 0; /* eslint-disable no-await-in-loop */ const lodash_omit_1 = __importDefault(__webpack_require__(76427)); const uuid_1 = __webpack_require__(42277); const files_1 = __webpack_require__(32083); const constants_1 = __webpack_require__(65765); const http_1 = __webpack_require__(60776); const bundles_1 = __webpack_require__(86639); const emitter_1 = __webpack_require__(37544); const sleep = (duration) => new Promise(resolve => setTimeout(resolve, duration)); async function pollAnalysis(options) { let analysisResponse; let analysisData; emitter_1.emitter.analyseProgress({ status: http_1.AnalysisStatus.waiting, progress: 0, }); // eslint-disable-next-line no-constant-condition while (true) { analysisResponse = await (0, http_1.getAnalysis)(options); if (analysisResponse.type === 'error') { return analysisResponse; } analysisData = analysisResponse.value; if (analysisData.status === http_1.AnalysisStatus.waiting || analysisData.status === http_1.AnalysisStatus.fetching || analysisData.status === http_1.AnalysisStatus.analyzing || analysisData.status === http_1.AnalysisStatus.done) { // Report progress of fetching emitter_1.emitter.analyseProgress(analysisData); } else if (analysisData.status === http_1.AnalysisStatus.complete) { // Return data of analysis return analysisResponse; // deepcode ignore DuplicateIfBody: false positive it seems that interface is not taken into account } else if (analysisData.status === http_1.AnalysisStatus.failed) { // Report failure of analysing return analysisResponse; } await sleep(constants_1.POLLING_INTERVAL); } } async function analyzeBundle(options) { // Call remote bundle for analysis results and emit intermediate progress const analysisData = await pollAnalysis(options); if (analysisData.type === 'error') { throw analysisData.error; } else if (analysisData.value.status === http_1.AnalysisStatus.failed) { throw new Error('Analysis has failed'); } return analysisData.value; } exports.analyzeBundle = analyzeBundle; function normalizeResultFiles(files, baseDir) { return Object.entries(files).reduce((obj, [path, positions]) => { const filePath = (0, files_1.resolveBundleFilePath)(baseDir, path); obj[filePath] = positions; return obj; }, {}); } async function analyzeFolders(options) { if (!options.connection.requestId) { options.connection.requestId = (0, uuid_1.v4)(); } const fileBundle = await (0, bundles_1.createBundleFromFolders)({ ...options.connection, ...options.fileOptions, languages: options.languages, }); if (fileBundle === null) return null; // Analyze bundle const analysisResults = await analyzeBundle({ bundleHash: fileBundle.bundleHash, ...options.connection, ...options.analysisOptions, shard: (0, files_1.calcHash)(fileBundle.baseDir), ...(options.analysisContext ? { analysisContext: options.analysisContext } : {}), }); if (analysisResults.type === 'legacy') { // expand relative file names to absolute ones only for legacy results analysisResults.files = normalizeResultFiles(analysisResults.files, fileBundle.baseDir); } return { fileBundle, analysisResults, ...options }; } exports.analyzeFolders = analyzeFolders; function mergeBundleResults(oldAnalysisResults, newAnalysisResults, limitToFiles, removedFiles = [], baseDir) { if (newAnalysisResults.type == 'sarif') { return mergeSarifResults(oldAnalysisResults, newAnalysisResults, limitToFiles, removedFiles); } return mergeLegacyResults(oldAnalysisResults, newAnalysisResults, limitToFiles, removedFiles, baseDir); } function mergeSarifResults(oldAnalysisResults, newAnalysisResults, limitToFiles, removedFiles = []) { // Start from the new analysis results // For each finding of the old analysis, // if it's location is not part of the limitToFiles or removedFiles (removedFiles should also be checked against condeFlow), // append the finding to the new analysis and check if the rule must be added as well const changedFiles = [...limitToFiles, ...removedFiles]; const sarifResults = (newAnalysisResults.sarif.runs[0].results || []).filter(res => { var _a, _b, _c; // TODO: This should not be necessary in theory but, in case of two identical files, // Bundle Server returns the finding in both files even if limitToFiles only reports one const loc = (_c = (_b = (_a = res.locations) === null || _a === void 0 ? void 0 : _a[0].physicalLocation) === null || _b === void 0 ? void 0 : _b.artifactLocation) === null || _c === void 0 ? void 0 : _c.uri; return loc && changedFiles.includes(loc); }); const sarifRules = newAnalysisResults.sarif.runs[0].tool.driver.rules || []; const oldResults = oldAnalysisResults.sarif.runs[0].results || []; for (const res of oldResults) { // NOTE: Node 10 doesn't support the more readable .flatMap, so we need to use .reduce, but the behaviour would be the following: // const locations: string[] = (res.locations || []).flatMap( // loc => !!loc.physicalLocation?.artifactLocation?.uri ? [loc.physicalLocation.artifactLocation.uri] : [] // ); // const codeFlowLocations: string[] = (res.codeFlows || []).flatMap( // cf => (cf.threadFlows || []).flatMap( // tf => (tf.locations || []).flatMap( // loc => !!loc.location?.physicalLocation?.artifactLocation?.uri ? [loc.location.physicalLocation.artifactLocation.uri] : [] // ) // ) // ); const locations = (res.locations || []).reduce((acc, loc) => { var _a, _b; if ((_b = (_a = loc.physicalLocation) === null || _a === void 0 ? void 0 : _a.artifactLocation) === null || _b === void 0 ? void 0 : _b.uri) { acc.push(loc.physicalLocation.artifactLocation.uri); } return acc; }, []); const codeFlowLocations = (res.codeFlows || []).reduce((acc1, cf) => { acc1.push(...(cf.threadFlows || []).reduce((acc2, tf) => { acc2.push(...(tf.locations || []).reduce((acc3, loc) => { var _a, _b, _c; if ((_c = (_b = (_a = loc.location) === null || _a === void 0 ? void 0 : _a.physicalLocation) === null || _b === void 0 ? void 0 : _b.artifactLocation) === null || _c === void 0 ? void 0 : _c.uri) { acc3.push(loc.location.physicalLocation.artifactLocation.uri); } return acc3; }, [])); return acc2; }, [])); return acc1; }, []); if (locations.some(loc => changedFiles.includes(loc)) || codeFlowLocations.some(loc => removedFiles.includes(loc))) continue; let ruleIndex = sarifRules.findIndex(rule => rule.id === res.ruleId); if (ruleIndex === -1 && res.ruleIndex && oldAnalysisResults.sarif.runs[0].tool.driver.rules && oldAnalysisResults.sarif.runs[0].tool.driver.rules[res.ruleIndex]) { const newLength = sarifRules.push(oldAnalysisResults.sarif.runs[0].tool.driver.rules[res.ruleIndex]); ruleIndex = newLength - 1; } res.ruleIndex = ruleIndex; sarifResults.push(res); } newAnalysisResults.sarif.runs[0].results = sarifResults; newAnalysisResults.sarif.runs[0].tool.driver.rules = sarifRules; return newAnalysisResults; } const moveSuggestionIndexes = (suggestionIndex, suggestions) => { const entries = Object.entries(suggestions); return entries.reduce((obj, [i, s]) => { obj[`${parseInt(i, 10) + suggestionIndex + 1}`] = s; return obj; }, {}); }; function mergeLegacyResults(oldAnalysisResults, newAnalysisResults, limitToFiles, removedFiles = [], baseDir) { // expand relative file names to absolute ones only for legacy results newAnalysisResults.files = normalizeResultFiles(newAnalysisResults.files, baseDir); // Determine max suggestion index in our data const suggestionIndex = Math.max(...Object.keys(oldAnalysisResults.suggestions).map(i => parseInt(i, 10))) || -1; // Addup all new suggestions' indexes const newSuggestions = moveSuggestionIndexes(suggestionIndex, newAnalysisResults.suggestions); const suggestions = { ...oldAnalysisResults.suggestions, ...newSuggestions }; const newFiles = Object.entries(newAnalysisResults.files).reduce((obj, [fn, s]) => { obj[fn] = moveSuggestionIndexes(suggestionIndex, s); return obj; }, {}); // expand relative file names to absolute ones only for legacy results const changedFiles = [...limitToFiles, ...removedFiles].map(path => (0, files_1.resolveBundleFilePath)(baseDir, path)); const files = { ...(0, lodash_omit_1.default)(oldAnalysisResults.files, changedFiles), ...newFiles, }; return { ...newAnalysisResults, files, suggestions, }; } async function extendAnalysis(options) { const { files, removedFiles } = await (0, files_1.prepareExtendingBundle)(options.fileBundle.baseDir, options.fileBundle.supportedFiles, options.fileBundle.fileIgnores, options.files, options.fileOptions.symlinksEnabled); if (!files.length && !removedFiles.length) { return null; // nothing to extend, just return null } // Extend remote bundle const remoteBundle = await (0, bundles_1.remoteBundleFactory)({ ...options.connection, bundleHash: options.fileBundle.bundleHash, baseDir: options.fileBundle.baseDir, files, removedFiles, }); if (remoteBundle === null) return null; const fileBundle = { ...options.fileBundle, ...remoteBundle, }; const limitToFiles = files.map(f => f.bundlePath); let analysisResults = await analyzeBundle({ bundleHash: remoteBundle.bundleHash, ...options.connection, ...options.analysisOptions, shard: (0, files_1.calcHash)(fileBundle.baseDir), limitToFiles, }); analysisResults = mergeBundleResults(options.analysisResults, analysisResults, limitToFiles, removedFiles, options.fileBundle.baseDir); return { ...options, fileBundle, analysisResults }; } exports.extendAnalysis = extendAnalysis; //# sourceMappingURL=analysis.js.map /***/ }), /***/ 86639: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createBundleFromFolders = exports.remoteBundleFactory = exports.uploadRemoteBundle = void 0; /* eslint-disable no-await-in-loop */ const lodash_pick_1 = __importDefault(__webpack_require__(25030)); const lodash_omit_1 = __importDefault(__webpack_require__(76427)); const p_map_1 = __importDefault(__webpack_require__(49503)); const files_1 = __webpack_require__(32083); const http_1 = __webpack_require__(60776); const constants_1 = __webpack_require__(65765); const emitter_1 = __webpack_require__(37544); async function* prepareRemoteBundle(options) { let response; let { bundleHash } = options; let cumulativeProgress = 0; emitter_1.emitter.createBundleProgress(cumulativeProgress, options.files.length); for (const chunkedFiles of (0, files_1.composeFilePayloads)(options.files, constants_1.MAX_PAYLOAD)) { const apiParams = { ...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'removedFiles', 'requestId', 'base64Encoding']), files: chunkedFiles.reduce((d, f) => { // deepcode ignore PrototypePollution: FP this is an internal code d[f.bundlePath] = f.hash; return d; }, {}), }; if (!bundleHash) { // eslint-disable-next-line no-await-in-loop response = await (0, http_1.createBundle)(apiParams); } else { // eslint-disable-next-line no-await-in-loop response = await (0, http_1.extendBundle)({ bundleHash, ...apiParams }); } cumulativeProgress += chunkedFiles.length; emitter_1.emitter.createBundleProgress(cumulativeProgress, options.files.length); if (response.type === 'error') { // TODO: process Error yield response; break; } bundleHash = response.value.bundleHash; yield response; } } /** * Splits files in buckets and upload in parallel * @param baseURL * @param sessionToken * @param remoteBundle */ async function uploadRemoteBundle(options) { let uploadedFiles = 0; emitter_1.emitter.uploadBundleProgress(0, options.files.length); const apiParams = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'bundleHash', 'requestId', 'base64Encoding']); const uploadFileChunks = async (bucketFiles) => { // Note: we specifically create __new__ isolated bundles here to faster files upload const resp = await (0, http_1.createBundle)({ ...apiParams, files: bucketFiles.reduce((d, f) => { d[f.bundlePath] = (0, lodash_pick_1.default)(f, ['hash', 'content']); return d; }, {}), }); if (resp.type !== 'error') { uploadedFiles += bucketFiles.length; emitter_1.emitter.uploadBundleProgress(uploadedFiles, options.files.length); } }; const files = []; for (const bucketFiles of (0, files_1.composeFilePayloads)(options.files, constants_1.MAX_PAYLOAD)) { files.push(bucketFiles); } await (0, p_map_1.default)(files, async (task) => await uploadFileChunks(task), { concurrency: constants_1.UPLOAD_CONCURRENCY, }); } exports.uploadRemoteBundle = uploadRemoteBundle; async function fullfillRemoteBundle(options) { // Fulfill remote bundle by uploading only missing files (splitted in chunks) // Check remove bundle to make sure no missing files left let attempts = 0; let { remoteBundle } = options; const connectionOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'base64Encoding']); while (remoteBundle.missingFiles.length && attempts < (options.maxAttempts || constants_1.MAX_UPLOAD_ATTEMPTS)) { const missingFiles = await (0, files_1.resolveBundleFiles)(options.baseDir, remoteBundle.missingFiles); await uploadRemoteBundle({ ...connectionOptions, bundleHash: remoteBundle.bundleHash, files: missingFiles, }); const bundleResponse = await (0, http_1.checkBundle)({ ...connectionOptions, bundleHash: remoteBundle.bundleHash }); if (bundleResponse.type === 'error') { throw new Error('Failed to get remote bundle'); } // eslint-disable-next-line no-param-reassign remoteBundle = bundleResponse.value; attempts += 1; } return remoteBundle; } async function remoteBundleFactory(options) { let remoteBundle = null; const baseOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'baseDir', 'requestId', 'base64Encoding']); const bundleFactory = prepareRemoteBundle((0, lodash_omit_1.default)(options, ['baseDir'])); for await (const response of bundleFactory) { if (response.type === 'error') { throw response.error; } remoteBundle = await fullfillRemoteBundle({ ...baseOptions, remoteBundle: response.value }); if (remoteBundle.missingFiles.length) { throw new Error(`Failed to upload # files: ${remoteBundle.missingFiles.length}`); } } return remoteBundle; } exports.remoteBundleFactory = remoteBundleFactory; /** * Get supported filters and test baseURL for correctness and availability * * @param baseURL * @param source * @returns */ async function getSupportedFiles(baseURL, source, requestId, languages) { emitter_1.emitter.supportedFilesLoaded(null); const resp = await (0, http_1.getFilters)(baseURL, source, undefined, requestId); if (resp.type === 'error') { throw resp.error; } const supportedFilesFromApi = resp.value; //Given supported languages from 'registy' if (languages) { const supportedFiles = {}; supportedFiles.configFiles = supportedFilesFromApi.configFiles; supportedFiles.extensions = languages; //For verification only supportedFiles.extensions = supportedFiles.extensions.filter(langExtension => supportedFilesFromApi.extensions.includes(langExtension)); emitter_1.emitter.supportedFilesLoaded(supportedFiles); return supportedFiles; } emitter_1.emitter.supportedFilesLoaded(supportedFilesFromApi); return supportedFilesFromApi; } /** * Creates a remote bundle and returns response from the bundle API * * @param {CreateBundleFromFoldersOptions} options * @returns {Promise} */ async function createBundleFromFolders(options) { const baseDir = (0, files_1.determineBaseDir)(options.paths); const [supportedFiles, fileIgnores] = await Promise.all([ // Fetch supporte files to save network traffic getSupportedFiles(options.baseURL, options.source, options.requestId, options.languages), // Scan for custom ignore rules (0, files_1.collectIgnoreRules)(options.paths, options.symlinksEnabled, options.defaultFileIgnores), ]); emitter_1.emitter.scanFilesProgress(0); const bundleFiles = []; const skippedOversizedFiles = []; let totalFiles = 0; const bundleFileCollector = (0, files_1.collectBundleFiles)({ ...(0, lodash_pick_1.default)(options, ['paths', 'symlinksEnabled']), baseDir, fileIgnores, supportedFiles, }); for await (const f of bundleFileCollector) { typeof f == 'string' ? skippedOversizedFiles.push(f) : bundleFiles.push(f); totalFiles += 1; emitter_1.emitter.scanFilesProgress(totalFiles); } const bundleOptions = { ...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'base64Encoding']), baseDir, files: bundleFiles, }; // Create remote bundle if (!bundleFiles.length) return null; const remoteBundle = await remoteBundleFactory(bundleOptions); if (remoteBundle === null) return null; return { ...remoteBundle, baseDir, supportedFiles, fileIgnores, skippedOversizedFiles, }; } exports.createBundleFromFolders = createBundleFromFolders; //# sourceMappingURL=bundles.js.map /***/ }), /***/ 27234: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readJSON = exports.Cache = void 0; //This is our own implementation of flat-cache without the use of flattened as we do not need cicular JSON support //and the executable for flattened was broken const path_1 = __importDefault(__webpack_require__(85622)); const fs_1 = __importDefault(__webpack_require__(35747)); class Cache { constructor(docId, cacheDir) { this.visited = {}; this.persisted = {}; this.pathToFile = ''; this.pathToFile = cacheDir ? path_1.default.resolve(cacheDir, docId) : path_1.default.resolve(__dirname, '../.cache/', docId); if (fs_1.default.existsSync(this.pathToFile)) { this.persisted = tryParse(this.pathToFile, {}); } } save(noPrune = false) { !noPrune && this.prune(); writeJSON(this.pathToFile, this.persisted); } getKey(key) { this.visited[key] = true; return this.persisted[key]; } setKey(key, value) { this.visited[key] = true; this.persisted[key] = value; } prune() { const obj = {}; const keys = Object.keys(this.visited); // no keys visited for either get or set value if (keys.length === 0) { return; } keys.forEach(key => { obj[key] = this.persisted[key]; }); this.visited = {}; this.persisted = obj; } } exports.Cache = Cache; function writeJSON(filePath, data) { fs_1.default.mkdirSync(path_1.default.dirname(filePath), { recursive: true, }); fs_1.default.writeFileSync(filePath, JSON.stringify(data)); } function tryParse(filePath, defaultValue) { let result; try { result = readJSON(filePath); } catch (ex) { result = defaultValue; } return result; } function readJSON(filePath) { return JSON.parse(fs_1.default.readFileSync(filePath, { encoding: 'utf8', })); } exports.readJSON = readJSON; //# sourceMappingURL=cache.js.map /***/ }), /***/ 65765: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_ERROR_MESSAGES = exports.NETWORK_ERRORS = exports.ErrorCodes = exports.DCIGNORE_DRAFTS = exports.IGNORE_FILES_NAMES = exports.IGNORES_DEFAULT = exports.REQUEST_RETRY_DELAY = exports.MAX_RETRY_ATTEMPTS = exports.POLLING_INTERVAL = exports.UPLOAD_CONCURRENCY = exports.MAX_UPLOAD_ATTEMPTS = exports.CACHE_KEY = exports.EXCLUDED_NAMES = exports.DOTSNYK_FILENAME = exports.DCIGNORE_FILENAME = exports.GITIGNORE_FILENAME = exports.GIT_FILENAME = exports.ENCODE_TYPE = exports.HASH_ALGORITHM = exports.MAX_FILE_SIZE = exports.MAX_PAYLOAD = void 0; const dcignore_1 = __webpack_require__(55086); exports.MAX_PAYLOAD = 4 * 1024 * 1024; exports.MAX_FILE_SIZE = 1024 * 1024; exports.HASH_ALGORITHM = 'sha256'; exports.ENCODE_TYPE = 'hex'; exports.GIT_FILENAME = '.git'; exports.GITIGNORE_FILENAME = '.gitignore'; exports.DCIGNORE_FILENAME = '.dcignore'; exports.DOTSNYK_FILENAME = '.snyk'; exports.EXCLUDED_NAMES = [exports.GIT_FILENAME, exports.GITIGNORE_FILENAME, exports.DCIGNORE_FILENAME]; exports.CACHE_KEY = '.dccache'; exports.MAX_UPLOAD_ATTEMPTS = 10; exports.UPLOAD_CONCURRENCY = 2; exports.POLLING_INTERVAL = 500; exports.MAX_RETRY_ATTEMPTS = 10; // Request retries on network errors exports.REQUEST_RETRY_DELAY = 5 * 1000; // delay between retries in milliseconds exports.IGNORES_DEFAULT = [`**/${exports.GIT_FILENAME}/**`]; exports.IGNORE_FILES_NAMES = [exports.GITIGNORE_FILENAME, exports.DCIGNORE_FILENAME, exports.DOTSNYK_FILENAME]; exports.DCIGNORE_DRAFTS = { custom: dcignore_1.CustomDCIgnore, default: dcignore_1.DefaultDCIgnore, }; // eslint-disable-next-line no-shadow var ErrorCodes; (function (ErrorCodes) { ErrorCodes[ErrorCodes["loginInProgress"] = 304] = "loginInProgress"; ErrorCodes[ErrorCodes["badRequest"] = 400] = "badRequest"; ErrorCodes[ErrorCodes["unauthorizedUser"] = 401] = "unauthorizedUser"; ErrorCodes[ErrorCodes["unauthorizedBundleAccess"] = 403] = "unauthorizedBundleAccess"; ErrorCodes[ErrorCodes["notFound"] = 404] = "notFound"; ErrorCodes[ErrorCodes["bigPayload"] = 413] = "bigPayload"; ErrorCodes[ErrorCodes["connectionRefused"] = 421] = "connectionRefused"; ErrorCodes[ErrorCodes["dnsNotFound"] = 452] = "dnsNotFound"; ErrorCodes[ErrorCodes["serverError"] = 500] = "serverError"; ErrorCodes[ErrorCodes["badGateway"] = 502] = "badGateway"; ErrorCodes[ErrorCodes["serviceUnavailable"] = 503] = "serviceUnavailable"; ErrorCodes[ErrorCodes["timeout"] = 504] = "timeout"; })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {})); exports.NETWORK_ERRORS = { ETIMEDOUT: ErrorCodes.timeout, ECONNREFUSED: ErrorCodes.connectionRefused, ECONNRESET: ErrorCodes.connectionRefused, ENETUNREACH: ErrorCodes.connectionRefused, ENOTFOUND: ErrorCodes.dnsNotFound, }; exports.DEFAULT_ERROR_MESSAGES = { [ErrorCodes.serverError]: 'Unexpected server error', [ErrorCodes.badGateway]: 'Bad gateway', [ErrorCodes.serviceUnavailable]: 'Service unavailable', [ErrorCodes.timeout]: 'Timeout occured. Try again later.', [ErrorCodes.dnsNotFound]: '[Connection issue] Could not resolve domain', [ErrorCodes.connectionRefused]: '[Connection issue] Connection refused', [ErrorCodes.loginInProgress]: 'Login has not been confirmed yet', [ErrorCodes.badRequest]: 'Bad request', [ErrorCodes.unauthorizedUser]: 'Missing, revoked or inactive token', [ErrorCodes.unauthorizedBundleAccess]: 'Unauthorized access to requested bundle analysis', [ErrorCodes.notFound]: 'Not found', [ErrorCodes.bigPayload]: `Payload too large (max is ${exports.MAX_PAYLOAD}b)`, }; //# sourceMappingURL=constants.js.map /***/ }), /***/ 37544: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.emitter = exports.EmitterDC = void 0; const events_1 = __webpack_require__(28614); // eslint-disable-next-line no-shadow var CUSTOM_EVENTS; (function (CUSTOM_EVENTS) { CUSTOM_EVENTS["supportedFilesLoaded"] = "supportedFilesLoaded"; CUSTOM_EVENTS["scanFilesProgress"] = "scanFilesProgress"; CUSTOM_EVENTS["createBundleProgress"] = "createBundleProgress"; CUSTOM_EVENTS["uploadBundleProgress"] = "uploadBundleProgress"; CUSTOM_EVENTS["analyseProgress"] = "analyseProgress"; CUSTOM_EVENTS["apiRequestLog"] = "apiRequestLog"; CUSTOM_EVENTS["error"] = "error"; })(CUSTOM_EVENTS || (CUSTOM_EVENTS = {})); class EmitterDC extends events_1.EventEmitter { constructor() { super(...arguments); this.events = CUSTOM_EVENTS; } supportedFilesLoaded(data) { this.emit(CUSTOM_EVENTS.supportedFilesLoaded, data); } scanFilesProgress(processed) { this.emit(CUSTOM_EVENTS.scanFilesProgress, processed); } createBundleProgress(processed, total) { this.emit(CUSTOM_EVENTS.createBundleProgress, processed, total); } uploadBundleProgress(processed, total) { this.emit(CUSTOM_EVENTS.uploadBundleProgress, processed, total); } analyseProgress(data) { this.emit(CUSTOM_EVENTS.analyseProgress, data); } sendError(error) { this.emit(CUSTOM_EVENTS.error, error); } apiRequestLog(message) { this.emit(CUSTOM_EVENTS.apiRequestLog, message); } } exports.EmitterDC = EmitterDC; exports.emitter = new EmitterDC(); //# sourceMappingURL=emitter.js.map /***/ }), /***/ 32083: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isMatch = exports.composeFilePayloads = exports.resolveBundleFilePath = exports.resolveBundleFiles = exports.getFileInfo = exports.calcHash = exports.getBundleFilePath = exports.prepareExtendingBundle = exports.collectBundleFiles = exports.determineBaseDir = exports.collectIgnoreRules = exports.getGlobPatterns = exports.parseFileIgnores = exports.notEmpty = void 0; const nodePath = __importStar(__webpack_require__(85622)); const fs = __importStar(__webpack_require__(35747)); const fast_glob_1 = __importDefault(__webpack_require__(8381)); const multimatch_1 = __importDefault(__webpack_require__(23424)); const crypto_1 = __importDefault(__webpack_require__(76417)); const yaml_1 = __webpack_require__(6792); const lodash_union_1 = __importDefault(__webpack_require__(96744)); const util_1 = __importDefault(__webpack_require__(31669)); const cache_1 = __webpack_require__(27234); const constants_1 = __webpack_require__(65765); const isWindows = nodePath.sep === '\\'; const asyncLStat = util_1.default.promisify(fs.lstat); const lStat = async (path) => { let fileStats = null; try { // eslint-disable-next-line no-await-in-loop fileStats = await asyncLStat(path); } catch (err) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (err.code === 'EACCES' || err.code === 'EPERM') { console.log(`${path} is not accessible. Please check permissions and adjust .dcignore file to not even test this file`); } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (err.code === 'ENOENT') { console.log(`no such file or directory: ${path}`); } } return fileStats; }; function notEmpty(value) { return value !== null && value !== undefined; } exports.notEmpty = notEmpty; const multiMatchOptions = { matchBase: true, dot: true }; const fgOptions = { dot: true, absolute: true, baseNameMatch: true, onlyFiles: true, suppressErrors: true, }; function filterSupportedFiles(files, supportedFiles) { const patters = getGlobPatterns(supportedFiles); return (0, multimatch_1.default)(files, patters, multiMatchOptions); } function parseIgnoreRulesToGlobs(rules, baseDir) { // Mappings from .gitignore format to glob format: // `/foo/` => `/foo/**` (meaning: Ignore root (not sub) foo dir and its paths underneath.) // `/foo` => `/foo/**`, `/foo` (meaning: Ignore root (not sub) file and dir and its paths underneath.) // `foo/` => `**/foo/**` (meaning: Ignore (root/sub) foo dirs and their paths underneath.) // `foo` => `**/foo/**`, `foo` (meaning: Ignore (root/sub) foo files and dirs and their paths underneath.) return rules.reduce((results, rule) => { let prefix = ''; if (rule.startsWith('!')) { // eslint-disable-next-line no-param-reassign rule = rule.substring(1); prefix = '!'; } const startingSlash = rule.startsWith('/'); const startingGlobstar = rule.startsWith('**'); const endingSlash = rule.endsWith('/'); const endingGlobstar = rule.endsWith('**'); if (startingSlash || startingGlobstar) { // case `/foo/`, `/foo` => `{baseDir}/foo/**` // case `**/foo/`, `**/foo` => `{baseDir}/**/foo/**` if (!endingGlobstar) results.push(prefix + nodePath.posix.join(baseDir, rule, '**')); // case `/foo` => `{baseDir}/foo` // case `**/foo` => `{baseDir}/**/foo` // case `/foo/**` => `{baseDir}/foo/**` // case `**/foo/**` => `{baseDir}/**/foo/**` if (!endingSlash) results.push(prefix + nodePath.posix.join(baseDir, rule)); } else { // case `foo/`, `foo` => `{baseDir}/**/foo/**` if (!endingGlobstar) results.push(prefix + nodePath.posix.join(baseDir, '**', rule, '**')); // case `foo` => `{baseDir}/**/foo` // case `foo/**` => `{baseDir}/**/foo/**` if (!endingSlash) results.push(prefix + nodePath.posix.join(baseDir, '**', rule)); } return results; }, []); } function parseFileIgnores(path) { let rules = []; const dirname = nodePath.dirname(path); try { const f = fs.readFileSync(path, { encoding: 'utf8' }); if (path.includes(constants_1.DOTSNYK_FILENAME)) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const parsed = (0, yaml_1.parse)(f); const codeIgnoredPaths = parsed.exclude.code || []; const globalIgnoredPaths = parsed.exclude.global || []; rules = [...codeIgnoredPaths, ...globalIgnoredPaths]; } else { rules = f .split('\n') .map(l => l.trim()) .filter(l => !!l && !l.startsWith('#')); } } catch (err) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (err.code === 'EACCES' || err.code === 'EPERM') { console.log(`${path} is not accessible. Please check permissions and adjust .dcignore file to not even test this file`); } } return parseIgnoreRulesToGlobs(rules, dirname); } exports.parseFileIgnores = parseFileIgnores; function getGlobPatterns(supportedFiles) { return [ ...supportedFiles.extensions.map(e => `*${e}`), ...supportedFiles.configFiles.filter(e => !constants_1.IGNORE_FILES_NAMES.includes(e)), ]; } exports.getGlobPatterns = getGlobPatterns; async function collectIgnoreRules(dirs, symlinksEnabled = false, fileIgnores = constants_1.IGNORES_DEFAULT) { const tasks = dirs.map(async (folder) => { const fileStats = await lStat(folder); // Check if symlink and exclude if requested if (!fileStats || (fileStats.isSymbolicLink() && !symlinksEnabled) || fileStats.isFile()) return []; // Find ignore files inside this directory const localIgnoreFiles = await (0, fast_glob_1.default)(constants_1.IGNORE_FILES_NAMES.map(i => `*${i}`), { ...fgOptions, cwd: folder, followSymbolicLinks: symlinksEnabled, }); // Read ignore files and merge new patterns return (0, lodash_union_1.default)(...localIgnoreFiles.map(parseFileIgnores)); }); const customRules = await Promise.all(tasks); return (0, lodash_union_1.default)(fileIgnores, ...customRules); } exports.collectIgnoreRules = collectIgnoreRules; function determineBaseDir(paths) { if (paths.length === 1) { const path = paths[0]; const stats = fs.lstatSync(path); if (stats.isFile()) { return nodePath.dirname(path); } return path; } return ''; } exports.determineBaseDir = determineBaseDir; async function* searchFiles(patterns, cwd, symlinksEnabled, ignores) { const positiveIgnores = ignores.filter(rule => !rule.startsWith('!')); const negativeIgnores = ignores.filter(rule => rule.startsWith('!')).map(rule => rule.substring(1)); // We need to use the ignore rules directly in the stream. Otherwise we would expand all the branches of the file system // that should be ignored, leading to performance issues (the parser would look stuck while analyzing each ignored file). // However, fast-glob doesn't address the negative rules in the ignore option correctly. // As a compromise between correctness and performance, we split the search in two streams, the first one using the // extension patterns as a search term and the positive ignore rules in the options, while the second that manually // expands those branches that should be excluded from the ignore rules throught the negative ignores as search term // and then matches the extensions as a second step to exclude any file that should not be analyzed. const positiveSearcher = fast_glob_1.default.stream(patterns, { ...fgOptions, cwd, followSymbolicLinks: symlinksEnabled, ignore: positiveIgnores, }); for await (const filePath of positiveSearcher) { yield filePath; } // TODO: This is incorrect because the .gitignore format allows to specify exceptions to previous rules, therefore // the separation between positive and negative ignores is incorrect in a scenario with 2+ exeptions like the one below: // `node_module/` <= ignores everything in a `node_module` folder and it's relative subfolders // `!node_module/my_module/` <= excludes the `my_module` subfolder from the ignore // `node_module/my_module/build/` <= re-includes the `build` subfolder in the ignore if (negativeIgnores.length) { const negativeSearcher = fast_glob_1.default.stream(negativeIgnores, { ...fgOptions, cwd, followSymbolicLinks: symlinksEnabled, baseNameMatch: false, }); for await (const filePath of negativeSearcher) { if (isMatch(filePath.toString(), patterns.map(p => `**/${p}`))) yield filePath; } } } /** * Returns bundle files from requested paths * If a file exceeds the maximum file size, it returns a string with its path * */ async function* collectBundleFiles({ symlinksEnabled = false, baseDir, fileIgnores, paths, supportedFiles, }) { const cache = new cache_1.Cache(constants_1.CACHE_KEY, baseDir); const files = []; const dirs = []; // Split into directories and files and exclude symlinks if needed for (const path of paths) { // eslint-disable-next-line no-await-in-loop const fileStats = await lStat(path); // Check if symlink and exclude if requested if (!fileStats || (fileStats.isSymbolicLink() && !symlinksEnabled)) continue; if (fileStats.isFile()) { fileStats.size <= constants_1.MAX_FILE_SIZE ? files.push(path) : yield path; } else if (fileStats.isDirectory()) { dirs.push(path); } } // Scan folders const globPatterns = getGlobPatterns(supportedFiles); for (const folder of dirs) { const searcher = searchFiles(globPatterns, folder, symlinksEnabled, fileIgnores); // eslint-disable-next-line no-await-in-loop for await (const filePath of searcher) { const fileInfo = await getFileInfo(filePath.toString(), baseDir, false, cache); // dc ignore AttrAccessOnNull: false positive, there is a precondition with && if (fileInfo) { fileInfo.size <= constants_1.MAX_FILE_SIZE ? yield fileInfo : yield fileInfo.bundlePath; } } } // Sanitize files if (files.length) { const searcher = searchFiles(filterSupportedFiles(files, supportedFiles), baseDir, symlinksEnabled, fileIgnores); for await (const filePath of searcher) { const fileInfo = await getFileInfo(filePath.toString(), baseDir, false, cache); // dc ignore AttrAccessOnNull: false positive, there is a precondition with && if (fileInfo) { fileInfo.size <= constants_1.MAX_FILE_SIZE ? yield fileInfo : yield fileInfo.bundlePath; } } } cache.save(); } exports.collectBundleFiles = collectBundleFiles; async function prepareExtendingBundle(baseDir, supportedFiles, fileIgnores = constants_1.IGNORES_DEFAULT, files, symlinksEnabled = false) { let removedFiles = []; let bundleFiles = []; const cache = new cache_1.Cache(constants_1.CACHE_KEY, baseDir); // Filter for supported extensions/files only let processingFiles = filterSupportedFiles(files, supportedFiles); // Exclude files to be ignored based on ignore rules. We assume here, that ignore rules have not been changed. processingFiles = processingFiles.map(f => resolveBundleFilePath(baseDir, f)).filter(f => !isMatch(f, fileIgnores)); if (processingFiles.length) { // Determine existing files (minus removed) if (isWindows) { processingFiles = processingFiles.map(f => f.replace(/\\/g, '/')); // fg requires forward-slashes in Windows globs } const entries = await (0, fast_glob_1.default)(processingFiles, { ...fgOptions, cwd: baseDir, followSymbolicLinks: symlinksEnabled, objectMode: true, stats: true, }); let foundFiles = new Set(); // This initialization is needed to help Typescript checker foundFiles = entries.reduce((s, e) => { if (e.stats && e.stats.size <= constants_1.MAX_FILE_SIZE) { s.add(e.path); } return s; }, foundFiles); removedFiles = processingFiles.reduce((s, p) => { if (!foundFiles.has(p)) { s.push(getBundleFilePath(p, baseDir)); } return s; }, []); if (foundFiles.size) { bundleFiles = (await Promise.all([...foundFiles].map((p) => getFileInfo(p, baseDir, false, cache)))).filter(notEmpty); } } return { files: bundleFiles, removedFiles, }; } exports.prepareExtendingBundle = prepareExtendingBundle; function getBundleFilePath(filePath, baseDir) { const relPath = baseDir ? nodePath.relative(baseDir, filePath) : filePath; // relPath without explicit base makes no sense const posixPath = !isWindows ? relPath : relPath.replace(/\\/g, '/'); return encodeURI(posixPath); } exports.getBundleFilePath = getBundleFilePath; function calcHash(content) { return crypto_1.default.createHash(constants_1.HASH_ALGORITHM).update(content).digest(constants_1.ENCODE_TYPE); } exports.calcHash = calcHash; async function getFileInfo(filePath, baseDir, withContent = false, cache = null) { const fileStats = await lStat(filePath); if (fileStats === null) { return fileStats; } const bundlePath = getBundleFilePath(filePath, baseDir); let fileContent = ''; let fileHash = ''; if (!withContent && !!cache) { // Try to get hash from cache const cachedData = cache.getKey(filePath); if (cachedData) { if (cachedData[0] === fileStats.size && cachedData[1] === fileStats.mtimeMs) { fileHash = cachedData[2]; } else { // console.log(`did not match cache for: ${filePath} | ${cachedData} !== ${[fileStats.size, fileStats.mtime]}`); } } } if (!fileHash) { try { fileContent = fs.readFileSync(filePath, { encoding: 'utf8' }); fileHash = calcHash(fileContent); cache === null || cache === void 0 ? void 0 : cache.setKey(filePath, [fileStats.size, fileStats.mtimeMs, fileHash]); } catch (err) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access if (err.code === 'EACCES' || err.code === 'EPERM') { console.log(`${filePath} is not accessible. Please check permissions and adjust .dcignore file to not even test this file`); } } } return { filePath, bundlePath, size: fileStats.size, hash: fileHash, content: withContent ? fileContent : undefined, }; } exports.getFileInfo = getFileInfo; async function resolveBundleFiles(baseDir, bundleMissingFiles) { const cache = new cache_1.Cache('.dccache', baseDir); const tasks = bundleMissingFiles.map(mf => { const filePath = resolveBundleFilePath(baseDir, mf); return getFileInfo(filePath, baseDir, true, cache); }); const res = (await Promise.all(tasks)).filter(notEmpty); cache.save(true); return res; } exports.resolveBundleFiles = resolveBundleFiles; function resolveBundleFilePath(baseDir, bundleFilePath) { let relPath = bundleFilePath; if (isWindows) { relPath = relPath.replace(/\//g, '\\'); } if (baseDir) { return nodePath.resolve(baseDir, decodeURI(relPath)); } return decodeURI(relPath); } exports.resolveBundleFilePath = resolveBundleFilePath; function* composeFilePayloads(files, bucketSize = constants_1.MAX_PAYLOAD) { const buckets = [{ size: bucketSize, files: [] }]; let bucketIndex = -1; const getFileDataPayloadSize = (fileData) => { var _a; return (((_a = fileData.content) === null || _a === void 0 ? void 0 : _a.length) || 0) + fileData.bundlePath.length + fileData.hash.length; }; const isLowerSize = (size, fileData) => size >= getFileDataPayloadSize(fileData); for (const fileData of files) { // This file is empty or too large to send, it should be skipped. if (!fileData.size || !isLowerSize(bucketSize, fileData)) continue; // Find suitable bucket bucketIndex = buckets.findIndex(b => isLowerSize(b.size, fileData)); if (bucketIndex === -1) { // Create a new bucket buckets.push({ size: bucketSize, files: [] }); bucketIndex = buckets.length - 1; } buckets[bucketIndex].files.push(fileData); buckets[bucketIndex].size -= getFileDataPayloadSize(fileData); if (buckets[bucketIndex].size < bucketSize * 0.01) { yield buckets[bucketIndex].files; // Give bucket to requester buckets.splice(bucketIndex); // Remove it as fullfilled } } // Send all left-over buckets for (const bucket of buckets.filter(b => b.files.length)) { yield bucket.files; } } exports.composeFilePayloads = composeFilePayloads; function isMatch(filePath, rules) { return !!(0, multimatch_1.default)([filePath], rules, { ...multiMatchOptions, matchBase: false }).length; } exports.isMatch = isMatch; //# sourceMappingURL=files.js.map /***/ }), /***/ 60776: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getVerifyCallbackUrl = exports.getAnalysis = exports.AnalysisStatus = exports.extendBundle = exports.checkBundle = exports.createBundle = exports.getFilters = exports.checkSession = exports.getIpFamily = exports.startSession = exports.compressAndEncode = exports.setBase64Encoding = void 0; const uuid_1 = __webpack_require__(42277); const lodash_pick_1 = __importDefault(__webpack_require__(25030)); const zlib_1 = __webpack_require__(78761); const util_1 = __webpack_require__(31669); const constants_1 = __webpack_require__(65765); const needle_1 = __webpack_require__(14577); const url_1 = __webpack_require__(78835); // The trick to typecast union type alias function isSubsetErrorCode(code, messages) { if (code in messages) { return true; } return false; } function generateError(errorCode, messages, apiName) { if (!isSubsetErrorCode(errorCode, messages)) { throw { errorCode, messages, apiName }; } const statusCode = errorCode; const statusText = messages[errorCode]; return { type: 'error', error: { apiName, statusCode, statusText, }, }; } const GENERIC_ERROR_MESSAGES = { [constants_1.ErrorCodes.serverError]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.serverError], [constants_1.ErrorCodes.badGateway]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.badGateway], [constants_1.ErrorCodes.serviceUnavailable]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.serviceUnavailable], [constants_1.ErrorCodes.timeout]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.timeout], [constants_1.ErrorCodes.dnsNotFound]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.dnsNotFound], [constants_1.ErrorCodes.connectionRefused]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.connectionRefused], }; function setBase64Encoding(options) { if (!options.base64Encoding) { const { hostname } = new url_1.URL(options.baseURL); const rg = new RegExp('^(|dev.)snyk.io'); if (rg.test(hostname.slice(hostname.indexOf('.') + 1))) { return options.base64Encoding; } else { return true; } } else { return options.base64Encoding; } } exports.setBase64Encoding = setBase64Encoding; async function compressAndEncode(payload) { // encode payload and compress; const deflate = (0, util_1.promisify)(zlib_1.gzip); const compressedPayload = await deflate(Buffer.from(JSON.stringify(payload)).toString('base64')); return compressedPayload; } exports.compressAndEncode = compressAndEncode; function startSession(options) { const { source, authHost } = options; const draftToken = (0, uuid_1.v4)(); return { draftToken, loginURL: `${authHost}/login?token=${draftToken}&utm_medium=${source}&utm_source=${source}&utm_campaign=${source}&docker=false`, }; } exports.startSession = startSession; /** * Dispatches a FORCED IPv6 request to test client's ISP and network capability. * * @return {number} IP family number used by the client. */ async function getIpFamily(authHost) { const family = 6; // Dispatch a FORCED IPv6 request to test client's ISP and network capability const res = await (0, needle_1.makeRequest)({ url: getVerifyCallbackUrl(authHost), method: 'post', family, // family param forces the handler to dispatch a request using IP at "family" version }, 0); const ipv6Incompatible = res.error; return ipv6Incompatible ? undefined : family; } exports.getIpFamily = getIpFamily; const CHECK_SESSION_ERROR_MESSAGES = { ...GENERIC_ERROR_MESSAGES, [constants_1.ErrorCodes.unauthorizedUser]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedUser], [constants_1.ErrorCodes.loginInProgress]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.loginInProgress], }; async function checkSession(options) { const defaultValue = { type: 'success', value: '', }; const res = await (0, needle_1.makeRequest)({ url: getVerifyCallbackUrl(options.authHost), body: { token: options.draftToken, }, family: options.ipFamily, method: 'post', }); if (res.success) { return { ...defaultValue, value: (res.body.ok && res.body.api) || '' }; } else if ([constants_1.ErrorCodes.loginInProgress, constants_1.ErrorCodes.badRequest, constants_1.ErrorCodes.unauthorizedUser].includes(res.errorCode)) { return defaultValue; } return generateError(res.errorCode, CHECK_SESSION_ERROR_MESSAGES, 'checkSession'); } exports.checkSession = checkSession; async function getFilters(baseURL, source, attempts = constants_1.MAX_RETRY_ATTEMPTS, requestId) { const apiName = 'filters'; const res = await (0, needle_1.makeRequest)({ headers: { source, ...(requestId && { 'snyk-request-id': requestId }) }, url: `${baseURL}/${apiName}`, method: 'get', }, attempts); if (res.success) { return { type: 'success', value: res.body }; } return generateError(res.errorCode, GENERIC_ERROR_MESSAGES, apiName); } exports.getFilters = getFilters; function prepareTokenHeaders(sessionToken) { return { 'Session-Token': sessionToken, // We need to be able to test code-client without deepcode locally Authorization: `Bearer ${sessionToken}`, }; } const CREATE_BUNDLE_ERROR_MESSAGES = { ...GENERIC_ERROR_MESSAGES, [constants_1.ErrorCodes.unauthorizedUser]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedUser], [constants_1.ErrorCodes.unauthorizedBundleAccess]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedBundleAccess], [constants_1.ErrorCodes.bigPayload]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.bigPayload], [constants_1.ErrorCodes.badRequest]: `Request payload doesn't match the specifications`, [constants_1.ErrorCodes.notFound]: 'Unable to resolve requested oid', }; async function createBundle(options) { const base64Encoding = setBase64Encoding(options); let payloadBody; if (base64Encoding) { payloadBody = await compressAndEncode(options.files); } else { payloadBody = options.files; } const payload = { headers: { ...prepareTokenHeaders(options.sessionToken), source: options.source, ...(options.requestId && { 'snyk-request-id': options.requestId }), ...(base64Encoding ? { 'content-type': 'application/octet-stream', 'content-encoding': 'gzip' } : null), }, url: `${options.baseURL}/bundle`, method: 'post', body: payloadBody, isJson: base64Encoding ? false : true, }; const res = await (0, needle_1.makeRequest)(payload); if (res.success) { return { type: 'success', value: res.body }; } return generateError(res.errorCode, CREATE_BUNDLE_ERROR_MESSAGES, 'createBundle'); } exports.createBundle = createBundle; const CHECK_BUNDLE_ERROR_MESSAGES = { ...GENERIC_ERROR_MESSAGES, [constants_1.ErrorCodes.unauthorizedUser]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedUser], [constants_1.ErrorCodes.unauthorizedBundleAccess]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedBundleAccess], [constants_1.ErrorCodes.notFound]: 'Uploaded bundle has expired', }; async function checkBundle(options) { const res = await (0, needle_1.makeRequest)({ headers: { ...prepareTokenHeaders(options.sessionToken), source: options.source, ...(options.requestId && { 'snyk-request-id': options.requestId }), }, url: `${options.baseURL}/bundle/${options.bundleHash}`, method: 'get', }); if (res.success) return { type: 'success', value: res.body }; return generateError(res.errorCode, CHECK_BUNDLE_ERROR_MESSAGES, 'checkBundle'); } exports.checkBundle = checkBundle; const EXTEND_BUNDLE_ERROR_MESSAGES = { ...GENERIC_ERROR_MESSAGES, [constants_1.ErrorCodes.unauthorizedUser]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedUser], [constants_1.ErrorCodes.bigPayload]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.bigPayload], [constants_1.ErrorCodes.badRequest]: `Bad request`, [constants_1.ErrorCodes.unauthorizedBundleAccess]: 'Unauthorized access to parent bundle', [constants_1.ErrorCodes.notFound]: 'Parent bundle has expired', }; async function extendBundle(options) { const base64Encoding = setBase64Encoding(options); let payloadBody; if (base64Encoding) { payloadBody = await compressAndEncode((0, lodash_pick_1.default)(options, ['files', 'removedFiles'])); } else { payloadBody = (0, lodash_pick_1.default)(options, ['files', 'removedFiles']); } const res = await (0, needle_1.makeRequest)({ headers: { ...prepareTokenHeaders(options.sessionToken), source: options.source, ...(options.requestId && { 'snyk-request-id': options.requestId }), ...(base64Encoding ? { 'content-type': 'application/octet-stream', 'content-encoding': 'gzip' } : null), }, url: `${options.baseURL}/bundle/${options.bundleHash}`, method: 'put', body: payloadBody, isJson: base64Encoding ? false : true, }); if (res.success) return { type: 'success', value: res.body }; return generateError(res.errorCode, EXTEND_BUNDLE_ERROR_MESSAGES, 'extendBundle'); } exports.extendBundle = extendBundle; // eslint-disable-next-line no-shadow var AnalysisStatus; (function (AnalysisStatus) { AnalysisStatus["waiting"] = "WAITING"; AnalysisStatus["fetching"] = "FETCHING"; AnalysisStatus["analyzing"] = "ANALYZING"; AnalysisStatus["done"] = "DONE"; AnalysisStatus["failed"] = "FAILED"; AnalysisStatus["complete"] = "COMPLETE"; })(AnalysisStatus = exports.AnalysisStatus || (exports.AnalysisStatus = {})); const GET_ANALYSIS_ERROR_MESSAGES = { ...GENERIC_ERROR_MESSAGES, [constants_1.ErrorCodes.unauthorizedUser]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedUser], [constants_1.ErrorCodes.unauthorizedBundleAccess]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.unauthorizedBundleAccess], [constants_1.ErrorCodes.notFound]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.notFound], [constants_1.ErrorCodes.badRequest]: constants_1.DEFAULT_ERROR_MESSAGES[constants_1.ErrorCodes.badRequest], [constants_1.ErrorCodes.serverError]: 'Getting analysis failed', }; async function getAnalysis(options) { const config = { headers: { ...prepareTokenHeaders(options.sessionToken), source: options.source, ...(options.requestId && { 'snyk-request-id': options.requestId }), }, url: `${options.baseURL}/analysis`, method: 'post', body: { key: { type: 'file', hash: options.bundleHash, limitToFiles: options.limitToFiles || [], ...(options.shard ? { shard: options.shard } : null), }, ...(0, lodash_pick_1.default)(options, ['severity', 'prioritized', 'legacy', 'analysisContext']), }, }; const res = await (0, needle_1.makeRequest)(config); if (res.success) return { type: 'success', value: res.body }; return generateError(res.errorCode, GET_ANALYSIS_ERROR_MESSAGES, 'getAnalysis'); } exports.getAnalysis = getAnalysis; function getVerifyCallbackUrl(authHost) { return `${authHost}/api/verify/callback`; } exports.getVerifyCallbackUrl = getVerifyCallbackUrl; //# sourceMappingURL=http.js.map /***/ }), /***/ 95951: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIpFamily = exports.checkSession = exports.startSession = exports.getAnalysis = exports.AnalysisSeverity = exports.constants = exports.MAX_FILE_SIZE = exports.emitter = exports.extendAnalysis = exports.createBundleFromFolders = exports.analyzeFolders = exports.getGlobPatterns = void 0; const analysis_1 = __webpack_require__(54151); Object.defineProperty(exports, "analyzeFolders", ({ enumerable: true, get: function () { return analysis_1.analyzeFolders; } })); Object.defineProperty(exports, "extendAnalysis", ({ enumerable: true, get: function () { return analysis_1.extendAnalysis; } })); const bundles_1 = __webpack_require__(86639); Object.defineProperty(exports, "createBundleFromFolders", ({ enumerable: true, get: function () { return bundles_1.createBundleFromFolders; } })); const emitter_1 = __webpack_require__(37544); Object.defineProperty(exports, "emitter", ({ enumerable: true, get: function () { return emitter_1.emitter; } })); const http_1 = __webpack_require__(60776); Object.defineProperty(exports, "startSession", ({ enumerable: true, get: function () { return http_1.startSession; } })); Object.defineProperty(exports, "checkSession", ({ enumerable: true, get: function () { return http_1.checkSession; } })); Object.defineProperty(exports, "getAnalysis", ({ enumerable: true, get: function () { return http_1.getAnalysis; } })); Object.defineProperty(exports, "getIpFamily", ({ enumerable: true, get: function () { return http_1.getIpFamily; } })); const constants_1 = __webpack_require__(65765); Object.defineProperty(exports, "MAX_FILE_SIZE", ({ enumerable: true, get: function () { return constants_1.MAX_FILE_SIZE; } })); const constants = __importStar(__webpack_require__(65765)); exports.constants = constants; const files_1 = __webpack_require__(32083); Object.defineProperty(exports, "getGlobPatterns", ({ enumerable: true, get: function () { return files_1.getGlobPatterns; } })); const analysis_options_interface_1 = __webpack_require__(4775); Object.defineProperty(exports, "AnalysisSeverity", ({ enumerable: true, get: function () { return analysis_options_interface_1.AnalysisSeverity; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 4775: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AnalysisSeverity = void 0; // eslint-disable-next-line import/prefer-default-export, no-shadow var AnalysisSeverity; (function (AnalysisSeverity) { AnalysisSeverity[AnalysisSeverity["info"] = 1] = "info"; AnalysisSeverity[AnalysisSeverity["warning"] = 2] = "warning"; AnalysisSeverity[AnalysisSeverity["critical"] = 3] = "critical"; })(AnalysisSeverity = exports.AnalysisSeverity || (exports.AnalysisSeverity = {})); //# sourceMappingURL=analysis-options.interface.js.map /***/ }), /***/ 14577: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.makeRequest = void 0; /* eslint-disable camelcase */ const http_1 = __importDefault(__webpack_require__(98605)); const needle_1 = __importDefault(__webpack_require__(11642)); const querystring = __importStar(__webpack_require__(71191)); const https_1 = __importDefault(__webpack_require__(57211)); const url_1 = __webpack_require__(78835); const emitter_1 = __webpack_require__(37544); const constants_1 = __webpack_require__(65765); const sleep = (duration) => new Promise(resolve => setTimeout(resolve, duration)); const TIMEOUT_DEFAULT = 600000; const agentOptions = { keepAlive: true, keepAliveMsecs: 1000, maxSockets: 256, maxFreeSockets: 256, freeSocketTimeout: 60000, socketActiveTTL: 1000 * 60 * 10, rejectUnauthorized: !global.ignoreUnknownCA, }; async function makeRequest(payload, attempts = constants_1.MAX_RETRY_ATTEMPTS) { let data; if (!payload.isJson && payload.body) { data = payload.body; } else { data = JSON.stringify(payload.body); } const parsedUrl = new url_1.URL(payload.url); const agent = parsedUrl.protocol === 'http:' ? new http_1.default.Agent(agentOptions) : new https_1.default.Agent(agentOptions); const method = (payload.method || 'get').toLowerCase(); let { url } = payload; if (payload.qs) { // Parse the URL and append the search part - this will take care of adding the '/?' part if it's missing const urlObject = new url_1.URL(url); urlObject.search = querystring.stringify(payload.qs); url = urlObject.toString(); delete payload.qs; } const options = { headers: payload.headers, open_timeout: TIMEOUT_DEFAULT, response_timeout: payload.timeout || TIMEOUT_DEFAULT, read_timeout: payload.timeout || TIMEOUT_DEFAULT, family: payload.family, json: payload.isJson || true, compressed: true, follow_max: 5, rejectUnauthorized: !global.ignoreUnknownCA, agent, }; emitter_1.emitter.apiRequestLog(`=> HTTP ${method === null || method === void 0 ? void 0 : method.toUpperCase()} ${url} ${data !== null && data !== void 0 ? data : ''}`.slice(0, 399)); do { let errorCode; let error; let response; try { response = await (0, needle_1.default)(method, url, data, options); emitter_1.emitter.apiRequestLog(`<= Response: ${response.statusCode} ${JSON.stringify(response.body)}`); const success = !!(response.statusCode && response.statusCode >= 200 && response.statusCode < 300); if (success) return { success, body: response.body }; errorCode = response.statusCode; } catch (err) { error = err; // do not swallow the error, pass further to the caller instead errorCode = constants_1.NETWORK_ERRORS[err.code || err.errno]; emitter_1.emitter.apiRequestLog(`Requested url --> ${url} | error --> ${err}`); } errorCode = errorCode !== null && errorCode !== void 0 ? errorCode : constants_1.ErrorCodes.serviceUnavailable; // Try to avoid breaking requests due to temporary network errors if (attempts > 1 && [ constants_1.ErrorCodes.serviceUnavailable, constants_1.ErrorCodes.badGateway, constants_1.ErrorCodes.connectionRefused, constants_1.ErrorCodes.timeout, constants_1.ErrorCodes.dnsNotFound, constants_1.ErrorCodes.serverError, ].includes(errorCode)) { attempts--; await sleep(constants_1.REQUEST_RETRY_DELAY); } else { attempts = 0; return { success: false, errorCode, error }; } } while (attempts > 0); return { success: false, errorCode: constants_1.ErrorCodes.serviceUnavailable, error: undefined }; } exports.makeRequest = makeRequest; //# sourceMappingURL=needle.js.map /***/ }), /***/ 59642: /***/ ((module, exports, __webpack_require__) => { "use strict"; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /* eslint-env browser */ /** * This is the web browser implementation of `debug()`. */ exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); /** * Colors. */ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ // eslint-disable-next-line complexity function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; } // Internet Explorer and Edge do not support colors. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); if (!this.useColors) { return; } var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function (match) { if (match === '%%') { return; } index++; if (match === '%c') { // We only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { var _console; // This hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (namespaces) { exports.storage.setItem('debug', namespaces); } else { exports.storage.removeItem('debug'); } } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.getItem('debug'); } catch (error) {} // Swallow // XXX (@Qix-) should we be logging these? // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context // The Browser also has localStorage in the global context. return localStorage; } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } module.exports = __webpack_require__(26711)(exports); var formatters = module.exports.formatters; /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ formatters.j = function (v) { try { return JSON.stringify(v); } catch (error) { return '[UnexpectedJSONParseError]: ' + error.message; } }; /***/ }), /***/ 26711: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. */ function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = __webpack_require__(57824); Object.keys(env).forEach(function (key) { createDebug[key] = env[key]; }); /** * Active `debug` instances. */ createDebug.instances = []; /** * The currently active debug mode names, and names to skip. */ createDebug.names = []; createDebug.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". */ createDebug.formatters = {}; /** * Selects a color for a debug namespace * @param {String} namespace The namespace string for the for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ function selectColor(namespace) { var hash = 0; for (var i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; // Convert to 32bit integer } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function createDebug(namespace) { var prevTime; function debug() { // Disabled? if (!debug.enabled) { return; } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var self = debug; // Set `diff` timestamp var curr = Number(new Date()); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== 'string') { // Anything else let's inspect with %O args.unshift('%O'); } // Apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { // If we encounter an escaped % then don't increase the array index if (match === '%%') { return match; } index++; var formatter = createDebug.formatters[format]; if (typeof formatter === 'function') { var val = args[index]; match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // Apply env-specific formatting (colors, etc.) createDebug.formatArgs.call(self, args); var logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); debug.color = selectColor(namespace); debug.destroy = destroy; debug.extend = extend; // Debug.formatArgs = formatArgs; // debug.rawLog = rawLog; // env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } createDebug.instances.push(debug); return debug; } function destroy() { var index = createDebug.instances.indexOf(this); if (index !== -1) { createDebug.instances.splice(index, 1); return true; } return false; } function extend(namespace, delimiter) { return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { createDebug.save(namespaces); createDebug.names = []; createDebug.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { // ignore empty strings continue; } namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } for (i = 0; i < createDebug.instances.length; i++) { var instance = createDebug.instances[i]; instance.enabled = createDebug.enabled(instance.namespace); } } /** * Disable debug output. * * @api public */ function disable() { createDebug.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i; var len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; /***/ }), /***/ 42781: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { module.exports = __webpack_require__(59642); } else { module.exports = __webpack_require__(52937); } /***/ }), /***/ 52937: /***/ ((module, exports, __webpack_require__) => { "use strict"; /** * Module dependencies. */ var tty = __webpack_require__(33867); var util = __webpack_require__(31669); /** * This is the Node.js implementation of `debug()`. */ exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; /** * Colors. */ exports.colors = [6, 2, 3, 4, 5, 1]; try { // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) // eslint-disable-next-line import/no-extraneous-dependencies var supportsColor = __webpack_require__(92130); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; } } catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. /** * Build up the default `inspectOpts` object from the environment variables. * * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ exports.inspectOpts = Object.keys(process.env).filter(function (key) { return /^debug_/i.test(key); }).reduce(function (obj, key) { // Camel-case var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { return k.toUpperCase(); }); // Coerce string value into JS value var val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === 'null') { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); /** * Is stdout a TTY? Colored output is enabled when `true`. */ function useColors() { return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } /** * Adds ANSI color escape codes if enabled. * * @api public */ function formatArgs(args) { var name = this.namespace, useColors = this.useColors; if (useColors) { var c = this.color; var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); args[0] = prefix + args[0].split('\n').join('\n' + prefix); args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + ' ' + args[0]; } } function getDate() { if (exports.inspectOpts.hideDate) { return ''; } return new Date().toISOString() + ' '; } /** * Invokes `util.format()` with the specified arguments and writes to stderr. */ function log() { return process.stderr.write(util.format.apply(util, arguments) + '\n'); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { // If you set a process.env field to null or undefined, it gets cast to the // string 'null' or 'undefined'. Just delete instead. delete process.env.DEBUG; } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { return process.env.DEBUG; } /** * Init logic for `debug` instances. * * Create a new `inspectOpts` object in case `useColors` is set * differently for a particular `debug` instance. */ function init(debug) { debug.inspectOpts = {}; var keys = Object.keys(exports.inspectOpts); for (var i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } module.exports = __webpack_require__(26711)(exports); var formatters = module.exports.formatters; /** * Map %o to `util.inspect()`, all on a single line. */ formatters.o = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) .split('\n') .map(function (str) { return str.trim(); }) .join(' '); }; /** * Map %O to `util.inspect()`, allowing multiple lines if needed. */ formatters.O = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; /***/ }), /***/ 2662: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createHash = __webpack_require__(76417).createHash; function get_header(header, credentials, opts) { var type = header.split(' ')[0], user = credentials[0], pass = credentials[1]; if (type == 'Digest') { return digest.generate(header, user, pass, opts.method, opts.path); } else if (type == 'Basic') { return basic(user, pass); } } //////////////////// // basic function md5(string) { return createHash('md5').update(string).digest('hex'); } function basic(user, pass) { var str = typeof pass == 'undefined' ? user : [user, pass].join(':'); return 'Basic ' + Buffer.from(str).toString('base64'); } //////////////////// // digest // logic inspired from https://github.com/simme/node-http-digest-client var digest = {}; digest.parse_header = function(header) { var challenge = {}, matches = header.match(/([a-z0-9_-]+)="?([a-z0-9_=\/\.@\s-\+)()]+)"?/gi); for (var i = 0, l = matches.length; i < l; i++) { var parts = matches[i].split('='), key = parts.shift(), val = parts.join('=').replace(/^"/, '').replace(/"$/, ''); challenge[key] = val; } return challenge; } digest.update_nc = function(nc) { var max = 99999999; nc++; if (nc > max) nc = 1; var padding = new Array(8).join('0') + ''; nc = nc + ''; return padding.substr(0, 8 - nc.length) + nc; } digest.generate = function(header, user, pass, method, path) { var nc = 1, cnonce = null, challenge = digest.parse_header(header); var ha1 = md5(user + ':' + challenge.realm + ':' + pass), ha2 = md5(method.toUpperCase() + ':' + path), resp = [ha1, challenge.nonce]; if (typeof challenge.qop === 'string') { cnonce = md5(Math.random().toString(36)).substr(0, 8); nc = digest.update_nc(nc); resp = resp.concat(nc, cnonce); resp = resp.concat(challenge.qop, ha2); } else { resp = resp.concat(ha2); } var params = { uri : path, realm : challenge.realm, nonce : challenge.nonce, username : user, response : md5(resp.join(':')) } if (challenge.qop) { params.qop = challenge.qop; } if (challenge.opaque) { params.opaque = challenge.opaque; } if (cnonce) { params.nc = nc; params.cnonce = cnonce; } header = [] for (var k in params) header.push(k + '="' + params[k] + '"') return 'Digest ' + header.join(', '); } module.exports = { header : get_header, basic : basic, digest : digest.generate } /***/ }), /***/ 80284: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { // Simple cookie handling implementation based on the standard RFC 6265. // // This module just has two functionalities: // - Parse a set-cookie-header as a key value object // - Write a cookie-string from a key value object // // All cookie attributes are ignored. var unescape = __webpack_require__(71191).unescape; var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2\s*$/; var EXCLUDED_CHARS = /[\x00-\x1F\x7F\x3B\x3B\s\"\,\\"%]/g; var TRAILING_SEMICOLON = /\x3B+$/; var SEP_SEMICOLON = /\s*\x3B\s*/; // i know these should be 'const', but I'd like to keep // supporting earlier node.js versions as long as I can. :) var KEY_INDEX = 1; // index of key from COOKIE_PAIR match var VALUE_INDEX = 3; // index of value from COOKIE_PAIR match // Returns a copy str trimmed and without trainling semicolon. function cleanCookieString(str) { return str.trim().replace(/\x3B+$/, ''); } function getFirstPair(str) { var index = str.indexOf('\x3B'); return index === -1 ? str : str.substr(0, index); } // Returns a encoded copy of str based on RFC6265 S4.1.1. function encodeCookieComponent(str) { return str.toString().replace(EXCLUDED_CHARS, encodeURIComponent); } // Parses a set-cookie-string based on the standard defined in RFC6265 S4.1.1. function parseSetCookieString(str) { str = cleanCookieString(str); str = getFirstPair(str); var res = COOKIE_PAIR.exec(str); if (!res || !res[VALUE_INDEX]) return null; return { name : unescape(res[KEY_INDEX]), value : unescape(res[VALUE_INDEX]) }; } // Parses a set-cookie-header and returns a key/value object. // Each key represents the name of a cookie. function parseSetCookieHeader(header) { if (!header) return {}; header = Array.isArray(header) ? header : [header]; return header.reduce(function(res, str) { var cookie = parseSetCookieString(str); if (cookie) res[cookie.name] = cookie.value; return res; }, {}); } // Writes a set-cookie-string based on the standard definded in RFC6265 S4.1.1. function writeCookieString(obj) { return Object.keys(obj).reduce(function(str, name) { var encodedName = encodeCookieComponent(name); var encodedValue = encodeCookieComponent(obj[name]); str += (str ? '; ' : '') + encodedName + '=' + encodedValue; return str; }, ''); } // returns a key/val object from an array of cookie strings exports.read = parseSetCookieHeader; // writes a cookie string header exports.write = writeCookieString; /***/ }), /***/ 64509: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var iconv, inherits = __webpack_require__(31669).inherits, stream = __webpack_require__(92413); var regex = /(?:charset|encoding)\s*=\s*['"]? *([\w\-]+)/i; inherits(StreamDecoder, stream.Transform); function StreamDecoder(charset) { if (!(this instanceof StreamDecoder)) return new StreamDecoder(charset); stream.Transform.call(this, charset); this.charset = charset; this.parsed_chunk = false; } StreamDecoder.prototype._transform = function(chunk, encoding, done) { var res, found; // try get charset from chunk, just once if (this.charset == 'utf8' && !this.parsed_chunk) { this.parsed_chunk = true; var matches = regex.exec(chunk.toString()); if (matches) { found = matches[1].toLowerCase(); this.charset = found == 'utf-8' ? 'utf8' : found; } } try { res = iconv.decode(chunk, this.charset); } catch(e) { // something went wrong, just return original chunk res = chunk; } this.push(res); done(); } module.exports = function(charset) { try { if (!iconv) iconv = __webpack_require__(4914); } catch(e) { /* iconv not found */ } if (iconv) return new StreamDecoder(charset); else return new stream.PassThrough; } /***/ }), /***/ 35679: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var readFile = __webpack_require__(35747).readFile, basename = __webpack_require__(85622).basename; exports.build = function(data, boundary, callback) { if (typeof data != 'object' || typeof data.pipe == 'function') return callback(new Error('Multipart builder expects data as key/val object.')); var body = '', object = flatten(data), count = Object.keys(object).length; if (count === 0) return callback(new Error('Empty multipart body. Invalid data.')) function done(err, section) { if (err) return callback(err); if (section) body += section; --count || callback(null, body + '--' + boundary + '--'); }; for (var key in object) { var value = object[key]; if (value === null || typeof value == 'undefined') { done(); } else if (Buffer.isBuffer(value)) { var part = { buffer: value, content_type: 'application/octet-stream' }; generate_part(key, part, boundary, done); } else { var part = (value.buffer || value.file || value.content_type) ? value : { value: value }; generate_part(key, part, boundary, done); } } } function generate_part(name, part, boundary, callback) { var return_part = '--' + boundary + '\r\n'; return_part += 'Content-Disposition: form-data; name="' + name + '"'; function append(data, filename) { if (data) { var binary = part.content_type.indexOf('text') == -1; return_part += '; filename="' + encodeURIComponent(filename) + '"\r\n'; if (binary) return_part += 'Content-Transfer-Encoding: binary\r\n'; return_part += 'Content-Type: ' + part.content_type + '\r\n\r\n'; return_part += binary ? data.toString('binary') : data.toString('utf8'); } callback(null, return_part + '\r\n'); }; if ((part.file || part.buffer) && part.content_type) { var filename = part.filename ? part.filename : part.file ? basename(part.file) : name; if (part.buffer) return append(part.buffer, filename); readFile(part.file, function(err, data) { if (err) return callback(err); append(data, filename); }); } else { if (typeof part.value == 'object') return callback(new Error('Object received for ' + name + ', expected string.')) if (part.content_type) { return_part += '\r\n'; return_part += 'Content-Type: ' + part.content_type; } return_part += '\r\n\r\n'; return_part += Buffer.from(String(part.value), 'utf8').toString('binary'); append(); } } // flattens nested objects for multipart body function flatten(object, into, prefix) { into = into || {}; for(var key in object) { var prefix_key = prefix ? prefix + '[' + key + ']' : key; var prop = object[key]; if (prop && typeof prop === 'object' && !(prop.buffer || prop.file || prop.content_type)) flatten(prop, into, prefix_key) else into[prefix_key] = prop; } return into; } /***/ }), /***/ 11642: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { ////////////////////////////////////////// // Needle -- HTTP Client for Node.js // Written by Tomás Pollak // (c) 2012-2020 - Fork Ltd. // MIT Licensed ////////////////////////////////////////// var fs = __webpack_require__(35747), http = __webpack_require__(98605), https = __webpack_require__(57211), url = __webpack_require__(78835), stream = __webpack_require__(92413), debug = __webpack_require__(42781)('needle'), stringify = __webpack_require__(28280)/* .build */ .J, multipart = __webpack_require__(35679), auth = __webpack_require__(2662), cookies = __webpack_require__(80284), parsers = __webpack_require__(50722), decoder = __webpack_require__(64509); ////////////////////////////////////////// // variabilia var version = __webpack_require__(6072)/* .version */ .i8; var user_agent = 'Needle/' + version; user_agent += ' (Node.js ' + process.version + '; ' + process.platform + ' ' + process.arch + ')'; var tls_options = 'agent pfx key passphrase cert ca ciphers rejectUnauthorized secureProtocol checkServerIdentity family'; // older versions of node (< 0.11.4) prevent the runtime from exiting // because of connections in keep-alive state. so if this is the case // we'll default new requests to set a Connection: close header. var close_by_default = !http.Agent || http.Agent.defaultMaxSockets != Infinity; // see if we have Object.assign. otherwise fall back to util._extend var extend = Object.assign ? Object.assign : __webpack_require__(31669)._extend; // these are the status codes that Needle interprets as redirects. var redirect_codes = [301, 302, 303, 307, 308]; ////////////////////////////////////////// // decompressors for gzip/deflate/br bodies function bind_opts(fn, options) { return fn.bind(null, options); } var decompressors = {}; try { var zlib = __webpack_require__(78761); // Enable Z_SYNC_FLUSH to avoid Z_BUF_ERROR errors (Node PR #2595) var zlib_options = { flush: zlib.Z_SYNC_FLUSH, finishFlush: zlib.Z_SYNC_FLUSH }; var br_options = { flush: zlib.BROTLI_OPERATION_FLUSH, finishFlush: zlib.BROTLI_OPERATION_FLUSH }; decompressors['x-deflate'] = bind_opts(zlib.Inflate, zlib_options); decompressors['deflate'] = bind_opts(zlib.Inflate, zlib_options); decompressors['x-gzip'] = bind_opts(zlib.Gunzip, zlib_options); decompressors['gzip'] = bind_opts(zlib.Gunzip, zlib_options); if (typeof zlib.BrotliDecompress === 'function') { decompressors['br'] = bind_opts(zlib.BrotliDecompress, br_options); } } catch(e) { /* zlib not available */ } ////////////////////////////////////////// // options and aliases var defaults = { // data boundary : '--------------------NODENEEDLEHTTPCLIENT', encoding : 'utf8', parse_response : 'all', // same as true. valid options: 'json', 'xml' or false/null proxy : null, // headers headers : {}, accept : '*/*', user_agent : user_agent, // numbers open_timeout : 10000, response_timeout : 0, read_timeout : 0, follow_max : 0, stream_length : -1, // booleans compressed : false, decode_response : true, parse_cookies : true, follow_set_cookies : false, follow_set_referer : false, follow_keep_method : false, follow_if_same_host : false, follow_if_same_protocol : false, follow_if_same_location : false } var aliased = { options: { decode : 'decode_response', parse : 'parse_response', timeout : 'open_timeout', follow : 'follow_max' }, inverted: {} } // only once, invert aliased keys so we can get passed options. Object.keys(aliased.options).map(function(k) { var value = aliased.options[k]; aliased.inverted[value] = k; }); ////////////////////////////////////////// // helpers function keys_by_type(type) { return Object.keys(defaults).map(function(el) { if (defaults[el] !== null && defaults[el].constructor == type) return el; }).filter(function(el) { return el }) } function parse_content_type(header) { if (!header || header === '') return {}; var found, charset = 'utf8', arr = header.split(';'); if (arr.length > 1 && (found = arr[1].match(/charset=(.+)/))) charset = found[1]; return { type: arr[0], charset: charset }; } function is_stream(obj) { return typeof obj.pipe === 'function'; } function get_stream_length(stream, given_length, cb) { if (given_length > 0) return cb(given_length); if (stream.end !== void 0 && stream.end !== Infinity && stream.start !== void 0) return cb((stream.end + 1) - (stream.start || 0)); fs.stat(stream.path, function(err, stat) { cb(stat ? stat.size - (stream.start || 0) : null); }); } function resolve_url(href, base) { if (url.URL) return new url.URL(href, base); // older Node version (< v6.13) return url.resolve(base, href); } function pump_streams(streams, cb) { if (stream.pipeline) return stream.pipeline.apply(null, streams.concat(cb)); var tmp = streams.shift(); while (streams.length) { tmp = tmp.pipe(streams.shift()); tmp.once('error', function(e) { cb && cb(e); cb = null; }) } } ////////////////////////////////////////// // the main act function Needle(method, uri, data, options, callback) { // if (!(this instanceof Needle)) { // return new Needle(method, uri, data, options, callback); // } if (typeof uri !== 'string') throw new TypeError('URL must be a string, not ' + uri); this.method = method.toLowerCase(); this.uri = uri; this.data = data; if (typeof options == 'function') { this.callback = options; this.options = {}; } else { this.callback = callback; this.options = options; } } Needle.prototype.setup = function(uri, options) { function get_option(key, fallback) { // if original is in options, return that value if (typeof options[key] != 'undefined') return options[key]; // otherwise, return value from alias or fallback/undefined return typeof options[aliased.inverted[key]] != 'undefined' ? options[aliased.inverted[key]] : fallback; } function check_value(expected, key) { var value = get_option(key), type = typeof value; if (type != 'undefined' && type != expected) throw new TypeError(type + ' received for ' + key + ', but expected a ' + expected); return (type == expected) ? value : defaults[key]; } ////////////////////////////////////////////////// // the basics var config = { http_opts : { localAddress: get_option('localAddress', undefined), lookup: get_option('lookup', undefined) }, // passed later to http.request() directly headers : {}, output : options.output, proxy : get_option('proxy', defaults.proxy), parser : get_option('parse_response', defaults.parse_response), encoding : options.encoding || (options.multipart ? 'binary' : defaults.encoding) } keys_by_type(Boolean).forEach(function(key) { config[key] = check_value('boolean', key); }) keys_by_type(Number).forEach(function(key) { config[key] = check_value('number', key); }) // populate http_opts with given TLS options tls_options.split(' ').forEach(function(key) { if (typeof options[key] != 'undefined') { config.http_opts[key] = options[key]; if (typeof options.agent == 'undefined') config.http_opts.agent = false; // otherwise tls options are skipped } }); ////////////////////////////////////////////////// // headers, cookies for (var key in defaults.headers) config.headers[key] = defaults.headers[key]; config.headers['accept'] = options.accept || defaults.accept; config.headers['user-agent'] = options.user_agent || defaults.user_agent; if (options.content_type) config.headers['content-type'] = options.content_type; // set connection header if opts.connection was passed, or if node < 0.11.4 (close) if (options.connection || close_by_default) config.headers['connection'] = options.connection || 'close'; if ((options.compressed || defaults.compressed) && typeof zlib != 'undefined') config.headers['accept-encoding'] = decompressors['br'] ? 'gzip, deflate, br' : 'gzip, deflate'; if (options.cookies) config.headers['cookie'] = cookies.write(options.cookies); ////////////////////////////////////////////////// // basic/digest auth if (uri.match(/[^\/]@/)) { // url contains user:pass@host, so parse it. var parts = (url.parse(uri).auth || '').split(':'); options.username = parts[0]; options.password = parts[1]; } if (options.username) { if (options.auth && (options.auth == 'auto' || options.auth == 'digest')) { config.credentials = [options.username, options.password]; } else { config.headers['authorization'] = auth.basic(options.username, options.password); } } // if proxy is present, set auth header from either url or proxy_user option. if (config.proxy) { if (config.proxy.indexOf('http') === -1) config.proxy = 'http://' + config.proxy; if (config.proxy.indexOf('@') !== -1) { var proxy = (url.parse(config.proxy).auth || '').split(':'); options.proxy_user = proxy[0]; options.proxy_pass = proxy[1]; } if (options.proxy_user) config.headers['proxy-authorization'] = auth.basic(options.proxy_user, options.proxy_pass); } // now that all our headers are set, overwrite them if instructed. for (var h in options.headers) config.headers[h.toLowerCase()] = options.headers[h]; config.uri_modifier = get_option('uri_modifier', null); return config; } Needle.prototype.start = function() { var out = new stream.PassThrough({ objectMode: false }), uri = this.uri, data = this.data, method = this.method, callback = (typeof this.options == 'function') ? this.options : this.callback, options = this.options || {}; // if no 'http' is found on URL, prepend it. if (uri.indexOf('http') === -1) uri = uri.replace(/^(\/\/)?/, 'http://'); var self = this, body, waiting = false, config = this.setup(uri, options); // unless options.json was set to false, assume boss also wants JSON if content-type matches. var json = options.json || (options.json !== false && config.headers['content-type'] == 'application/json'); if (data) { if (options.multipart) { // boss says we do multipart. so we do it. var boundary = options.boundary || defaults.boundary; waiting = true; multipart.build(data, boundary, function(err, parts) { if (err) throw(err); config.headers['content-type'] = 'multipart/form-data; boundary=' + boundary; next(parts); }); } else if (is_stream(data)) { if (method == 'get') throw new Error('Refusing to pipe() a stream via GET. Did you mean .post?'); if (config.stream_length > 0 || (config.stream_length === 0 && data.path)) { // ok, let's get the stream's length and set it as the content-length header. // this prevents some servers from cutting us off before all the data is sent. waiting = true; get_stream_length(data, config.stream_length, function(length) { data.length = length; next(data); }) } else { // if the boss doesn't want us to get the stream's length, or if it doesn't // have a file descriptor for that purpose, then just head on. body = data; } } else if (Buffer.isBuffer(data)) { body = data; // use the raw buffer as request body. } else if (method == 'get' && !json) { // append the data to the URI as a querystring. uri = uri.replace(/\?.*|$/, '?' + stringify(data)); } else { // string or object data, no multipart. // if string, leave it as it is, otherwise, stringify. body = (typeof(data) === 'string') ? data : json ? JSON.stringify(data) : stringify(data); // ensure we have a buffer so bytecount is correct. body = Buffer.from(body, config.encoding); } } function next(body) { if (body) { if (body.length) config.headers['content-length'] = body.length; // if no content-type was passed, determine if json or not. if (!config.headers['content-type']) { config.headers['content-type'] = json ? 'application/json; charset=utf-8' : 'application/x-www-form-urlencoded'; // no charset says W3 spec. } } // unless a specific accept header was set, assume json: true wants JSON back. if (options.json && (!options.accept && !(options.headers || {}).accept)) config.headers['accept'] = 'application/json'; self.send_request(1, method, uri, config, body, out, callback); } if (!waiting) next(body); return out; } Needle.prototype.get_request_opts = function(method, uri, config) { var opts = config.http_opts, proxy = config.proxy, remote = proxy ? url.parse(proxy) : url.parse(uri); opts.protocol = remote.protocol; opts.host = remote.hostname; opts.port = remote.port || (remote.protocol == 'https:' ? 443 : 80); opts.path = proxy ? uri : remote.pathname + (remote.search || ''); opts.method = method; opts.headers = config.headers; if (!opts.headers['host']) { // if using proxy, make sure the host header shows the final destination var target = proxy ? url.parse(uri) : remote; opts.headers['host'] = target.hostname; // and if a non standard port was passed, append it to the port header if (target.port && [80, 443].indexOf(target.port) === -1) { opts.headers['host'] += ':' + target.port; } } return opts; } Needle.prototype.should_follow = function(location, config, original) { if (!location) return false; // returns true if location contains matching property (host or protocol) function matches(property) { var property = original[property]; return location.indexOf(property) !== -1; } // first, check whether the requested location is actually different from the original if (!config.follow_if_same_location && location === original) return false; if (config.follow_if_same_host && !matches('host')) return false; // host does not match, so not following if (config.follow_if_same_protocol && !matches('protocol')) return false; // procotol does not match, so not following return true; } Needle.prototype.send_request = function(count, method, uri, config, post_data, out, callback) { if (typeof config.uri_modifier === 'function') { var modified_uri = config.uri_modifier(uri); debug('Modifying request URI', uri + ' => ' + modified_uri); uri = modified_uri; } var request, timer, returned = 0, self = this, request_opts = this.get_request_opts(method, uri, config), protocol = request_opts.protocol == 'https:' ? https : http; function done(err, resp) { if (returned++ > 0) return debug('Already finished, stopping here.'); if (timer) clearTimeout(timer); request.removeListener('error', had_error); out.done = true; if (callback) return callback(err, resp, resp ? resp.body : undefined); // NOTE: this event used to be called 'end', but the behaviour was confusing // when errors ocurred, because the stream would still emit an 'end' event. out.emit('done', err); // trigger the 'done' event on streams we're being piped to, if any var pipes = out._readableState.pipes || []; if (!pipes.forEach) pipes = [pipes]; pipes.forEach(function(st) { st.emit('done', err); }) } function had_error(err) { debug('Request error', err); out.emit('err', err); done(err || new Error('Unknown error when making request.')); } function set_timeout(type, milisecs) { if (timer) clearTimeout(timer); if (milisecs <= 0) return; timer = setTimeout(function() { out.emit('timeout', type); request.abort(); // also invoke done() to terminate job on read_timeout if (type == 'read') done(new Error(type + ' timeout')); }, milisecs); } // handle errors on the underlying socket, that may be closed while writing // for an example case, see test/long_string_spec.js. we make sure this // scenario ocurred by verifying the socket's writable & destroyed states. function on_socket_end() { if (returned && !this.writable && this.destroyed === false) { this.destroy(); had_error(new Error('Remote end closed socket abruptly.')) } } debug('Making request #' + count, request_opts); request = protocol.request(request_opts, function(resp) { var headers = resp.headers; debug('Got response', resp.statusCode, headers); out.emit('response', resp); set_timeout('read', config.read_timeout); // if we got cookies, parse them unless we were instructed not to. make sure to include any // cookies that might have been set on previous redirects. if (config.parse_cookies && (headers['set-cookie'] || config.previous_resp_cookies)) { resp.cookies = extend(config.previous_resp_cookies || {}, cookies.read(headers['set-cookie'])); debug('Got cookies', resp.cookies); } // if redirect code is found, determine if we should follow it according to the given options. if (redirect_codes.indexOf(resp.statusCode) !== -1 && self.should_follow(headers.location, config, uri)) { // clear timer before following redirects to prevent unexpected setTimeout consequence clearTimeout(timer); if (count <= config.follow_max) { out.emit('redirect', headers.location); // unless 'follow_keep_method' is true, rewrite the request to GET before continuing. if (!config.follow_keep_method) { method = 'GET'; post_data = null; delete config.headers['content-length']; // in case the original was a multipart POST request. } // if follow_set_cookies is true, insert cookies in the next request's headers. // we set both the original request cookies plus any response cookies we might have received. if (config.follow_set_cookies) { var request_cookies = cookies.read(config.headers['cookie']); config.previous_resp_cookies = resp.cookies; if (Object.keys(request_cookies).length || Object.keys(resp.cookies || {}).length) { config.headers['cookie'] = cookies.write(extend(request_cookies, resp.cookies)); } } else if (config.headers['cookie']) { debug('Clearing original request cookie', config.headers['cookie']); delete config.headers['cookie']; } if (config.follow_set_referer) config.headers['referer'] = encodeURI(uri); // the original, not the destination URL. config.headers['host'] = null; // clear previous Host header to avoid conflicts. var redirect_url = resolve_url(headers.location, uri); debug('Redirecting to ' + redirect_url.toString()); return self.send_request(++count, method, redirect_url.toString(), config, post_data, out, callback); } else if (config.follow_max > 0) { return done(new Error('Max redirects reached. Possible loop in: ' + headers.location)); } } // if auth is requested and credentials were not passed, resend request, provided we have user/pass. if (resp.statusCode == 401 && headers['www-authenticate'] && config.credentials) { if (!config.headers['authorization']) { // only if authentication hasn't been sent var auth_header = auth.header(headers['www-authenticate'], config.credentials, request_opts); if (auth_header) { config.headers['authorization'] = auth_header; return self.send_request(count, method, uri, config, post_data, out, callback); } } } // ok, so we got a valid (non-redirect & authorized) response. let's notify the stream guys. out.emit('header', resp.statusCode, headers); out.emit('headers', headers); var pipeline = [], mime = parse_content_type(headers['content-type']), text_response = mime.type && (mime.type.indexOf('text/') != -1 || !!mime.type.match(/(\/|\+)(xml|json)$/)); // To start, if our body is compressed and we're able to inflate it, do it. if (headers['content-encoding'] && decompressors[headers['content-encoding']]) { var decompressor = decompressors[headers['content-encoding']](); // make sure we catch errors triggered by the decompressor. decompressor.on('error', had_error); pipeline.push(decompressor); } // If parse is enabled and we have a parser for it, then go for it. if (config.parser && parsers[mime.type]) { // If a specific parser was requested, make sure we don't parse other types. var parser_name = config.parser.toString().toLowerCase(); if (['xml', 'json'].indexOf(parser_name) == -1 || parsers[mime.type].name == parser_name) { // OK, so either we're parsing all content types or the one requested matches. out.parser = parsers[mime.type].name; pipeline.push(parsers[mime.type].fn()); // Set objectMode on out stream to improve performance. out._writableState.objectMode = true; out._readableState.objectMode = true; } // If we're not parsing, and unless decoding was disabled, we'll try // decoding non UTF-8 bodies to UTF-8, using the iconv-lite library. } else if (text_response && config.decode_response && mime.charset) { pipeline.push(decoder(mime.charset)); } // And `out` is the stream we finally push the decoded/parsed output to. pipeline.push(out); // Now, release the kraken! pump_streams([resp].concat(pipeline), function(err) { if (err) debug(err) // on node v8.x, if an error ocurrs on the receiving end, // then we want to abort the request to avoid having dangling sockets if (err && err.message == 'write after end') request.destroy(); }); // If the user has requested and output file, pipe the output stream to it. // In stream mode, we will still get the response stream to play with. if (config.output && resp.statusCode == 200) { // for some reason, simply piping resp to the writable stream doesn't // work all the time (stream gets cut in the middle with no warning). // so we'll manually need to do the readable/write(chunk) trick. var file = fs.createWriteStream(config.output); file.on('error', had_error); out.on('end', function() { if (file.writable) file.end(); }); file.on('close', function() { delete out.file; }) out.on('readable', function() { var chunk; while ((chunk = this.read()) !== null) { if (file.writable) file.write(chunk); // if callback was requested, also push it to resp.body if (resp.body) resp.body.push(chunk); } }) out.file = file; } // Only aggregate the full body if a callback was requested. if (callback) { resp.raw = []; resp.body = []; resp.bytes = 0; // Gather and count the amount of (raw) bytes using a PassThrough stream. var clean_pipe = new stream.PassThrough(); clean_pipe.on('readable', function() { var chunk; while ((chunk = this.read()) != null) { resp.bytes += chunk.length; resp.raw.push(chunk); } }) pump_streams([resp, clean_pipe], function(err) { if (err) debug(err); }); // Listen on the 'readable' event to aggregate the chunks, but only if // file output wasn't requested. Otherwise we'd have two stream readers. if (!config.output || resp.statusCode != 200) { out.on('readable', function() { var chunk; while ((chunk = this.read()) !== null) { // We're either pushing buffers or objects, never strings. if (typeof chunk == 'string') chunk = Buffer.from(chunk); // Push all chunks to resp.body. We'll bind them in resp.end(). resp.body.push(chunk); } }) } } // And set the .body property once all data is in. out.on('end', function() { if (resp.body) { // callback mode // we want to be able to access to the raw data later, so keep a reference. resp.raw = Buffer.concat(resp.raw); // if parse was successful, we should have an array with one object if (resp.body[0] !== undefined && !Buffer.isBuffer(resp.body[0])) { // that's our body right there. resp.body = resp.body[0]; // set the parser property on our response. we may want to check. if (out.parser) resp.parser = out.parser; } else { // we got one or several buffers. string or binary. resp.body = Buffer.concat(resp.body); // if we're here and parsed is true, it means we tried to but it didn't work. // so given that we got a text response, let's stringify it. if (text_response || out.parser) { resp.body = resp.body.toString(); } } } // if an output file is being written to, make sure the callback // is triggered after all data has been written to it. if (out.file) { out.file.on('close', function() { done(null, resp); }) } else { // elvis has left the building. done(null, resp); } }); // out.on('error', function(err) { // had_error(err); // if (err.code == 'ERR_STREAM_DESTROYED' || err.code == 'ERR_STREAM_PREMATURE_CLOSE') { // request.abort(); // } // }) }); // end request call // unless open_timeout was disabled, set a timeout to abort the request. set_timeout('open', config.open_timeout); // handle errors on the request object. things might get bumpy. request.on('error', had_error); // make sure timer is cleared if request is aborted (issue #257) request.once('abort', function() { if (timer) clearTimeout(timer); }) // handle socket 'end' event to ensure we don't get delayed EPIPE errors. request.once('socket', function(socket) { if (socket.connecting) { socket.once('connect', function() { set_timeout('response', config.response_timeout); }) } else { set_timeout('response', config.response_timeout); } // socket.once('close', function(e) { // console.log('socket closed!', e); // }) if (!socket.on_socket_end) { socket.on_socket_end = on_socket_end; socket.once('end', function() { process.nextTick(on_socket_end.bind(socket)) }); } }) if (post_data) { if (is_stream(post_data)) { pump_streams([post_data, request], function(err) { if (err) debug(err); }); } else { request.write(post_data, config.encoding); request.end(); } } else { request.end(); } out.abort = function() { request.abort() }; // easier access out.request = request; return out; } ////////////////////////////////////////// // exports if (typeof Promise !== 'undefined') { module.exports = function() { var verb, args = [].slice.call(arguments); if (args[0].match(/\.|\//)) // first argument looks like a URL verb = (args.length > 2) ? 'post' : 'get'; else verb = args.shift(); if (verb.match(/get|head/i) && args.length == 2) args.splice(1, 0, null); // assume no data if head/get with two args (url, options) return new Promise(function(resolve, reject) { module.exports.request(verb, args[0], args[1], args[2], function(err, resp) { return err ? reject(err) : resolve(resp); }); }) } } module.exports.version = version; module.exports.defaults = function(obj) { for (var key in obj) { var target_key = aliased.options[key] || key; if (defaults.hasOwnProperty(target_key) && typeof obj[key] != 'undefined') { if (target_key != 'parse_response' && target_key != 'proxy') { // ensure type matches the original, except for proxy/parse_response that can be null/bool or string var valid_type = defaults[target_key].constructor.name; if (obj[key].constructor.name != valid_type) throw new TypeError('Invalid type for ' + key + ', should be ' + valid_type); } defaults[target_key] = obj[key]; } else { throw new Error('Invalid property for defaults:' + target_key); } } return defaults; } 'head get'.split(' ').forEach(function(method) { module.exports[method] = function(uri, options, callback) { return new Needle(method, uri, null, options, callback).start(); } }) 'post put patch delete'.split(' ').forEach(function(method) { module.exports[method] = function(uri, data, options, callback) { return new Needle(method, uri, data, options, callback).start(); } }) module.exports.request = function(method, uri, data, opts, callback) { return new Needle(method, uri, data, opts, callback).start(); }; /***/ }), /***/ 50722: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { ////////////////////////////////////////// // Defines mappings between content-type // and the appropriate parsers. ////////////////////////////////////////// var Transform = __webpack_require__(92413).Transform; var sax = __webpack_require__(36099); function parseXML(str, cb) { var obj, current, parser = sax.parser(true, { trim: true, lowercase: true }) parser.onerror = parser.onend = done; function done(err) { parser.onerror = parser.onend = function() { } cb(err, obj) } function newElement(name, attributes) { return { name: name || '', value: '', attributes: attributes || {}, children: [] } } parser.oncdata = parser.ontext = function(t) { if (current) current.value += t } parser.onopentag = function(node) { var element = newElement(node.name, node.attributes) if (current) { element.parent = current current.children.push(element) } else { // root object obj = element } current = element }; parser.onclosetag = function() { if (typeof current.parent !== 'undefined') { var just_closed = current current = current.parent delete just_closed.parent } } parser.write(str).close() } function parserFactory(name, fn) { function parser() { var chunks = [], stream = new Transform({ objectMode: true }); // Buffer all our data stream._transform = function(chunk, encoding, done) { chunks.push(chunk); done(); } // And call the parser when all is there. stream._flush = function(done) { var self = this, data = Buffer.concat(chunks); try { fn(data, function(err, result) { if (err) throw err; self.push(result); }); } catch (err) { self.push(data); // just pass the original data } finally { done(); } } return stream; } return { fn: parser, name: name }; } var parsers = {} function buildParser(name, types, fn) { var parser = parserFactory(name, fn); types.forEach(function(type) { parsers[type] = parser; }) } buildParser('json', [ 'application/json', 'text/javascript', 'application/vnd.api+json' ], function(buffer, cb) { var err, data; try { data = JSON.parse(buffer); } catch (e) { err = e; } cb(err, data); }); buildParser('xml', [ 'text/xml', 'application/xml', 'application/rdf+xml', 'application/rss+xml', 'application/atom+xml' ], function(buffer, cb) { parseXML(buffer.toString(), function(err, obj) { cb(err, obj) }) }); module.exports = parsers; module.exports.use = buildParser; /***/ }), /***/ 28280: /***/ ((__unused_webpack_module, exports) => { // based on the qs module, but handles null objects as expected // fixes by Tomas Pollak. var toString = Object.prototype.toString; function stringify(obj, prefix) { if (prefix && (obj === null || typeof obj == 'undefined')) { return prefix + '='; } else if (toString.call(obj) == '[object Array]') { return stringifyArray(obj, prefix); } else if (toString.call(obj) == '[object Object]') { return stringifyObject(obj, prefix); } else if (toString.call(obj) == '[object Date]') { return obj.toISOString(); } else if (prefix) { // string inside array or hash return prefix + '=' + encodeURIComponent(String(obj)); } else if (String(obj).indexOf('=') !== -1) { // string with equal sign return String(obj); } else { throw new TypeError('Cannot build a querystring out of: ' + obj); } }; function stringifyArray(arr, prefix) { var ret = []; for (var i = 0, len = arr.length; i < len; i++) { if (prefix) ret.push(stringify(arr[i], prefix + '[]')); else ret.push(stringify(arr[i])); } return ret.join('&'); } function stringifyObject(obj, prefix) { var ret = []; Object.keys(obj).forEach(function(key) { ret.push(stringify(obj[key], prefix ? prefix + '[' + encodeURIComponent(key) + ']' : encodeURIComponent(key))); }) return ret.join('&'); } exports.J = stringify; /***/ }), /***/ 49503: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const AggregateError = __webpack_require__(56455); module.exports = async ( iterable, mapper, { concurrency = Infinity, stopOnError = true } = {} ) => { return new Promise((resolve, reject) => { if (typeof mapper !== 'function') { throw new TypeError('Mapper function is required'); } if (!(typeof concurrency === 'number' && concurrency >= 1)) { throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); } const ret = []; const errors = []; const iterator = iterable[Symbol.iterator](); let isRejected = false; let isIterableDone = false; let resolvingCount = 0; let currentIndex = 0; const next = () => { if (isRejected) { return; } const nextItem = iterator.next(); const i = currentIndex; currentIndex++; if (nextItem.done) { isIterableDone = true; if (resolvingCount === 0) { if (!stopOnError && errors.length !== 0) { reject(new AggregateError(errors)); } else { resolve(ret); } } return; } resolvingCount++; (async () => { try { const element = await nextItem.value; ret[i] = await mapper(element, i); resolvingCount--; next(); } catch (error) { if (stopOnError) { isRejected = true; reject(error); } else { errors.push(error); resolvingCount--; next(); } } })(); }; for (let i = 0; i < concurrency; i++) { next(); if (isIterableDone) { break; } } }); }; /***/ }), /***/ 18920: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var parse_error_1 = __webpack_require__(78558); exports.ParseError = parse_error_1.ParseError; var invalid_user_input_error_1 = __webpack_require__(95362); exports.InvalidUserInputError = invalid_user_input_error_1.InvalidUserInputError; //# sourceMappingURL=index.js.map /***/ }), /***/ 95362: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class InvalidUserInputError extends Error { constructor(message) { super(message); this.name = 'InvalidUserInputError'; Error.captureStackTrace(this, InvalidUserInputError); } } exports.InvalidUserInputError = InvalidUserInputError; //# sourceMappingURL=invalid-user-input-error.js.map /***/ }), /***/ 78558: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class ParseError extends Error { constructor(message) { super(message); this.name = 'ParseError'; Error.captureStackTrace(this, ParseError); } } exports.ParseError = ParseError; //# sourceMappingURL=parse-error.js.map /***/ }), /***/ 59794: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs = __webpack_require__(35747); const _isEmpty = __webpack_require__(99245); const path = __webpack_require__(85622); const errors_1 = __webpack_require__(18920); const file_parser_1 = __webpack_require__(64702); const composer_parser_1 = __webpack_require__(70054); function buildDepTree(lockFileContent, manifestFileContent, defaultProjectName, systemVersions, includeDev = false) { const lockFileJson = file_parser_1.FileParser.parseLockFile(lockFileContent); const manifestJson = file_parser_1.FileParser.parseManifestFile(manifestFileContent); if (!lockFileJson.packages) { throw new errors_1.InvalidUserInputError('Invalid lock file. Must contain `packages` property'); } const name = manifestJson.name || defaultProjectName; const version = composer_parser_1.ComposerParser.getVersion(manifestJson) || '0.0.0'; const dependencies = composer_parser_1.ComposerParser.buildDependencies(manifestJson, lockFileJson, manifestJson, systemVersions, includeDev); const hasDevDependencies = !_isEmpty(manifestJson['require-dev']); return { name, version, dependencies, hasDevDependencies, packageFormatVersion: 'composer:0.0.1', }; } exports.buildDepTree = buildDepTree; function buildDepTreeFromFiles(basePath, lockFileName, systemVersions, includeDev = false) { if (!basePath) { throw new errors_1.InvalidUserInputError('Missing `basePath` parameter for buildDepTreeFromFiles()'); } if (!lockFileName) { throw new errors_1.InvalidUserInputError('Missing `lockfile` parameter for buildDepTreeFromFiles()'); } if (!systemVersions) { throw new errors_1.InvalidUserInputError('Missing `systemVersions` parameter for buildDepTreeFromFiles()'); } const lockFilePath = path.resolve(basePath, lockFileName); const manifestFilePath = path.resolve(basePath, path.dirname(lockFilePath), 'composer.json'); if (!fs.existsSync(lockFilePath)) { throw new errors_1.InvalidUserInputError(`Lockfile not found at location: ${lockFilePath}`); } if (!fs.existsSync(manifestFilePath)) { throw new errors_1.InvalidUserInputError(`Target file composer.json not found at location: ${manifestFilePath}`); } const lockFileContent = fs.readFileSync(lockFilePath, 'utf-8'); const manifestFileContent = fs.readFileSync(manifestFilePath, 'utf-8'); const defaultProjectName = getDefaultProjectName(basePath, lockFileName); return buildDepTree(lockFileContent, manifestFileContent, defaultProjectName, systemVersions, includeDev); } exports.buildDepTreeFromFiles = buildDepTreeFromFiles; function getDefaultProjectName(basePath, lockFileName) { return path.dirname(path.resolve(path.join(basePath, lockFileName))).split(path.sep).pop(); } //# sourceMappingURL=index.js.map /***/ }), /***/ 70054: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const _findKey = __webpack_require__(7495); const _get = __webpack_require__(29208); const _invert = __webpack_require__(6668); const _isEmpty = __webpack_require__(99245); const types_1 = __webpack_require__(69932); const _ = { get: _get, isEmpty: _isEmpty, invert: _invert, findKey: _findKey, }; class ComposerParser { static getVersion(depObj) { // check for `version` property. may not exist const versionFound = _.get(depObj, 'version', ''); // even if found, may be an alias, so check const availableAliases = _.get(depObj, "extra['branch-alias']", []); // if the version matches the alias (either as is, or without 'dev-'), use the aliases version. // otherwise, use the version as is, and if not, the first found alias return _.get(availableAliases, versionFound) || _.get(_.invert(availableAliases), versionFound.replace('dev-', '')) && versionFound.replace('dev-', '') || versionFound || _.findKey(_.invert(availableAliases), '0'); // first available alias } static buildDependencies(composerJsonObj, composerLockObj, depObj, systemPackages, includeDev = false, isDevTree = false, depRecursiveArray = [], packageRefCount = {}) { const result = {}; // find depObj properties const depName = _.get(depObj, 'name'); const require = _.get(depObj, 'require', {}); const requireDev = includeDev ? _.get(depObj, 'require-dev', {}) : {}; // recursion tests const inRecursiveArray = depRecursiveArray.indexOf(depName) > -1; const exceedsMaxRepeats = packageRefCount[depName] >= this.MAX_PACKAGE_REPEATS; const hasNoDependencies = _.isEmpty(require) && _.isEmpty(requireDev); // break recursion when if (inRecursiveArray || exceedsMaxRepeats || hasNoDependencies) { return result; } // prevent circular dependencies depRecursiveArray.push(depName); // get locked packages const packages = _.get(composerLockObj, 'packages', []); const packagesDev = includeDev ? _.get(composerLockObj, 'packages-dev', []) : []; const allPackages = [ ...packages, ...packagesDev, ]; // parse require dependencies for (const name of Object.keys(require)) { let version = ''; // lets find if this dependency has an object in composer.lock const lockedPackage = allPackages.find((dep) => dep.name === name); if (lockedPackage) { version = this.getVersion(lockedPackage); } else { // here we use the system version or composer json - not a locked version version = _.get(systemPackages, name) || _.get(require, name); } // remove any starting 'v' from version numbers version = version.replace(/^v(\d)/, '$1'); // bump package reference count (or assign to 1 if we haven't seen this before) packageRefCount[name] = (packageRefCount[name] || 0) + 1; result[name] = { name, version, dependencies: this.buildDependencies(composerJsonObj, composerLockObj, lockedPackage, // undefined if transitive dependency systemPackages, includeDev, false, depRecursiveArray, packageRefCount), labels: { scope: isDevTree ? types_1.Scope.dev : types_1.Scope.prod, }, }; } // parse require-dev dependencies for (const name of Object.keys(requireDev)) { let version = ''; // lets find if this dependency has an object in composer.lock const lockedPackage = allPackages.find((dep) => dep.name === name); if (lockedPackage) { version = this.getVersion(lockedPackage); } else { // here we use the system version or composer json - not a locked version version = _.get(systemPackages, name) || _.get(requireDev, name); } // remove any starting 'v' from version numbers version = version.replace(/^v(\d)/, '$1'); // bump package reference count (or assign to 1 if we haven't seen this before) packageRefCount[name] = (packageRefCount[name] || 0) + 1; result[name] = { name, version, dependencies: this.buildDependencies(composerJsonObj, composerLockObj, lockedPackage, // undefined if transitive dependency systemPackages, includeDev, true, depRecursiveArray, packageRefCount), labels: { scope: types_1.Scope.dev, }, }; } // remove from recursive check depRecursiveArray.pop(); // return dep tree return result; } } exports.ComposerParser = ComposerParser; // After this threshold, a package node in the dep tree won't have expanded dependencies. // This is a cheap protection against combinatorial explosion when there's N packages // that depend on each other (producing N! branches of the dep tree). // The value of 150 was chosen as a lowest one that doesn't break existing tests. // Switching to dependency graph would render this trick obsolete. ComposerParser.MAX_PACKAGE_REPEATS = 150; //# sourceMappingURL=composer-parser.js.map /***/ }), /***/ 64702: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const errors_1 = __webpack_require__(18920); class FileParser { static parseLockFile(lockFileContent) { try { return JSON.parse(lockFileContent); } catch (e) { throw new errors_1.ParseError(`Failed to parse lock file. Error: ${e.message}`); } } static parseManifestFile(manifestFileContent) { try { return JSON.parse(manifestFileContent); } catch (e) { throw new errors_1.ParseError(`Failed to parse manifest file. Error: ${e.message}`); } } } exports.FileParser = FileParser; //# sourceMappingURL=file-parser.js.map /***/ }), /***/ 69932: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var Scope; (function (Scope) { Scope["prod"] = "prod"; Scope["dev"] = "dev"; })(Scope = exports.Scope || (exports.Scope = {})); //# sourceMappingURL=index.js.map /***/ }), /***/ 81608: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DepGraphBuilder = void 0; const graphlib = __webpack_require__(77947); const dep_graph_1 = __webpack_require__(80918); class DepGraphBuilder { constructor(pkgManager, rootPkg) { this._pkgs = {}; this._pkgNodes = {}; const graph = new graphlib.Graph({ directed: true, multigraph: false, compound: false, }); if (!rootPkg) { rootPkg = { name: '_root', version: '0.0.0', }; } this._rootNodeId = 'root-node'; this._rootPkgId = DepGraphBuilder._getPkgId(rootPkg); this._pkgs[this._rootPkgId] = rootPkg; graph.setNode(this._rootNodeId, { pkgId: this._rootPkgId }); this._pkgNodes[this._rootPkgId] = new Set([this._rootNodeId]); this._graph = graph; this._pkgManager = pkgManager; } get rootNodeId() { return this._rootNodeId; } static _getPkgId(pkg) { return `${pkg.name}@${pkg.version || ''}`; } getPkgs() { return Object.values(this._pkgs); } // TODO: this can create disconnected nodes addPkgNode(pkgInfo, nodeId, nodeInfo) { if (nodeId === this._rootNodeId) { throw new Error('DepGraphBuilder.addPkgNode() cant override root node'); } const pkgId = DepGraphBuilder._getPkgId(pkgInfo); this._pkgs[pkgId] = pkgInfo; this._pkgNodes[pkgId] = this._pkgNodes[pkgId] || new Set(); this._pkgNodes[pkgId].add(nodeId); this._graph.setNode(nodeId, { pkgId, info: nodeInfo }); return this; } // TODO: this can create cycles connectDep(parentNodeId, depNodeId) { if (!this._graph.hasNode(parentNodeId)) { throw new Error('parentNodeId does not exist'); } if (!this._graph.hasNode(depNodeId)) { throw new Error('depNodeId does not exist'); } this._graph.setEdge(parentNodeId, depNodeId); return this; } build() { return new dep_graph_1.DepGraphImpl(this._graph, this._rootNodeId, this._pkgs, this._pkgNodes, this._pkgManager); } } exports.DepGraphBuilder = DepGraphBuilder; //# sourceMappingURL=builder.js.map /***/ }), /***/ 6139: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFromJSON = exports.SUPPORTED_SCHEMA_RANGE = void 0; const semver = __webpack_require__(21663); const graphlib = __webpack_require__(77947); const errors_1 = __webpack_require__(79651); const validate_graph_1 = __webpack_require__(80753); const dep_graph_1 = __webpack_require__(80918); exports.SUPPORTED_SCHEMA_RANGE = '^1.0.0'; /** * Create a DepGraph instance from a JSON representation of a dep graph. This * is typically used after passing the graph over the wire as `DepGraphData`. */ function createFromJSON(depGraphData) { validateDepGraphData(depGraphData); const graph = new graphlib.Graph({ directed: true, multigraph: false, compound: false, }); const pkgs = {}; const pkgNodes = {}; for (const { id, info } of depGraphData.pkgs) { pkgs[id] = info.version ? info : Object.assign(Object.assign({}, info), { version: undefined }); } for (const node of depGraphData.graph.nodes) { const pkgId = node.pkgId; if (!pkgNodes[pkgId]) { pkgNodes[pkgId] = new Set(); } pkgNodes[pkgId].add(node.nodeId); graph.setNode(node.nodeId, { pkgId, info: node.info }); } for (const node of depGraphData.graph.nodes) { for (const depNodeId of node.deps) { graph.setEdge(node.nodeId, depNodeId.nodeId); } } validate_graph_1.validateGraph(graph, depGraphData.graph.rootNodeId, pkgs, pkgNodes); return new dep_graph_1.DepGraphImpl(graph, depGraphData.graph.rootNodeId, pkgs, pkgNodes, depGraphData.pkgManager); } exports.createFromJSON = createFromJSON; function assert(condition, msg) { if (!condition) { throw new errors_1.ValidationError(msg); } } function validateDepGraphData(depGraphData) { assert(!!semver.valid(depGraphData.schemaVersion) && semver.satisfies(depGraphData.schemaVersion, exports.SUPPORTED_SCHEMA_RANGE), `dep-graph schemaVersion not in "${exports.SUPPORTED_SCHEMA_RANGE}"`); assert(depGraphData.pkgManager && !!depGraphData.pkgManager.name, '.pkgManager.name is missing'); const pkgsMap = depGraphData.pkgs.reduce((acc, cur) => { assert(!(cur.id in acc), 'more than one pkg with same id'); assert(!!cur.info, '.pkgs item missing .info'); acc[cur.id] = cur.info; return acc; }, {}); const nodesMap = depGraphData.graph.nodes.reduce((acc, cur) => { assert(!(cur.nodeId in acc), 'more than on node with same id'); acc[cur.nodeId] = cur; return acc; }, {}); const rootNodeId = depGraphData.graph.rootNodeId; const rootNode = nodesMap[rootNodeId]; assert(rootNodeId in nodesMap, `.${rootNodeId} root graph node is missing`); const rootPkgId = rootNode.pkgId; assert(rootPkgId in pkgsMap, `.${rootPkgId} root pkg missing`); assert(nodesMap[rootNodeId].pkgId === rootPkgId, `the root node .pkgId should be "${rootPkgId}"`); const pkgIds = Object.keys(pkgsMap); // NOTE: this name@version check is very strict, // we can relax it later, it just makes things easier now assert(pkgIds.filter((pkgId) => pkgId !== dep_graph_1.DepGraphImpl.getPkgId(pkgsMap[pkgId])) .length === 0, 'pkgs ids should be name@version'); assert(Object.values(nodesMap).filter((node) => !(node.pkgId in pkgsMap)) .length === 0, 'some instance nodes belong to non-existing pkgIds'); assert(Object.values(pkgsMap).filter((pkg) => !pkg.name) .length === 0, 'some .pkgs elements have no .name field'); } //# sourceMappingURL=create-from-json.js.map /***/ }), /***/ 80918: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DepGraphImpl = void 0; const _isEqual = __webpack_require__(72307); const graphlib = __webpack_require__(77947); const create_from_json_1 = __webpack_require__(6139); class DepGraphImpl { constructor(_graph, _rootNodeId, _pkgs, _pkgNodes, _pkgManager) { this._graph = _graph; this._rootNodeId = _rootNodeId; this._pkgs = _pkgs; this._pkgNodes = _pkgNodes; this._pkgManager = _pkgManager; this._countNodePathsToRootCache = new Map(); this._rootPkgId = _graph.node(_rootNodeId).pkgId; this._pkgList = Object.values(_pkgs); this._depPkgsList = this._pkgList.filter((pkg) => pkg !== this.rootPkg); } static getPkgId(pkg) { return `${pkg.name}@${pkg.version || ''}`; } get pkgManager() { return this._pkgManager; } get rootPkg() { return this._pkgs[this._rootPkgId]; } get rootNodeId() { return this._rootNodeId; } /** * Get all unique packages in the graph (including the root package) */ getPkgs() { return this._pkgList; } /** * Get all unique packages in the graph (excluding the root package) */ getDepPkgs() { return this._depPkgsList; } getPkgNodes(pkg) { const pkgId = DepGraphImpl.getPkgId(pkg); const nodes = []; for (const nodeId of Array.from(this._pkgNodes[pkgId])) { const graphNode = this.getGraphNode(nodeId); nodes.push({ info: graphNode.info || {}, }); } return nodes; } getNode(nodeId) { return this.getGraphNode(nodeId).info || {}; } getNodePkg(nodeId) { return this._pkgs[this.getGraphNode(nodeId).pkgId]; } getPkgNodeIds(pkg) { const pkgId = DepGraphImpl.getPkgId(pkg); if (!this._pkgs[pkgId]) { throw new Error(`no such pkg: ${pkgId}`); } return Array.from(this._pkgNodes[pkgId]); } getNodeDepsNodeIds(nodeId) { const deps = this._graph.successors(nodeId); if (!deps) { throw new Error(`no such node: ${nodeId}`); } return deps; } getNodeParentsNodeIds(nodeId) { const parents = this._graph.predecessors(nodeId); if (!parents) { throw new Error(`no such node: ${nodeId}`); } return parents; } hasCycles() { // `isAcyclic` is expensive, so memoize if (this._hasCycles === undefined) { this._hasCycles = !graphlib.alg.isAcyclic(this._graph); } return this._hasCycles; } pkgPathsToRoot(pkg) { const pathsToRoot = []; for (const nodeId of this.getPkgNodeIds(pkg)) { const pathsFromNodeToRoot = this.pathsFromNodeToRoot(nodeId); for (const path of pathsFromNodeToRoot) { pathsToRoot.push(path); } } // note: sorting to get shorter paths first - // it's nicer - and better resembles older behaviour return pathsToRoot.sort((a, b) => a.length - b.length); } countPathsToRoot(pkg) { let count = 0; for (const nodeId of this.getPkgNodeIds(pkg)) { count += this.countNodePathsToRoot(nodeId); } return count; } equals(other, { compareRoot = true } = {}) { let otherDepGraph; if (other instanceof DepGraphImpl) { otherDepGraph = other; } else { // At runtime theoretically we can have multiple versions of // @snyk/dep-graph. If "other" is not an instance of the same class it is // safer to rebuild it from JSON. otherDepGraph = create_from_json_1.createFromJSON(other.toJSON()); } // In theory, for the graphs created by standard means, `_.isEquals(this._data, otherDepGraph._data)` // should suffice, since node IDs will be generated in a predictable way. // However, there might be different versions of graph and inconsistencies // in the ordering of the arrays, so we perform a deep comparison. return this.nodeEquals(this, this.rootNodeId, otherDepGraph, otherDepGraph.rootNodeId, compareRoot); } directDepsLeadingTo(pkg) { const pkgNodes = this.getPkgNodeIds(pkg); const directDeps = this.getNodeDepsNodeIds(this.rootNodeId); const nodes = directDeps.filter((directDep) => { const reachableNodes = graphlib.alg.postorder(this._graph, [directDep]); return reachableNodes.filter((node) => pkgNodes.includes(node)).length; }); return nodes.map((node) => this.getNodePkg(node)); } /** * Create a JSON representation of a dep graph. This is typically used to * send the dep graph over the wire */ toJSON() { const nodeIds = this._graph.nodes(); const nodes = nodeIds.reduce((acc, nodeId) => { const deps = (this._graph.successors(nodeId) || []).map((depNodeId) => ({ nodeId: depNodeId, })); const node = this._graph.node(nodeId); const elem = { nodeId, pkgId: node.pkgId, deps, }; if (node.info && Object.keys(node.info).length > 0) { elem.info = node.info; } acc.push(elem); return acc; }, []); const pkgs = Object.keys(this._pkgs).map((pkgId) => ({ id: pkgId, info: this._pkgs[pkgId], })); return { schemaVersion: DepGraphImpl.SCHEMA_VERSION, pkgManager: this._pkgManager, pkgs, graph: { rootNodeId: this._rootNodeId, nodes, }, }; } nodeEquals(graphA, nodeIdA, graphB, nodeIdB, compareRoot, traversedPairs = new Set()) { // Skip root nodes comparision if needed. if (compareRoot || (nodeIdA !== graphA.rootNodeId && nodeIdB !== graphB.rootNodeId)) { const pkgA = graphA.getNodePkg(nodeIdA); const pkgB = graphB.getNodePkg(nodeIdB); // Compare PkgInfo (name and version). if (!_isEqual(pkgA, pkgB)) { return false; } const infoA = graphA.getNode(nodeIdA); const infoB = graphB.getNode(nodeIdB); // Compare NodeInfo (VersionProvenance and labels). if (!_isEqual(infoA, infoB)) { return false; } } let depsA = graphA.getNodeDepsNodeIds(nodeIdA); let depsB = graphB.getNodeDepsNodeIds(nodeIdB); // Number of dependencies should be the same. if (depsA.length !== depsB.length) { return false; } // Sort dependencies by name@version string. const sortFn = (graph) => (idA, idB) => { const pkgA = graph.getNodePkg(idA); const pkgB = graph.getNodePkg(idB); return DepGraphImpl.getPkgId(pkgA).localeCompare(DepGraphImpl.getPkgId(pkgB)); }; depsA = depsA.sort(sortFn(graphA)); depsB = depsB.sort(sortFn(graphB)); // Compare Each dependency recursively. for (let i = 0; i < depsA.length; i++) { const pairKey = `${depsA[i]}_${depsB[i]}`; // Prevent cycles. if (traversedPairs.has(pairKey)) { continue; } traversedPairs.add(pairKey); if (!this.nodeEquals(graphA, depsA[i], graphB, depsB[i], compareRoot, traversedPairs)) { return false; } } return true; } getGraphNode(nodeId) { const node = this._graph.node(nodeId); if (!node) { throw new Error(`no such node: ${nodeId}`); } return node; } pathsFromNodeToRoot(nodeId, ancestors = []) { const parentNodesIds = this.getNodeParentsNodeIds(nodeId); const pkgInfo = this.getNodePkg(nodeId); if (parentNodesIds.length === 0) { return [[pkgInfo]]; } const allPaths = []; ancestors = ancestors.concat(nodeId); for (const id of parentNodesIds) { if (ancestors.includes(id)) continue; const pathToRoot = this.pathsFromNodeToRoot(id, ancestors).map((path) => [pkgInfo].concat(path)); for (const path of pathToRoot) { allPaths.push(path); } } return allPaths; } countNodePathsToRoot(nodeId, ancestors = []) { if (ancestors.includes(nodeId)) { return 0; } if (this._countNodePathsToRootCache.has(nodeId)) { return this._countNodePathsToRootCache.get(nodeId) || 0; } const parentNodesIds = this.getNodeParentsNodeIds(nodeId); if (parentNodesIds.length === 0) { this._countNodePathsToRootCache.set(nodeId, 1); return 1; } ancestors = ancestors.concat(nodeId); const count = parentNodesIds.reduce((acc, parentNodeId) => { return acc + this.countNodePathsToRoot(parentNodeId, ancestors); }, 0); this._countNodePathsToRootCache.set(nodeId, count); return count; } } exports.DepGraphImpl = DepGraphImpl; DepGraphImpl.SCHEMA_VERSION = '1.2.0'; //# sourceMappingURL=dep-graph.js.map /***/ }), /***/ 54519: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CustomError = void 0; class CustomError extends Error { constructor(message) { super(message); Object.setPrototypeOf(this, CustomError.prototype); Error.captureStackTrace(this, this.constructor); this.name = this.constructor.name; } } exports.CustomError = CustomError; //# sourceMappingURL=custom-error.js.map /***/ }), /***/ 79651: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ValidationError = void 0; const validation_error_1 = __webpack_require__(85151); Object.defineProperty(exports, "ValidationError", ({ enumerable: true, get: function () { return validation_error_1.ValidationError; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 85151: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ValidationError = void 0; const custom_error_1 = __webpack_require__(54519); class ValidationError extends custom_error_1.CustomError { constructor(message) { super(message); Object.setPrototypeOf(this, ValidationError.prototype); } } exports.ValidationError = ValidationError; //# sourceMappingURL=validation-error.js.map /***/ }), /***/ 80753: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateGraph = void 0; const graphlib = __webpack_require__(77947); const errors_1 = __webpack_require__(79651); function assert(condition, msg) { if (!condition) { throw new errors_1.ValidationError(msg); } } function validateGraph(graph, rootNodeId, pkgs, pkgNodes) { assert((graph.predecessors(rootNodeId) || []).length === 0, `"${rootNodeId}" is not really the root`); const reachableFromRoot = graphlib.alg.postorder(graph, [rootNodeId]); const nodeIds = graph.nodes(); assert(JSON.stringify(nodeIds.sort()) === JSON.stringify(reachableFromRoot.sort()), 'not all graph nodes are reachable from root'); const pkgIds = Object.keys(pkgs); const pkgsWithoutInstances = pkgIds.filter((pkgId) => !pkgNodes[pkgId] || pkgNodes[pkgId].size === 0); assert(pkgsWithoutInstances.length === 0, 'not all pkgs have instance nodes'); } exports.validateGraph = validateGraph; //# sourceMappingURL=validate-graph.js.map /***/ }), /***/ 25261: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.dfs = void 0; const each = __webpack_require__(43590); /* * A helper that preforms a pre- or post-order traversal on the input graph * and returns the nodes in the order they were visited. If the graph is * undirected then this algorithm will navigate using neighbors. If the graph * is directed then this algorithm will navigate using successors. * * Order must be one of "pre" or "post". */ function dfs(g, vs, order) { if (!Array.isArray(vs)) { vs = [vs]; } const navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); const acc = []; const visited = {}; each(vs, (v) => { if (!g.hasNode(v)) { throw new Error('Graph does not have node: ' + v); } doDfs(g, v, order === 'post', visited, navigation, acc); }); return acc; } exports.dfs = dfs; function doDfs(g, v, postorder, visited, navigation, acc) { if (!(v in visited)) { visited[v] = true; if (!postorder) { acc.push(v); } each(navigation(v), function (w) { doDfs(g, w, postorder, visited, navigation, acc); }); if (postorder) { acc.push(v); } } } //# sourceMappingURL=dfs.js.map /***/ }), /***/ 40976: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isAcyclic = void 0; const topsort_1 = __webpack_require__(29865); function isAcyclic(g) { try { topsort_1.topsort(g); } catch (e) { if (e instanceof topsort_1.CycleException) { return false; } throw e; } return true; } exports.isAcyclic = isAcyclic; //# sourceMappingURL=is-acyclic.js.map /***/ }), /***/ 45300: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.postorder = void 0; const dfs_1 = __webpack_require__(25261); function postorder(g, vs) { return dfs_1.dfs(g, vs, 'post'); } exports.postorder = postorder; //# sourceMappingURL=postorder.js.map /***/ }), /***/ 29865: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CycleException = exports.topsort = void 0; const each = __webpack_require__(43590); const size = __webpack_require__(27946); function topsort(g) { const visited = {}; const stack = {}; const results = []; function visit(node) { if (node in stack) { throw new CycleException(); } if (!(node in visited)) { stack[node] = true; visited[node] = true; each(g.predecessors(node), visit); delete stack[node]; results.push(node); } } each(g.sinks(), visit); if (size(visited) !== g.nodeCount()) { throw new CycleException(); } return results; } exports.topsort = topsort; class CycleException extends Error { } exports.CycleException = CycleException; //# sourceMappingURL=topsort.js.map /***/ }), /***/ 69946: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Graph = void 0; /* eslint-disable prefer-rest-params */ /* eslint-disable @typescript-eslint/no-this-alias */ const constant = __webpack_require__(4254); const each = __webpack_require__(43590); const _filter = __webpack_require__(43590); const isEmpty = __webpack_require__(99245); const isFunction = __webpack_require__(98423); const isUndefined = __webpack_require__(28801); const keys = __webpack_require__(44799); const reduce = __webpack_require__(34766); const union = __webpack_require__(96744); const values = __webpack_require__(17720); const DEFAULT_EDGE_NAME = '\x00'; const GRAPH_NODE = '\x00'; const EDGE_KEY_DELIM = '\x01'; // Implementation notes: // // * Node id query functions should return string ids for the nodes // * Edge id query functions should return an "edgeObj", edge object, that is // composed of enough information to uniquely identify an edge: {v, w, name}. // * Internally we use an "edgeId", a stringified form of the edgeObj, to // reference edges. This is because we need a performant way to look these // edges up and, object properties, which have string keys, are the closest // we're going to get to a performant hashtable in JavaScript. class Graph { constructor(opts) { var _a, _b, _c; /* Number of nodes in the graph. Should only be changed by the implementation. */ this._nodeCount = 0; /* Number of edges in the graph. Should only be changed by the implementation. */ this._edgeCount = 0; this._isDirected = (_a = opts === null || opts === void 0 ? void 0 : opts.directed) !== null && _a !== void 0 ? _a : true; this._isMultigraph = (_b = opts === null || opts === void 0 ? void 0 : opts.multigraph) !== null && _b !== void 0 ? _b : false; this._isCompound = (_c = opts === null || opts === void 0 ? void 0 : opts.compound) !== null && _c !== void 0 ? _c : false; // Label for the graph itself this._label = undefined; // Defaults to be set when creating a new node this._defaultNodeLabelFn = constant(undefined); // Defaults to be set when creating a new edge this._defaultEdgeLabelFn = constant(undefined); // v -> label this._nodes = {}; if (this._isCompound) { // v -> parent this._parent = {}; // v -> children this._children = {}; this._children[GRAPH_NODE] = {}; } // v -> edgeObj this._in = {}; // u -> v -> Number this._preds = {}; // v -> edgeObj this._out = {}; // v -> w -> Number this._sucs = {}; // e -> edgeObj this._edgeObjs = {}; // e -> label this._edgeLabels = {}; } /* === Graph functions ========= */ isDirected() { return this._isDirected; } isMultigraph() { return this._isMultigraph; } isCompound() { return this._isCompound; } setGraph(label) { this._label = label; return this; } graph() { return this._label; } /* === Node functions ========== */ setDefaultNodeLabel(newDefault) { if (!isFunction(newDefault)) { newDefault = constant(newDefault); } this._defaultNodeLabelFn = newDefault; return this; } nodeCount() { return this._nodeCount; } nodes() { return keys(this._nodes); } sources() { const self = this; return _filter(this.nodes(), function (v) { return isEmpty(self._in[v]); }); } sinks() { const self = this; return _filter(this.nodes(), function (v) { return isEmpty(self._out[v]); }); } setNodes(vs, value) { const args = arguments; const self = this; each(vs, function (v) { if (args.length > 1) { self.setNode(v, value); } else { self.setNode(v); } }); return this; } setNode(v, value) { if (v in this._nodes) { if (arguments.length > 1) { this._nodes[v] = value; } return this; } this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); if (this._isCompound) { this._parent[v] = GRAPH_NODE; this._children[v] = {}; this._children[GRAPH_NODE][v] = true; } this._in[v] = {}; this._preds[v] = {}; this._out[v] = {}; this._sucs[v] = {}; ++this._nodeCount; return this; } node(v) { return this._nodes[v]; } hasNode(v) { return v in this._nodes; } removeNode(v) { const self = this; if (v in this._nodes) { const removeEdge = function (e) { self.removeEdge(self._edgeObjs[e]); }; delete this._nodes[v]; if (this._isCompound) { this._removeFromParentsChildList(v); delete this._parent[v]; each(this.children(v), function (child) { self.setParent(child); }); delete this._children[v]; } each(keys(this._in[v]), removeEdge); delete this._in[v]; delete this._preds[v]; each(keys(this._out[v]), removeEdge); delete this._out[v]; delete this._sucs[v]; --this._nodeCount; } return this; } setParent(v, parent) { if (!this._isCompound) { throw new Error('Cannot set parent in a non-compound graph'); } if (isUndefined(parent)) { parent = GRAPH_NODE; } else { // Coerce parent to string parent += ''; for (let ancestor = parent; !isUndefined(ancestor); ancestor = this.parent(ancestor)) { if (ancestor === v) { throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); } } this.setNode(parent); } this.setNode(v); this._removeFromParentsChildList(v); this._parent[v] = parent; this._children[parent][v] = true; return this; } _removeFromParentsChildList(v) { delete this._children[this._parent[v]][v]; } parent(v) { if (this._isCompound) { const parent = this._parent[v]; if (parent !== GRAPH_NODE) { return parent; } } } children(v) { if (isUndefined(v)) { v = GRAPH_NODE; } if (this._isCompound) { const children = this._children[v]; if (children) { return keys(children); } } else if (v === GRAPH_NODE) { return this.nodes(); } else if (this.hasNode(v)) { return []; } } predecessors(v) { const predsV = this._preds[v]; if (predsV) { return keys(predsV); } } successors(v) { const sucsV = this._sucs[v]; if (sucsV) { return keys(sucsV); } } neighbors(v) { const preds = this.predecessors(v); if (preds) { return union(preds, this.successors(v)); } } isLeaf(v) { let neighbors; if (this.isDirected()) { neighbors = this.successors(v); } else { neighbors = this.neighbors(v); } return neighbors.length === 0; } filterNodes(filter) { const copy = new Graph({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound, }); copy.setGraph(this.graph()); const self = this; each(this._nodes, function (value, v) { if (filter(v)) { copy.setNode(v, value); } }); each(this._edgeObjs, function (e) { if (copy.hasNode(e.v) && copy.hasNode(e.w)) { copy.setEdge(e, self.edge(e)); } }); const parents = {}; function findParent(v) { const parent = self.parent(v); if (parent === undefined || copy.hasNode(parent)) { parents[v] = parent; return parent; } else if (parent in parents) { return parents[parent]; } else { return findParent(parent); } } if (this._isCompound) { each(copy.nodes(), function (v) { copy.setParent(v, findParent(v)); }); } return copy; } /* === Edge functions ========== */ setDefaultEdgeLabel(newDefault) { if (!isFunction(newDefault)) { newDefault = constant(newDefault); } this._defaultEdgeLabelFn = newDefault; return this; } edgeCount() { return this._edgeCount; } edges() { return values(this._edgeObjs); } setPath(vs, value) { const self = this; const args = arguments; reduce(vs, function (v, w) { if (args.length > 1) { self.setEdge(v, w, value); } else { self.setEdge(v, w); } return w; }); return this; } // eslint-disable-next-line @typescript-eslint/no-unused-vars setEdge(...args) { let v, w, name, value; let valueSpecified = false; const arg0 = arguments[0]; if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { v = arg0.v; w = arg0.w; name = arg0.name; if (arguments.length === 2) { value = arguments[1]; valueSpecified = true; } } else { v = arg0; w = arguments[1]; name = arguments[3]; if (arguments.length > 2) { value = arguments[2]; valueSpecified = true; } } v = '' + v; w = '' + w; if (!isUndefined(name)) { name = '' + name; } const e = edgeArgsToId(this._isDirected, v, w, name); if (e in this._edgeLabels) { if (valueSpecified) { this._edgeLabels[e] = value; } return this; } if (!isUndefined(name) && !this._isMultigraph) { throw new Error('Cannot set a named edge when isMultigraph = false'); } // It didn't exist, so we need to create it. // First ensure the nodes exist. this.setNode(v); this.setNode(w); this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); const edgeObj = edgeArgsToObj(this._isDirected, v, w, name); // Ensure we add undirected edges in a consistent way. v = edgeObj.v; w = edgeObj.w; Object.freeze(edgeObj); this._edgeObjs[e] = edgeObj; incrementOrInitEntry(this._preds[w], v); incrementOrInitEntry(this._sucs[v], w); this._in[w][e] = edgeObj; this._out[v][e] = edgeObj; this._edgeCount++; return this; } edge(v, w, name) { const e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); return this._edgeLabels[e]; } hasEdge(v, w, name) { const e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); return e in this._edgeLabels; } removeEdge(v, w, name) { const e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); const edge = this._edgeObjs[e]; if (edge) { v = edge.v; w = edge.w; delete this._edgeLabels[e]; delete this._edgeObjs[e]; decrementOrRemoveEntry(this._preds[w], v); decrementOrRemoveEntry(this._sucs[v], w); delete this._in[w][e]; delete this._out[v][e]; this._edgeCount--; } return this; } inEdges(v, u) { const inV = this._in[v]; if (inV) { const edges = values(inV); if (!u) { return edges; } return _filter(edges, function (edge) { return edge.v === u; }); } } outEdges(v, w) { const outV = this._out[v]; if (outV) { const edges = values(outV); if (!w) { return edges; } return _filter(edges, function (edge) { return edge.w === w; }); } } nodeEdges(v, w) { const inEdges = this.inEdges(v, w); if (inEdges) { return inEdges.concat(this.outEdges(v, w)); } } } exports.Graph = Graph; function incrementOrInitEntry(map, k) { if (map[k]) { map[k]++; } else { map[k] = 1; } } function decrementOrRemoveEntry(map, k) { if (!--map[k]) { delete map[k]; } } function edgeArgsToId(isDirected, v_, w_, name) { let v = '' + v_; let w = '' + w_; if (!isDirected && v > w) { const tmp = v; v = w; w = tmp; } return (v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined(name) ? DEFAULT_EDGE_NAME : name)); } function edgeArgsToObj(isDirected, v_, w_, name) { let v = '' + v_; let w = '' + w_; if (!isDirected && v > w) { const tmp = v; v = w; w = tmp; } const edgeObj = { v: v, w: w }; if (name) { edgeObj.name = name; } return edgeObj; } function edgeObjToId(isDirected, edgeObj) { return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); } //# sourceMappingURL=graph.js.map /***/ }), /***/ 77947: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.alg = exports.Graph = void 0; var graph_1 = __webpack_require__(69946); Object.defineProperty(exports, "Graph", ({ enumerable: true, get: function () { return graph_1.Graph; } })); const is_acyclic_1 = __webpack_require__(40976); const postorder_1 = __webpack_require__(45300); exports.alg = { isAcyclic: is_acyclic_1.isAcyclic, postorder: postorder_1.postorder, }; //# sourceMappingURL=index.js.map /***/ }), /***/ 71479: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.legacy = exports.Errors = exports.DepGraphBuilder = exports.createFromJSON = void 0; var create_from_json_1 = __webpack_require__(6139); Object.defineProperty(exports, "createFromJSON", ({ enumerable: true, get: function () { return create_from_json_1.createFromJSON; } })); var builder_1 = __webpack_require__(81608); Object.defineProperty(exports, "DepGraphBuilder", ({ enumerable: true, get: function () { return builder_1.DepGraphBuilder; } })); const Errors = __webpack_require__(79651); exports.Errors = Errors; const legacy = __webpack_require__(67790); exports.legacy = legacy; //# sourceMappingURL=index.js.map /***/ }), /***/ 83422: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.partitionCycles = exports.getCycle = void 0; function getCycle(ancestors, nodeId) { if (!ancestors.includes(nodeId)) { return null; } // first item is where the cycle starts and ends. return ancestors.slice(ancestors.indexOf(nodeId)); } exports.getCycle = getCycle; function partitionCycles(nodeId, allCyclesTheNodeIsPartOf) { const cyclesStartWithThisNode = []; const cyclesWithThisNode = []; for (const cycle of allCyclesTheNodeIsPartOf) { const nodeStartsCycle = cycle[0] === nodeId; if (nodeStartsCycle) { cyclesStartWithThisNode.push(cycle); } else { cyclesWithThisNode.push(cycle); } } return { cyclesStartWithThisNode, cyclesWithThisNode }; } exports.partitionCycles = partitionCycles; //# sourceMappingURL=cycles.js.map /***/ }), /***/ 67790: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.graphToDepTree = exports.depTreeToGraph = void 0; const crypto = __webpack_require__(76417); const event_loop_spinner_1 = __webpack_require__(77158); const builder_1 = __webpack_require__(81608); const objectHash = __webpack_require__(49807); const cycles_1 = __webpack_require__(83422); const memiozation_1 = __webpack_require__(98155); function addLabel(dep, key, value) { if (!dep.labels) { dep.labels = {}; } dep.labels[key] = value; } /** * @deprecated Don't use dep trees as an intermediate step, because they are * large structures, resulting in high memory usage and high CPU costs from * serializing / deserializing. Instead, create a graph directly with * {@link DepGraphBuilder} */ async function depTreeToGraph(depTree, pkgManagerName) { const rootPkg = { name: depTree.name, version: depTree.version || undefined, }; const pkgManagerInfo = { name: pkgManagerName, }; const targetOS = depTree.targetOS; if (targetOS) { pkgManagerInfo.repositories = [ { alias: `${targetOS.name}:${targetOS.version}`, }, ]; } const builder = new builder_1.DepGraphBuilder(pkgManagerInfo, rootPkg); await buildGraph(builder, depTree, depTree.name, true); const depGraph = await builder.build(); return shortenNodeIds(depGraph); } exports.depTreeToGraph = depTreeToGraph; async function buildGraph(builder, depTree, pkgName, isRoot = false, memoizationMap = new Map()) { if (memoizationMap.has(depTree)) { return memoizationMap.get(depTree); } const getNodeId = (name, version, hashId) => `${name}@${version || ''}|${hashId}`; const depNodesIds = []; const hash = crypto.createHash('sha1'); if (depTree.versionProvenance) { hash.update(objectHash(depTree.versionProvenance)); } if (depTree.labels) { hash.update(objectHash(depTree.labels)); } const deps = depTree.dependencies || {}; // filter-out invalid null deps (shouldn't happen - but did...) const depNames = Object.keys(deps).filter((d) => !!deps[d]); for (const depName of depNames.sort()) { const dep = deps[depName]; const subtreeHash = await buildGraph(builder, dep, depName, false, memoizationMap); const depPkg = { name: depName, version: dep.version, }; const depNodeId = getNodeId(depPkg.name, depPkg.version, subtreeHash); depNodesIds.push(depNodeId); const nodeInfo = {}; if (dep.versionProvenance) { nodeInfo.versionProvenance = dep.versionProvenance; } if (dep.labels) { nodeInfo.labels = dep.labels; } builder.addPkgNode(depPkg, depNodeId, nodeInfo); hash.update(depNodeId); } const treeHash = hash.digest('hex'); let pkgNodeId; if (isRoot) { pkgNodeId = builder.rootNodeId; } else { // we don't assume depTree has a .name to support output of `npm list --json` const pkg = { name: pkgName, version: depTree.version, }; pkgNodeId = getNodeId(pkg.name, pkg.version, treeHash); const nodeInfo = {}; if (depTree.versionProvenance) { nodeInfo.versionProvenance = depTree.versionProvenance; } if (depTree.labels) { nodeInfo.labels = depTree.labels; } builder.addPkgNode(pkg, pkgNodeId, nodeInfo); } for (const depNodeId of depNodesIds) { builder.connectDep(pkgNodeId, depNodeId); } if (depNodesIds.length > 0 && event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } memoizationMap.set(depTree, treeHash); return treeHash; } async function shortenNodeIds(depGraph) { const builder = new builder_1.DepGraphBuilder(depGraph.pkgManager, depGraph.rootPkg); const nodesMap = {}; // create nodes with shorter ids for (const pkg of depGraph.getPkgs()) { const nodeIds = depGraph.getPkgNodeIds(pkg); for (let i = 0; i < nodeIds.length; i++) { const nodeId = nodeIds[i]; if (nodeId === depGraph.rootNodeId) { continue; } const nodeInfo = depGraph.getNode(nodeId); let newNodeId; if (nodeIds.length === 1) { newNodeId = `${trimAfterLastSep(nodeId, '|')}`; } else { newNodeId = `${trimAfterLastSep(nodeId, '|')}|${i + 1}`; } nodesMap[nodeId] = newNodeId; builder.addPkgNode(pkg, newNodeId, nodeInfo); } if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } // connect nodes for (const pkg of depGraph.getPkgs()) { for (const nodeId of depGraph.getPkgNodeIds(pkg)) { for (const depNodeId of depGraph.getNodeDepsNodeIds(nodeId)) { const parentNode = nodesMap[nodeId] || nodeId; const childNode = nodesMap[depNodeId] || depNodeId; builder.connectDep(parentNode, childNode); } } if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } return builder.build(); } /** * @deprecated Don't use dep trees. You should adapt your code to use graphs, * and enhance the dep-graph library if there is missing functionality from * the graph structure */ async function graphToDepTree(depGraphInterface, pkgType, opts = { deduplicateWithinTopLevelDeps: false }) { const depGraph = depGraphInterface; const [depTree] = await buildSubtree(depGraph, depGraph.rootNodeId, opts.deduplicateWithinTopLevelDeps ? null : false); depTree.type = depGraph.pkgManager.name; depTree.packageFormatVersion = constructPackageFormatVersion(pkgType); const targetOS = constructTargetOS(depGraph); if (targetOS) { depTree.targetOS = targetOS; } return depTree; } exports.graphToDepTree = graphToDepTree; function constructPackageFormatVersion(pkgType) { if (pkgType === 'maven') { pkgType = 'mvn'; } return `${pkgType}:0.0.1`; } function constructTargetOS(depGraph) { if (['apk', 'apt', 'deb', 'rpm', 'linux'].indexOf(depGraph.pkgManager.name) === -1) { // .targetOS is undefined unless its a linux pkgManager return; } if (!depGraph.pkgManager.repositories || !depGraph.pkgManager.repositories.length || !depGraph.pkgManager.repositories[0].alias) { throw new Error('Incomplete .pkgManager, could not create .targetOS'); } const [name, version] = depGraph.pkgManager.repositories[0].alias.split(':'); return { name, version }; } async function buildSubtree(depGraph, nodeId, maybeDeduplicationSet = false, // false = disabled; null = not in deduplication scope yet ancestors = [], memoizationMap = new Map()) { if (!maybeDeduplicationSet) { const memoizedDepTree = memiozation_1.getMemoizedDepTree(nodeId, ancestors, memoizationMap); if (memoizedDepTree) { return [memoizedDepTree, undefined]; } } const isRoot = nodeId === depGraph.rootNodeId; const nodePkg = depGraph.getNodePkg(nodeId); const nodeInfo = depGraph.getNode(nodeId); const depTree = {}; depTree.name = nodePkg.name; depTree.version = nodePkg.version; if (nodeInfo.versionProvenance) { depTree.versionProvenance = nodeInfo.versionProvenance; } if (nodeInfo.labels) { depTree.labels = Object.assign({}, nodeInfo.labels); } const depInstanceIds = depGraph.getNodeDepsNodeIds(nodeId); if (!depInstanceIds || depInstanceIds.length === 0) { memoizationMap.set(nodeId, { depTree }); return [depTree, undefined]; } const cycle = cycles_1.getCycle(ancestors, nodeId); if (cycle) { // This node starts a cycle and now it's the second visit. addLabel(depTree, 'pruned', 'cyclic'); return [depTree, [cycle]]; } if (maybeDeduplicationSet) { if (maybeDeduplicationSet.has(nodeId)) { if (depInstanceIds.length > 0) { addLabel(depTree, 'pruned', 'true'); } return [depTree, undefined]; } maybeDeduplicationSet.add(nodeId); } const cycles = []; for (const depInstId of depInstanceIds) { // Deduplication of nodes occurs only within a scope of a top-level dependency. // Therefore, every top-level dep gets an independent set to track duplicates. if (isRoot && maybeDeduplicationSet !== false) { maybeDeduplicationSet = new Set(); } const [subtree, subtreeCycles] = await buildSubtree(depGraph, depInstId, maybeDeduplicationSet, ancestors.concat(nodeId), memoizationMap); if (subtreeCycles) { for (const cycle of subtreeCycles) { cycles.push(cycle); } } if (!subtree) { continue; } if (!depTree.dependencies) { depTree.dependencies = {}; } depTree.dependencies[subtree.name] = subtree; } if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } const partitionedCycles = cycles_1.partitionCycles(nodeId, cycles); memiozation_1.memoize(nodeId, memoizationMap, depTree, partitionedCycles); return [depTree, partitionedCycles.cyclesWithThisNode]; } function trimAfterLastSep(str, sep) { return str.slice(0, str.lastIndexOf(sep)); } //# sourceMappingURL=index.js.map /***/ }), /***/ 98155: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getMemoizedDepTree = exports.memoize = void 0; function memoize(nodeId, memoizationMap, depTree, partitionedCycles) { const { cyclesStartWithThisNode, cyclesWithThisNode } = partitionedCycles; if (cyclesStartWithThisNode.length > 0) { const cycleNodeIds = new Set(...cyclesStartWithThisNode); memoizationMap.set(nodeId, { depTree, cycleNodeIds }); } else if (cyclesWithThisNode.length === 0) { memoizationMap.set(nodeId, { depTree }); } // Don't memoize nodes in cycles (cyclesWithThisNode.length > 0) } exports.memoize = memoize; function getMemoizedDepTree(nodeId, ancestors, memoizationMap) { if (!memoizationMap.has(nodeId)) return null; const { depTree, cycleNodeIds } = memoizationMap.get(nodeId); if (!cycleNodeIds) return depTree; const ancestorsArePartOfTheCycle = ancestors.some((nodeId) => cycleNodeIds.has(nodeId)); return ancestorsArePartOfTheCycle ? null : depTree; } exports.getMemoizedDepTree = getMemoizedDepTree; //# sourceMappingURL=memiozation.js.map /***/ }), /***/ 75616: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // A linked list to keep track of recently-used-ness const Yallist = __webpack_require__(74918) const MAX = Symbol('max') const LENGTH = Symbol('length') const LENGTH_CALCULATOR = Symbol('lengthCalculator') const ALLOW_STALE = Symbol('allowStale') const MAX_AGE = Symbol('maxAge') const DISPOSE = Symbol('dispose') const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') const LRU_LIST = Symbol('lruList') const CACHE = Symbol('cache') const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') const naiveLength = () => 1 // lruList is a yallist where the head is the youngest // item, and the tail is the oldest. the list contains the Hit // objects as the entries. // Each Hit object has a reference to its Yallist.Node. This // never changes. // // cache is a Map (or PseudoMap) that matches the keys to // the Yallist.Node object. class LRUCache { constructor (options) { if (typeof options === 'number') options = { max: options } if (!options) options = {} if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number') // Kind of weird to have a default max of Infinity, but oh well. const max = this[MAX] = options.max || Infinity const lc = options.length || naiveLength this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc this[ALLOW_STALE] = options.stale || false if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number') this[MAX_AGE] = options.maxAge || 0 this[DISPOSE] = options.dispose this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false this.reset() } // resize the cache when the max changes. set max (mL) { if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number') this[MAX] = mL || Infinity trim(this) } get max () { return this[MAX] } set allowStale (allowStale) { this[ALLOW_STALE] = !!allowStale } get allowStale () { return this[ALLOW_STALE] } set maxAge (mA) { if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number') this[MAX_AGE] = mA trim(this) } get maxAge () { return this[MAX_AGE] } // resize the cache when the lengthCalculator changes. set lengthCalculator (lC) { if (typeof lC !== 'function') lC = naiveLength if (lC !== this[LENGTH_CALCULATOR]) { this[LENGTH_CALCULATOR] = lC this[LENGTH] = 0 this[LRU_LIST].forEach(hit => { hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) this[LENGTH] += hit.length }) } trim(this) } get lengthCalculator () { return this[LENGTH_CALCULATOR] } get length () { return this[LENGTH] } get itemCount () { return this[LRU_LIST].length } rforEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].tail; walker !== null;) { const prev = walker.prev forEachStep(this, fn, walker, thisp) walker = prev } } forEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].head; walker !== null;) { const next = walker.next forEachStep(this, fn, walker, thisp) walker = next } } keys () { return this[LRU_LIST].toArray().map(k => k.key) } values () { return this[LRU_LIST].toArray().map(k => k.value) } reset () { if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) } this[CACHE] = new Map() // hash of items by key this[LRU_LIST] = new Yallist() // list of items in order of use recency this[LENGTH] = 0 // length of items in the list } dump () { return this[LRU_LIST].map(hit => isStale(this, hit) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter(h => h) } dumpLru () { return this[LRU_LIST] } set (key, value, maxAge) { maxAge = maxAge || this[MAX_AGE] if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number') const now = maxAge ? Date.now() : 0 const len = this[LENGTH_CALCULATOR](value, key) if (this[CACHE].has(key)) { if (len > this[MAX]) { del(this, this[CACHE].get(key)) return false } const node = this[CACHE].get(key) const item = node.value // dispose of the old one before overwriting // split out into 2 ifs for better coverage tracking if (this[DISPOSE]) { if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value) } item.now = now item.maxAge = maxAge item.value = value this[LENGTH] += len - item.length item.length = len this.get(key) trim(this) return true } const hit = new Entry(key, value, len, now, maxAge) // oversized objects fall out of cache automatically. if (hit.length > this[MAX]) { if (this[DISPOSE]) this[DISPOSE](key, value) return false } this[LENGTH] += hit.length this[LRU_LIST].unshift(hit) this[CACHE].set(key, this[LRU_LIST].head) trim(this) return true } has (key) { if (!this[CACHE].has(key)) return false const hit = this[CACHE].get(key).value return !isStale(this, hit) } get (key) { return get(this, key, true) } peek (key) { return get(this, key, false) } pop () { const node = this[LRU_LIST].tail if (!node) return null del(this, node) return node.value } del (key) { del(this, this[CACHE].get(key)) } load (arr) { // reset the cache this.reset() const now = Date.now() // A previous serialized cache has the most recent items first for (let l = arr.length - 1; l >= 0; l--) { const hit = arr[l] const expiresAt = hit.e || 0 if (expiresAt === 0) // the item was created without expiration in a non aged cache this.set(hit.k, hit.v) else { const maxAge = expiresAt - now // dont add already expired items if (maxAge > 0) { this.set(hit.k, hit.v, maxAge) } } } } prune () { this[CACHE].forEach((value, key) => get(this, key, false)) } } const get = (self, key, doUse) => { const node = self[CACHE].get(key) if (node) { const hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) return undefined } else { if (doUse) { if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now() self[LRU_LIST].unshiftNode(node) } } return hit.value } } const isStale = (self, hit) => { if (!hit || (!hit.maxAge && !self[MAX_AGE])) return false const diff = Date.now() - hit.now return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && (diff > self[MAX_AGE]) } const trim = self => { if (self[LENGTH] > self[MAX]) { for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { // We know that we're about to delete this one, and also // what the next least recently used key will be, so just // go ahead and set it now. const prev = walker.prev del(self, walker) walker = prev } } } const del = (self, node) => { if (node) { const hit = node.value if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value) self[LENGTH] -= hit.length self[CACHE].delete(hit.key) self[LRU_LIST].removeNode(node) } } class Entry { constructor (key, value, length, now, maxAge) { this.key = key this.value = value this.length = length this.now = now this.maxAge = maxAge || 0 } } const forEachStep = (self, fn, node, thisp) => { let hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) hit = undefined } if (hit) fn.call(thisp, hit.value, hit.key, self) } module.exports = LRUCache /***/ }), /***/ 95622: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const ANY = Symbol('SemVer ANY') // hoisted class for cyclic dependency class Comparator { static get ANY () { return ANY } constructor (comp, options) { options = parseOptions(options) if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp } else { comp = comp.value } } 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) } parse (comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] const m = comp.match(r) if (!m) { throw new TypeError(`Invalid comparator: ${comp}`) } this.operator = m[1] !== undefined ? 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) } } toString () { return this.value } test (version) { debug('Comparator.test', version, this.options.loose) if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } return cmp(version, this.operator, this.semver, this.options) } intersects (comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError('a Comparator is required') } if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (this.operator === '') { if (this.value === '') { return true } return new Range(comp.value, options).test(this.value) } else if (comp.operator === '') { if (comp.value === '') { return true } return new Range(this.value, options).test(comp.semver) } const sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>') const sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<') const sameSemVer = this.semver.version === comp.semver.version const differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=') const oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<') const oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>') return ( sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan ) } } module.exports = Comparator const parseOptions = __webpack_require__(23856) const {re, t} = __webpack_require__(90996) const cmp = __webpack_require__(35637) const debug = __webpack_require__(75236) const SemVer = __webpack_require__(81538) const Range = __webpack_require__(3577) /***/ }), /***/ 3577: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // hoisted class for cyclic dependency class Range { constructor (range, options) { options = parseOptions(options) 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) { // just put it in the set and return this.raw = range.value this.set = [[range]] this.format() return this } 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 the range to a 2d array of comparators .map(range => this.parseRange(range.trim())) // throw out any comparator lists that are empty // this generally means that it was not a valid range, which is allowed // in loose mode, but will still throw if the WHOLE range is invalid. .filter(c => c.length) if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${range}`) } // if we have any that are not the null set, throw out null sets. if (this.set.length > 1) { // keep the first one, in case they're all null sets const first = this.set[0] this.set = this.set.filter(c => !isNullSet(c[0])) if (this.set.length === 0) this.set = [first] else if (this.set.length > 1) { // if we have any that are *, then the range is just * for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { this.set = [c] break } } } } this.format() } format () { this.range = this.set .map((comps) => { return comps.join(' ').trim() }) .join('||') .trim() return this.range } toString () { return this.range } parseRange (range) { range = range.trim() // memoize range parsing for performance. // this is a very hot path, and fully deterministic. const memoOpts = Object.keys(this.options).join(',') const memoKey = `parseRange:${memoOpts}:${range}` const cached = cache.get(memoKey) if (cached) return cached const loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] const rangeList = range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) // >=0.0.0 is equivalent to * .map(comp => replaceGTE0(comp, this.options)) // in loose mode, throw out any that are not valid comparators .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) .map(comp => new Comparator(comp, this.options)) // if any comparators are the null set, then replace with JUST null set // if more than one comparator, remove any * comparators // also, don't include the same comparator more than once const l = rangeList.length const rangeMap = new Map() for (const comp of rangeList) { if (isNullSet(comp)) return [comp] rangeMap.set(comp.value, comp) } if (rangeMap.size > 1 && rangeMap.has('')) rangeMap.delete('') const result = [...rangeMap.values()] cache.set(memoKey, result) return result } intersects (range, options) { if (!(range instanceof Range)) { throw new TypeError('a Range is required') } return this.set.some((thisComparators) => { return ( isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return ( isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options) }) }) ) }) ) }) } // if ANY of the sets match ALL of its comparators, then pass test (version) { if (!version) { return false } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } for (let i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true } } return false } } module.exports = Range const LRU = __webpack_require__(75616) const cache = new LRU({ max: 1000 }) const parseOptions = __webpack_require__(23856) const Comparator = __webpack_require__(95622) const debug = __webpack_require__(75236) const SemVer = __webpack_require__(81538) const { re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = __webpack_require__(90996) const isNullSet = c => c.value === '<0.0.0-0' const isAny = c => c.value === '' // take a set of comparators and determine whether there // exists a version which can satisfy it const isSatisfiable = (comparators, options) => { let result = true const remainingComparators = comparators.slice() let testComparator = remainingComparators.pop() while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options) }) testComparator = remainingComparators.pop() } return result } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. const 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 } const isX = id => !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-0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceTilde(comp, options) }).join(' ') const replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] return comp.replace(r, (_, M, m, p, pr) => { debug('tilde', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0 <${+M + 1}.0.0-0` } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0-0 ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` } else if (pr) { debug('replaceTilde pr', pr) ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } else { // ~1.2.3 == >=1.2.3 <1.3.0-0 ret = `>=${M}.${m}.${p } <${M}.${+m + 1}.0-0` } debug('tilde return', ret) return ret }) } // ^ --> * (any, kinda silly) // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 // ^1.2.3 --> >=1.2.3 <2.0.0-0 // ^1.2.0 --> >=1.2.0 <2.0.0-0 const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceCaret(comp, options) }).join(' ') const replaceCaret = (comp, options) => { debug('caret', comp, options) const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] const z = options.includePrerelease ? '-0' : '' return comp.replace(r, (_, M, m, p, pr) => { debug('caret', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` } else if (isX(p)) { if (M === '0') { ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` } else { ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` } } else if (pr) { debug('replaceCaret pr', pr) if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p}-${pr } <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p}-${pr } <${+M + 1}.0.0-0` } } else { debug('no pr') if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p }${z} <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p }${z} <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p } <${+M + 1}.0.0-0` } } debug('caret return', ret) return ret }) } const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) return comp.split(/\s+/).map((comp) => { return replaceXRange(comp, options) }).join(' ') } const replaceXRange = (comp, options) => { comp = comp.trim() const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug('xRange', comp, ret, gtlt, M, m, p, pr) const xM = isX(M) const xm = xM || isX(m) const xp = xm || isX(p) const anyX = xp if (gtlt === '=' && anyX) { gtlt = '' } // if we're including prereleases in the match, then we need // to fix this to -0, the lowest possible prerelease value pr = options.includePrerelease ? '-0' : '' if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed ret = '<0.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 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 } } if (gtlt === '<') pr = '-0' ret = `${gtlt + M}.${m}.${p}${pr}` } else if (xm) { ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` } else if (xp) { ret = `>=${M}.${m}.0${pr } <${M}.${+m + 1}.0-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. const replaceStars = (comp, options) => { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! return comp.trim().replace(re[t.STAR], '') } const replaceGTE0 = (comp, options) => { debug('replaceGTE0', comp, options) return comp.trim() .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') } // This function is passed to string.replace(re[t.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-0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0-0 const hyphenReplace = incPr => ($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${incPr ? '-0' : ''}` } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` } else if (fpr) { from = `>=${from}` } else { from = `>=${from}${incPr ? '-0' : ''}` } if (isX(tM)) { to = '' } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0` } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0` } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}` } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0` } else { to = `<=${to}` } return (`${from} ${to}`).trim() } const testSet = (set, version, options) => { for (let 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 (let i = 0; i < set.length; i++) { debug(set[i].semver) if (set[i].semver === Comparator.ANY) { continue } if (set[i].semver.prerelease.length > 0) { const 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 } /***/ }), /***/ 81538: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const debug = __webpack_require__(75236) const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(14031) const { re, t } = __webpack_require__(90996) const parseOptions = __webpack_require__(23856) const { compareIdentifiers } = __webpack_require__(6857) class SemVer { constructor (version, options) { options = parseOptions(options) if (version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { 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` ) } debug('SemVer', version, options) this.options = options this.loose = !!options.loose // this isn't actually relevant for versions, but keep it so that we // don't run into trouble passing this.options around. this.includePrerelease = !!options.includePrerelease const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.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((id) => { if (/^[0-9]+$/.test(id)) { const num = +id if (num >= 0 && num < MAX_SAFE_INTEGER) { return num } } return id }) } this.build = m[5] ? m[5].split('.') : [] this.format() } format () { this.version = `${this.major}.${this.minor}.${this.patch}` if (this.prerelease.length) { this.version += `-${this.prerelease.join('.')}` } return this.version } toString () { return this.version } compare (other) { debug('SemVer.compare', this.version, this.options, other) if (!(other instanceof SemVer)) { if (typeof other === 'string' && other === this.version) { return 0 } other = new SemVer(other, this.options) } if (other.version === this.version) { return 0 } return this.compareMain(other) || this.comparePre(other) } compareMain (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) ) } comparePre (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 } let i = 0 do { const a = this.prerelease[i] const 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) } compareBuild (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } let i = 0 do { const a = this.build[i] const b = other.build[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. inc (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 { let 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 } } module.exports = SemVer /***/ }), /***/ 65105: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(83896) const clean = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ''), options) return s ? s.version : null } module.exports = clean /***/ }), /***/ 35637: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const eq = __webpack_require__(28179) const neq = __webpack_require__(83568) const gt = __webpack_require__(78203) const gte = __webpack_require__(66658) const lt = __webpack_require__(1926) const lte = __webpack_require__(46266) const 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}`) } } module.exports = cmp /***/ }), /***/ 12901: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const parse = __webpack_require__(83896) const {re, t} = __webpack_require__(90996) const coerce = (version, options) => { if (version instanceof SemVer) { return version } if (typeof version === 'number') { version = String(version) } if (typeof version !== 'string') { return null } options = options || {} let match = null if (!options.rtl) { match = version.match(re[t.COERCE]) } else { // Find the right-most coercible string that does not share // a terminus with a more left-ward coercible string. // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' // // Walk through the string checking with a /g regexp // Manually set the index so as to pick up overlapping matches. // Stop when we get a match that ends at the string end, since no // coercible string can be more right-ward without the same terminus. let next while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length) ) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length } // leave it in a clean state re[t.COERCERTL].lastIndex = -1 } if (match === null) return null return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } module.exports = coerce /***/ }), /***/ 48372: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const compareBuild = (a, b, loose) => { const versionA = new SemVer(a, loose) const versionB = new SemVer(b, loose) return versionA.compare(versionB) || versionA.compareBuild(versionB) } module.exports = compareBuild /***/ }), /***/ 39309: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const compareLoose = (a, b) => compare(a, b, true) module.exports = compareLoose /***/ }), /***/ 62742: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)) module.exports = compare /***/ }), /***/ 3976: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(83896) const eq = __webpack_require__(28179) const diff = (version1, version2) => { if (eq(version1, version2)) { return null } else { const v1 = parse(version1) const v2 = parse(version2) const hasPre = v1.prerelease.length || v2.prerelease.length const prefix = hasPre ? 'pre' : '' const defaultResult = hasPre ? 'prerelease' : '' for (const key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { return prefix + key } } } return defaultResult // may be undefined } } module.exports = diff /***/ }), /***/ 28179: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const eq = (a, b, loose) => compare(a, b, loose) === 0 module.exports = eq /***/ }), /***/ 78203: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const gt = (a, b, loose) => compare(a, b, loose) > 0 module.exports = gt /***/ }), /***/ 66658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const gte = (a, b, loose) => compare(a, b, loose) >= 0 module.exports = gte /***/ }), /***/ 10948: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const inc = (version, release, options, identifier) => { if (typeof (options) === 'string') { identifier = options options = undefined } try { return new SemVer(version, options).inc(release, identifier).version } catch (er) { return null } } module.exports = inc /***/ }), /***/ 1926: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const lt = (a, b, loose) => compare(a, b, loose) < 0 module.exports = lt /***/ }), /***/ 46266: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const lte = (a, b, loose) => compare(a, b, loose) <= 0 module.exports = lte /***/ }), /***/ 71188: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const major = (a, loose) => new SemVer(a, loose).major module.exports = major /***/ }), /***/ 90961: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const minor = (a, loose) => new SemVer(a, loose).minor module.exports = minor /***/ }), /***/ 83568: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const neq = (a, b, loose) => compare(a, b, loose) !== 0 module.exports = neq /***/ }), /***/ 83896: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const {MAX_LENGTH} = __webpack_require__(14031) const { re, t } = __webpack_require__(90996) const SemVer = __webpack_require__(81538) const parseOptions = __webpack_require__(23856) const parse = (version, options) => { options = parseOptions(options) if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } if (version.length > MAX_LENGTH) { return null } const r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } module.exports = parse /***/ }), /***/ 22793: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const patch = (a, loose) => new SemVer(a, loose).patch module.exports = patch /***/ }), /***/ 58258: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(83896) const prerelease = (version, options) => { const parsed = parse(version, options) return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } module.exports = prerelease /***/ }), /***/ 78822: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(62742) const rcompare = (a, b, loose) => compare(b, a, loose) module.exports = rcompare /***/ }), /***/ 13668: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(48372) const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) module.exports = rsort /***/ }), /***/ 71344: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(3577) const satisfies = (version, range, options) => { try { range = new Range(range, options) } catch (er) { return false } return range.test(version) } module.exports = satisfies /***/ }), /***/ 71927: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(48372) const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) module.exports = sort /***/ }), /***/ 65202: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(83896) const valid = (version, options) => { const v = parse(version, options) return v ? v.version : null } module.exports = valid /***/ }), /***/ 21663: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // just pre-load all the stuff that index.js lazily exports const internalRe = __webpack_require__(90996) module.exports = { re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: __webpack_require__(14031).SEMVER_SPEC_VERSION, SemVer: __webpack_require__(81538), compareIdentifiers: __webpack_require__(6857).compareIdentifiers, rcompareIdentifiers: __webpack_require__(6857).rcompareIdentifiers, parse: __webpack_require__(83896), valid: __webpack_require__(65202), clean: __webpack_require__(65105), inc: __webpack_require__(10948), diff: __webpack_require__(3976), major: __webpack_require__(71188), minor: __webpack_require__(90961), patch: __webpack_require__(22793), prerelease: __webpack_require__(58258), compare: __webpack_require__(62742), rcompare: __webpack_require__(78822), compareLoose: __webpack_require__(39309), compareBuild: __webpack_require__(48372), sort: __webpack_require__(71927), rsort: __webpack_require__(13668), gt: __webpack_require__(78203), lt: __webpack_require__(1926), eq: __webpack_require__(28179), neq: __webpack_require__(83568), gte: __webpack_require__(66658), lte: __webpack_require__(46266), cmp: __webpack_require__(35637), coerce: __webpack_require__(12901), Comparator: __webpack_require__(95622), Range: __webpack_require__(3577), satisfies: __webpack_require__(71344), toComparators: __webpack_require__(56780), maxSatisfying: __webpack_require__(44808), minSatisfying: __webpack_require__(40776), minVersion: __webpack_require__(78544), validRange: __webpack_require__(37709), outside: __webpack_require__(92054), gtr: __webpack_require__(9891), ltr: __webpack_require__(8100), intersects: __webpack_require__(55128), simplifyRange: __webpack_require__(2545), subset: __webpack_require__(32675), } /***/ }), /***/ 14031: /***/ ((module) => { // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. const SEMVER_SPEC_VERSION = '2.0.0' const MAX_LENGTH = 256 const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 module.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, MAX_SAFE_COMPONENT_LENGTH } /***/ }), /***/ 75236: /***/ ((module) => { const debug = ( typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ) ? (...args) => console.error('SEMVER', ...args) : () => {} module.exports = debug /***/ }), /***/ 6857: /***/ ((module) => { const numeric = /^[0-9]+$/ const compareIdentifiers = (a, b) => { const anum = numeric.test(a) const 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 } const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) module.exports = { compareIdentifiers, rcompareIdentifiers } /***/ }), /***/ 23856: /***/ ((module) => { // parse out just the options we care about so we always get a consistent // obj with keys in a consistent order. const opts = ['includePrerelease', 'loose', 'rtl'] const parseOptions = options => !options ? {} : typeof options !== 'object' ? { loose: true } : opts.filter(k => options[k]).reduce((options, k) => { options[k] = true return options }, {}) module.exports = parseOptions /***/ }), /***/ 90996: /***/ ((module, exports, __webpack_require__) => { const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(14031) const debug = __webpack_require__(75236) exports = module.exports = {} // The actual regexps go on exports.re const re = exports.re = [] const src = exports.src = [] const t = exports.t = {} let R = 0 const createToken = (name, value, isGlobal) => { const index = R++ debug(index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) } // 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. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') createToken('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. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') // ## Main Version // Three dot-separated numeric identifiers. createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`) createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] }|${src[t.NONNUMERICIDENTIFIER]})`) createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] }|${src[t.NONNUMERICIDENTIFIER]})`) // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] }(?:\\.${src[t.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. createToken('FULLPLAIN', `v?${src[t.MAINVERSION] }${src[t.PRERELEASE]}?${ src[t.BUILD]}?`) createToken('FULL', `^${src[t.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. createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] }${src[t.PRERELEASELOOSE]}?${ src[t.BUILD]}?`) createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) createToken('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. createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) // Coercion. // Extract anything that could conceivably be a part of a valid semver createToken('COERCE', `${'(^|[^\\d])' + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:$|[^\\d])`) createToken('COERCERTL', src[t.COERCE], true) // Tilde ranges. // Meaning is "reasonably at or greater than" createToken('LONETILDE', '(?:~>?)') createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) exports.tildeTrimReplace = '$1~' createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) // Caret ranges. // Meaning is "at least and backwards compatible with" createToken('LONECARET', '(?:\\^)') createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) exports.caretTrimReplace = '$1^' createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) // A simple gt/lt/eq thing, or just "" to indicate "any version" createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) exports.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. createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`) createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`) // Star ranges basically just allow anything at all. createToken('STAR', '(<|>)?=?\\s*\\*') // >=0.0.0 is like a star createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') /***/ }), /***/ 9891: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Determine if version is greater than all the versions possible in the range. const outside = __webpack_require__(92054) const gtr = (version, range, options) => outside(version, range, '>', options) module.exports = gtr /***/ }), /***/ 55128: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(3577) const intersects = (r1, r2, options) => { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } module.exports = intersects /***/ }), /***/ 8100: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const outside = __webpack_require__(92054) // Determine if version is less than all the versions possible in the range const ltr = (version, range, options) => outside(version, range, '<', options) module.exports = ltr /***/ }), /***/ 44808: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const Range = __webpack_require__(3577) const maxSatisfying = (versions, range, options) => { let max = null let maxSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = maxSatisfying /***/ }), /***/ 40776: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const Range = __webpack_require__(3577) const minSatisfying = (versions, range, options) => { let min = null let minSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = minSatisfying /***/ }), /***/ 78544: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const Range = __webpack_require__(3577) const gt = __webpack_require__(78203) const minVersion = (range, loose) => { range = new Range(range, loose) let 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] let setMin = null comparators.forEach((comparator) => { // Clone to avoid manipulating the comparator's semver object. const 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 (!setMin || gt(compver, setMin)) { setMin = compver } break case '<': case '<=': /* Ignore maximum versions */ break /* istanbul ignore next */ default: throw new Error(`Unexpected operation: ${comparator.operator}`) } }) if (setMin && (!minver || gt(minver, setMin))) minver = setMin } if (minver && range.test(minver)) { return minver } return null } module.exports = minVersion /***/ }), /***/ 92054: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(81538) const Comparator = __webpack_require__(95622) const {ANY} = Comparator const Range = __webpack_require__(3577) const satisfies = __webpack_require__(71344) const gt = __webpack_require__(78203) const lt = __webpack_require__(1926) const lte = __webpack_require__(46266) const gte = __webpack_require__(66658) const outside = (version, range, hilo, options) => { version = new SemVer(version, options) range = new Range(range, options) let 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 satisfies 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] let high = null let low = null comparators.forEach((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 } module.exports = outside /***/ }), /***/ 2545: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // given a set of versions and a range, create a "simplified" range // that includes the same versions that the original range does // If the original range is shorter than the simplified one, return that. const satisfies = __webpack_require__(71344) const compare = __webpack_require__(62742) module.exports = (versions, range, options) => { const set = [] let min = null let prev = null const v = versions.sort((a, b) => compare(a, b, options)) for (const version of v) { const included = satisfies(version, range, options) if (included) { prev = version if (!min) min = version } else { if (prev) { set.push([min, prev]) } prev = null min = null } } if (min) set.push([min, null]) const ranges = [] for (const [min, max] of set) { if (min === max) ranges.push(min) else if (!max && min === v[0]) ranges.push('*') else if (!max) ranges.push(`>=${min}`) else if (min === v[0]) ranges.push(`<=${max}`) else ranges.push(`${min} - ${max}`) } const simplified = ranges.join(' || ') const original = typeof range.raw === 'string' ? range.raw : String(range) return simplified.length < original.length ? simplified : range } /***/ }), /***/ 32675: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(3577) const Comparator = __webpack_require__(95622) const { ANY } = Comparator const satisfies = __webpack_require__(71344) const compare = __webpack_require__(62742) // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: // - Every simple range `r1, r2, ...` is a null set, OR // - Every simple range `r1, r2, ...` which is not a null set is a subset of // some `R1, R2, ...` // // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: // - If c is only the ANY comparator // - If C is only the ANY comparator, return true // - Else if in prerelease mode, return false // - else replace c with `[>=0.0.0]` // - If C is only the ANY comparator // - if in prerelease mode, return true // - else replace C with `[>=0.0.0]` // - Let EQ be the set of = comparators in c // - If EQ is more than one, return true (null set) // - Let GT be the highest > or >= comparator in c // - Let LT be the lowest < or <= comparator in c // - If GT and LT, and GT.semver > LT.semver, return true (null set) // - If any C is a = range, and GT or LT are set, return false // - If EQ // - If GT, and EQ does not satisfy GT, return true (null set) // - If LT, and EQ does not satisfy LT, return true (null set) // - If EQ satisfies every C, return true // - Else return false // - If GT // - If GT.semver is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false // - If GT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the GT.semver tuple, return false // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false // - If GT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the LT.semver tuple, return false // - Else return true const subset = (sub, dom, options = {}) => { if (sub === dom) return true sub = new Range(sub, options) dom = new Range(dom, options) let sawNonNull = false OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options) sawNonNull = sawNonNull || isSub !== null if (isSub) continue OUTER } // the null set is a subset of everything, but null simple ranges in // a complex range should be ignored. so if we saw a non-null range, // then we know this isn't a subset, but if EVERY simple range was null, // then it is a subset. if (sawNonNull) return false } return true } const simpleSubset = (sub, dom, options) => { if (sub === dom) return true if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) return true else if (options.includePrerelease) sub = [ new Comparator('>=0.0.0-0') ] else sub = [ new Comparator('>=0.0.0') ] } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) return true else dom = [ new Comparator('>=0.0.0') ] } const eqSet = new Set() let gt, lt for (const c of sub) { if (c.operator === '>' || c.operator === '>=') gt = higherGT(gt, c, options) else if (c.operator === '<' || c.operator === '<=') lt = lowerLT(lt, c, options) else eqSet.add(c.semver) } if (eqSet.size > 1) return null let gtltComp if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options) if (gtltComp > 0) return null else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null } // will iterate one or zero times for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) return null if (lt && !satisfies(eq, String(lt), options)) return null for (const c of dom) { if (!satisfies(eq, String(c), options)) return false } return true } let higher, lower let hasDomLT, hasDomGT // if the subset has a prerelease, we need a comparator in the superset // with the same tuple and a prerelease, or it's not a subset let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false // exception: <1.2.3-0 is the same as <1.2.3 if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false } for (const c of dom) { hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { needDomGTPre = false } } if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) if (higher === c && higher !== gt) return false } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) return false } if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { needDomLTPre = false } } if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) if (lower === c && lower !== lt) return false } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) return false } if (!c.operator && (lt || gt) && gtltComp !== 0) return false } // if there was a < or >, and nothing in the dom, then must be false // UNLESS it was limited by another range in the other direction. // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 if (gt && hasDomLT && !lt && gtltComp !== 0) return false if (lt && hasDomGT && !gt && gtltComp !== 0) return false // we needed a prerelease range in a specific tuple, but didn't get one // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, // because it includes prereleases in the 1.2.3 tuple if (needDomGTPre || needDomLTPre) return false return true } // >=1.2.3 is lower than >1.2.3 const higherGT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a } // <=1.2.3 is higher than <1.2.3 const lowerLT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a } module.exports = subset /***/ }), /***/ 56780: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(3577) // Mostly just for testing and legacy API reasons const toComparators = (range, options) => new Range(range, options).set .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) module.exports = toComparators /***/ }), /***/ 37709: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(3577) const 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 } } module.exports = validRange /***/ }), /***/ 44137: /***/ ((module) => { "use strict"; module.exports = function (Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value } } } /***/ }), /***/ 74918: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "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 = 0; i < nodes.length; i++) { walker = insert(this, walker, nodes[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 __webpack_require__(44137)(Yallist) } catch (er) {} /***/ }), /***/ 87315: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.checkSupport = void 0; const contentTypes = __webpack_require__(42625); const registry_call_1 = __webpack_require__(15271); /** * Root V2 endpoint, useful to check V2 support and validating credentials. */ async function checkSupport(registryBase, username, password, options = {}) { const result = await registry_call_1.registryV2Call(registryBase, "/", // full url path should be "/v2/" as per spec contentTypes.JSON, username, password, options); // always return thruthy object, even for ECR return result || {}; } exports.checkSupport = checkSupport; //# sourceMappingURL=check-support.js.map /***/ }), /***/ 42625: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.JSON = exports.LAYER = exports.IMAGE_CONFIG = exports.MANIFEST_LIST_V2 = exports.MANIFEST_V2 = void 0; exports.MANIFEST_V2 = "application/vnd.docker.distribution.manifest.v2+json"; exports.MANIFEST_LIST_V2 = "application/vnd.docker.distribution.manifest.list.v2+json"; exports.IMAGE_CONFIG = "application/vnd.docker.container.image.v1+json"; exports.LAYER = "application/vnd.docker.image.rootfs.diff.tar.gzip"; exports.JSON = "application/json"; //# sourceMappingURL=content-types.js.map /***/ }), /***/ 80290: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getAuthTokenForEndpoint = void 0; const contentTypes = __webpack_require__(42625); const registry_call_1 = __webpack_require__(15271); const needle_1 = __webpack_require__(48360); /** * getAuthTokenForEndpoint attempts to retrieve a token for an unauthorized endpoint. * It will make a request to the endpoint and in case it returns an Unauthorized (401) * response code with the 'www-Authenticate' header, it will make a consecutive call according * to the details within this header. * More info: https://docs.docker.com/registry/spec/auth/token/#how-to-authenticate * @param registryBase - the container registry base URL * @param endpoint - the endpoint to which we would like to make the request * @param username - the username for authentication * @param password - the password for authentication * @param reqOptions - http request options * @returns an auth token string if authentication succeeded or null if * authorization is not required/not bases on bearer token * @throws an error if http error status code is not 401 */ async function getAuthTokenForEndpoint(registryBase, endpoint, username, password, reqOptions = {}) { const reqConfig = registry_call_1.buildUnauthenticatedV2RequestConfig(registryBase, endpoint, contentTypes.JSON, reqOptions); try { await needle_1.needleWrapper(reqConfig); return null; } catch (err) { if (err.statusCode !== 401) { throw err; } const challengeHeaders = err.headers["www-authenticate"]; if (!challengeHeaders) { return null; } const [authBase, service, scope] = registry_call_1.parseChallengeHeaders(challengeHeaders); if (!authBase) { return null; } else { // Bearer token const token = await registry_call_1.getToken(registryBase, authBase, service, scope, username, password, reqOptions); return token; } } } exports.getAuthTokenForEndpoint = getAuthTokenForEndpoint; //# sourceMappingURL=get-auth-token-for-endpoint.js.map /***/ }), /***/ 50702: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getImageConfig = void 0; const registry_call_1 = __webpack_require__(15271); const contentTypes = __webpack_require__(42625); const needle_1 = __webpack_require__(48360); async function getImageConfig(registryBase, repo, digest, username, password, options = {}) { const endpoint = `/${repo}/blobs/${digest}`; const configResponse = await registry_call_1.registryV2Call(registryBase, endpoint, contentTypes.IMAGE_CONFIG, username, password, options); return needle_1.parseResponseBody(configResponse); } exports.getImageConfig = getImageConfig; //# sourceMappingURL=get-image-config.js.map /***/ }), /***/ 70395: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getImageSize = void 0; const get_manifest_1 = __webpack_require__(32603); async function getImageSize(registryBase, repo, tag, username, password, options = {}) { const manifest = await get_manifest_1.getManifest(registryBase, repo, tag, username, password, options); const layers = manifest.layers || []; return layers.reduce((size, layerConfig) => size + layerConfig.size, 0); } exports.getImageSize = getImageSize; //# sourceMappingURL=get-image-size.js.map /***/ }), /***/ 78924: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getLayer = void 0; const registry_call_1 = __webpack_require__(15271); const contentTypes = __webpack_require__(42625); async function getLayer(registryBase, repo, digest, username, password, options = {}) { var _a; const accept = `${(_a = options.acceptLayer) !== null && _a !== void 0 ? _a : contentTypes.LAYER}`; const endpoint = `/${repo}/blobs/${digest}`; options = Object.assign({ json: false, encoding: null }, options); const layerResponse = await registry_call_1.registryV2Call(registryBase, endpoint, accept, username, password, options); // When the content type is wrongly set to text instead of binary, response body is returned as string instead of a buffer // This forces a buffer response. if (!(layerResponse.body instanceof Buffer)) { return Buffer.from(layerResponse.raw); } return layerResponse.body; } exports.getLayer = getLayer; //# sourceMappingURL=get-layer.js.map /***/ }), /***/ 32603: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.computeDigest = exports.getManifest = void 0; const registry_call_1 = __webpack_require__(15271); const contentTypes = __webpack_require__(42625); const needle_1 = __webpack_require__(48360); const crypto_1 = __webpack_require__(76417); const digestRegex = /^sha256:[a-f0-9]{64}$/i; /** * A request to get image manifest by tag or digest * @param registryBase the hostname (and optionally base path) from which to get the manifest. * @param repo the requested image repository. * @param tag the manifest tag or digest value * @param username optional, username to be used for basic auth. * @param password optional, password to be used for basic auth. * @param options optional, request options. * @param platform optional, the manifest platform (os and architecture), applicable only for multi-architecture manifests. * Defaults to linux/amd64. In case the requested manifest platform is not found an error is thrown. * @returns */ async function getManifest(registryBase, repo, imageReference, username, password, options = {}, platform) { var _a; const accept = (_a = options.acceptManifest) !== null && _a !== void 0 ? _a : `${contentTypes.MANIFEST_V2}, ${contentTypes.MANIFEST_LIST_V2}`; const endpoint = `/${repo}/manifests/${imageReference}`; let manifestResponse = await registry_call_1.registryV2Call(registryBase, endpoint, accept, username, password, options); const contentType = manifestResponse.headers["content-type"]; let indexDigest; let manifestDigest; if (contentType === contentTypes.MANIFEST_LIST_V2) { indexDigest = computeDigest(manifestResponse.body); manifestDigest = getManifestDigestByPlatform(manifestResponse, platform); // need to call again with actual manifest (and not a list of manifest-lists) const endpoint = `/${repo}/manifests/${manifestDigest}`; manifestResponse = await registry_call_1.registryV2Call(registryBase, endpoint, accept, username, password, options); } const dockerContentDigest = manifestResponse.headers["Docker-Content-Digest"]; switch (true) { case manifestDigest != undefined: break; case isManifestDigest(imageReference): manifestDigest = imageReference; break; case isManifestDigest(dockerContentDigest): manifestDigest = dockerContentDigest; break; default: manifestDigest = computeDigest(manifestResponse.body); } const parsedBody = needle_1.parseResponseBody(manifestResponse); return Object.assign(Object.assign({}, parsedBody), { indexDigest, manifestDigest }); } exports.getManifest = getManifest; function isManifestDigest(imageReference) { return digestRegex.test(imageReference); } function computeDigest(body) { if (!body) { return undefined; } if (typeof body !== "string") { body = JSON.stringify(body); } const hexDigest = crypto_1.createHash("sha256") .update(body) .digest("hex") .toLowerCase(); return `sha256:${hexDigest}`; } exports.computeDigest = computeDigest; function getManifestDigestByPlatform(manifestResponse, platform) { const defaultPlatform = { os: "linux", architecture: "amd64", }; const platformFilter = platform ? platform : defaultPlatform; const manifestList = needle_1.parseResponseBody(manifestResponse); const manifestPlatform = getManifestByOsAndArch(manifestList.manifests, platformFilter.os, platformFilter.architecture); if (manifestPlatform) { return manifestPlatform.digest; } throw new Error(`no supported manifest found for platform: ${JSON.stringify(platformFilter)}`); } function getManifestByOsAndArch(platformManifest, os, architecture) { return platformManifest.find(manifest => manifest.platform.os === os && manifest.platform.architecture === architecture); } //# sourceMappingURL=get-manifest.js.map /***/ }), /***/ 73905: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRepos = void 0; const contentTypes = __webpack_require__(42625); const registry_call_1 = __webpack_require__(15271); async function getRepos(registryBase, username, password, pageSize = 100, maxPages = Number.MAX_SAFE_INTEGER, options = {}) { const endpoint = "/_catalog"; return await registry_call_1.paginatedV2Call(registryBase, contentTypes.JSON, username, password, endpoint, "repositories", pageSize, maxPages, options); } exports.getRepos = getRepos; //# sourceMappingURL=get-repos.js.map /***/ }), /***/ 80353: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getTags = void 0; const registry_call_1 = __webpack_require__(15271); const contentTypes = __webpack_require__(42625); async function getTags(registryBase, repo, username, password, pageSize = 1000, maxPages = Number.MAX_SAFE_INTEGER, options = {}) { const endpoint = `/${repo}/tags/list`; return await registry_call_1.paginatedV2Call(registryBase, contentTypes.JSON, username, password, endpoint, "tags", pageSize, maxPages, options); } exports.getTags = getTags; //# sourceMappingURL=get-tags.js.map /***/ }), /***/ 28310: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.types = exports.registryCall = exports.getTags = exports.getRepos = exports.getManifest = exports.getLayer = exports.getImageSize = exports.getImageConfig = exports.getAuthTokenForEndpoint = exports.checkSupport = void 0; const check_support_1 = __webpack_require__(87315); Object.defineProperty(exports, "checkSupport", ({ enumerable: true, get: function () { return check_support_1.checkSupport; } })); const get_auth_token_for_endpoint_1 = __webpack_require__(80290); Object.defineProperty(exports, "getAuthTokenForEndpoint", ({ enumerable: true, get: function () { return get_auth_token_for_endpoint_1.getAuthTokenForEndpoint; } })); const get_image_config_1 = __webpack_require__(50702); Object.defineProperty(exports, "getImageConfig", ({ enumerable: true, get: function () { return get_image_config_1.getImageConfig; } })); const get_image_size_1 = __webpack_require__(70395); Object.defineProperty(exports, "getImageSize", ({ enumerable: true, get: function () { return get_image_size_1.getImageSize; } })); const get_layer_1 = __webpack_require__(78924); Object.defineProperty(exports, "getLayer", ({ enumerable: true, get: function () { return get_layer_1.getLayer; } })); const get_manifest_1 = __webpack_require__(32603); Object.defineProperty(exports, "getManifest", ({ enumerable: true, get: function () { return get_manifest_1.getManifest; } })); const get_repos_1 = __webpack_require__(73905); Object.defineProperty(exports, "getRepos", ({ enumerable: true, get: function () { return get_repos_1.getRepos; } })); const get_tags_1 = __webpack_require__(80353); Object.defineProperty(exports, "getTags", ({ enumerable: true, get: function () { return get_tags_1.getTags; } })); const registry_call_1 = __webpack_require__(15271); Object.defineProperty(exports, "registryCall", ({ enumerable: true, get: function () { return registry_call_1.registryCall; } })); const types = __webpack_require__(47235); exports.types = types; //# sourceMappingURL=index.js.map /***/ }), /***/ 48360: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseResponseBody = exports.needleWrapper = void 0; const needle = __webpack_require__(57441); // TODO: this is a temporary code that allows setting needle default timeout (alias for // open_timeout) to check how it affects the stability of our system, and specifically // if it helps reducing 'socket hang up' errors. // More information: https://www.npmjs.com/package/needle if (process.env.DOCKER_REGISTRY_V2_CLIENT_NEEDLE_OPEN_TIMEOUT) { const openTimeout = parseInt(process.env.DOCKER_REGISTRY_V2_CLIENT_NEEDLE_OPEN_TIMEOUT); if (Number.isInteger(openTimeout)) { needle.defaults({ timeout: openTimeout, }); } } /** * A wrapper function that uses `needle` for making HTTP requests, * and returns a response that matches what the response it used to get from `request` library * @param options request options */ async function needleWrapper(options, maxRetries) { var _a, _b; let uri = options.uri; // append query parameters if (options.qs) { for (const key in options.qs) { if (options.qs[key] !== undefined) { uri += `&${key}=${options.qs[key]}`; } } if (!uri.includes("?")) { uri = uri.replace("&", "?"); } } let response; let lastError; let retries = maxRetries !== null && maxRetries !== void 0 ? maxRetries : 0; while (!response && retries >= 0) { retries--; try { response = await needle("get", uri, options); } catch (err) { lastError = err; } } if (!response) { throw lastError; } // throw an error in case status code is not 2xx if (response && response.statusCode >= 300) { let message; if (((_b = (_a = response.body) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.length) > 0) { message = response.body.errors[0].message; } else { message = response.body; } if (typeof message !== "string") { try { message = JSON.stringify(message); // eslint-disable-next-line no-empty } catch (_) { } } throw new NeedleWrapperException(message, response.statusCode, response.headers); } return response; } exports.needleWrapper = needleWrapper; function parseResponseBody(response) { let body; try { body = JSON.parse(response.body); } catch (err) { body = response.body; } return body; } exports.parseResponseBody = parseResponseBody; class NeedleWrapperException extends Error { constructor(message, statusCode, headers) { super(message); this.statusCode = statusCode; this.headers = headers; } } //# sourceMappingURL=needle.js.map /***/ }), /***/ 15271: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildUnauthenticatedV2RequestConfig = exports.parseChallengeHeaders = exports.getToken = exports.paginatedV2Call = exports.registryCall = exports.registryV2Call = void 0; const parseLink = __webpack_require__(54336); const url = __webpack_require__(78835); const needle_1 = __webpack_require__(48360); const BEARER_REALM = "Bearer realm"; const MAX_RETRIES = 1; async function registryV2Call(registryBase, endpoint, accept, username, password, reqOptions = {}) { const reqConfig = buildUnauthenticatedV2RequestConfig(registryBase, endpoint, accept, reqOptions); try { return await needle_1.needleWrapper(reqConfig, MAX_RETRIES); } catch (err) { if (err.statusCode === 401) { if (!username || !password) { // Supply and empty username and password if no credentials // are provided. These might be added later by a broker client. username = username ? username : ""; password = password ? password : ""; } const authConfig = await setAuthConfig(registryBase, err, reqConfig, username, password, reqOptions); try { return await needle_1.needleWrapper(authConfig, MAX_RETRIES); } catch (err) { if (isRedirectStatus(err.statusCode)) { return await handleRedirect(err, reqConfig); } throw err; } } if (isRedirectStatus(err.statusCode)) { return await handleRedirect(err, reqConfig); } throw err; } } exports.registryV2Call = registryV2Call; /** * WARNING!!! * * This function was created for a very specific usecase (https://snyksec.atlassian.net/browse/MAGMA-1262) * It uses the existing mechanism of obtaining a token for authenticating, but can be used to hit any API endpoint, * and not necessarily a Docker V2 endpoint. * This is clearly an abuse of a library that's named after the v2 API, and this function should be considered a tech debt. * Once it's no longer necessary, it is advised that this function is removed. * */ async function registryCall(uri, username, password, reqOptions = {}) { const reqConfig = applyRequestOptions({ uri: `https://${uri}` }, reqOptions); try { return await needle_1.needleWrapper(reqConfig, MAX_RETRIES); } catch (err) { if (err.statusCode === 401) { if (!username || !password) { // Supply and empty username and password if no credentials // are provided. These might be added later by a broker client. username = username ? username : ""; password = password ? password : ""; } const authConfig = await setAuthConfig("", err, reqConfig, username, password, reqOptions); try { return await needle_1.needleWrapper(authConfig, MAX_RETRIES); } catch (err) { if (isRedirectStatus(err.statusCode)) { return await handleRedirect(err, reqConfig); } throw err; } } if (isRedirectStatus(err.statusCode)) { return await handleRedirect(err, reqConfig); } throw err; } } exports.registryCall = registryCall; async function paginatedV2Call(registryBase, accept, username, password, endpoint, key, pageSize = 1000, maxPages = Number.MAX_SAFE_INTEGER, reqOptions = {}) { const result = []; let pageEndpoint = `${endpoint}?n=${pageSize}`; let pageCount = 0; while (pageCount < maxPages) { const response = await registryV2Call(registryBase, pageEndpoint, accept, username, password, reqOptions); const body = needle_1.parseResponseBody(response); if (body && body[key]) { result.push(...body[key]); } if (!response.headers.link) { break; } pageCount += 1; pageEndpoint = pageEndpointForLink(endpoint, response.headers.link); } return result; } exports.paginatedV2Call = paginatedV2Call; async function getToken(registryBase, authBase, service, scope, username, password, reqOptions = {}) { const reqConfig = applyRequestOptions({ uri: authBase, qs: { service, scope, }, }, Object.assign({}, reqOptions)); // Test truthiness, should be false when username and password are undefined if (username && password) { reqConfig.username = username; reqConfig.password = password; } const response = await needle_1.needleWrapper(reqConfig); const body = needle_1.parseResponseBody(response); return body.token || body.access_token; } exports.getToken = getToken; function parseChallengeHeaders(challengeHeaders) { const headersMap = {}; const headerSplit = challengeHeaders.split(","); for (let i = 0; i < headerSplit.length; i++) { const entry = headerSplit[i]; if (!entry.includes("=") && i > 0) { // we'll get here in case a value includes a comma. we want to concat what's after the comma to the previous value headerSplit[i - 1] += `,${entry}`; headerSplit.splice(i, 1); i--; } } headerSplit.forEach(entry => { const [key, value] = entry.split("="); headersMap[key] = JSON.parse(value); }); return [headersMap[BEARER_REALM], headersMap.service, headersMap.scope]; } exports.parseChallengeHeaders = parseChallengeHeaders; function buildUnauthenticatedV2RequestConfig(registryBase, endpoint, accept, reqOptions = {}) { return applyRequestOptions({ headers: { Accept: accept }, uri: `https://${registryBase}/v2${endpoint}`, }, reqOptions); } exports.buildUnauthenticatedV2RequestConfig = buildUnauthenticatedV2RequestConfig; function pageEndpointForLink(endpoint, link) { const linkPath = parseLink(link).next.url; const linkQuery = linkPath.split("?")[1]; return `${endpoint}?${linkQuery}`; } async function setAuthConfig(registryBase, err, reqConfig, username, password, reqOptions) { // See: https://docs.docker.com/registry/spec/auth/token/#how-to-authenticate const challengeHeaders = err.headers["www-authenticate"]; if (!challengeHeaders) { throw err; } const [authBase, service, scope] = parseChallengeHeaders(challengeHeaders); if (!authBase) { // basic auth return Object.assign(Object.assign({}, reqConfig), { username, password }); } else { // bearer token const token = await getToken(registryBase, authBase, service, scope, username, password, reqOptions); return Object.assign(Object.assign({}, reqConfig), { headers: Object.assign(Object.assign({}, reqConfig.headers), { Authorization: `Bearer ${token}` }) }); } } async function handleRedirect(err, config) { // ACR does not handle redirects well, where automatic redirects // fail due to an unexpected authorization header. // the solution is to follow the redirect, however discarding // the token. const location = err.headers.location; if (!location) { throw err; } // Only clear the Authorization headers if the redirect is for // azure container registries. if (location.includes("azurecr.io")) { delete config.headers.Authorization; } const redirectUrl = assertFullUrl(location, config.uri); config.uri = redirectUrl; return await needle_1.needleWrapper(config, MAX_RETRIES); } /* * Takes request config and applies allowed options to it. * @param reqConfig - request config that is passed to the request library. * @param reqOptions - options passed in from outside of v2 client library. */ function applyRequestOptions(reqConfig, reqOptions) { const options = Object.assign({}, reqOptions); let uri = applyUriProtocol(reqConfig.uri, options.protocol); delete options.protocol; uri = applyUriHostMappings(uri, options.hostMappings); delete options.hostMappings; const headers = applyHeaders(reqConfig.headers, options.headers); delete options.headers; return Object.assign(Object.assign(Object.assign({}, reqConfig), options), { uri, headers }); } function applyUriProtocol(uri, protocol) { if (!protocol) { return uri; } const updatedUrl = url.parse(uri); updatedUrl.protocol = protocol; return url.format(updatedUrl); } /** * Applies host mappings to given uri. * * @param uri * @param mappings - Array of mappings. Each mapping is represented as array * tuple: [host_regex_matcher, new_host]. */ function applyUriHostMappings(uri, mappings) { if (!mappings) { return uri; } const updatedUrl = url.parse(uri); const mapping = mappings.find(([matcher]) => updatedUrl.host.match(matcher)); if (!mapping) { return uri; } updatedUrl.host = mapping[1]; return url.format(updatedUrl); } function applyHeaders(currentHeaders, addHeaders) { return Object.assign(Object.assign({}, (currentHeaders || {})), (addHeaders || {})); } function assertFullUrl(redirectLocation, originalLocation) { let redirectUrl; try { redirectUrl = new URL(redirectLocation); } catch (_a) { // in case the location is not a proper URL (contains just the path), attach the original URL's origin const originalUrl = new URL(originalLocation); redirectUrl = new URL(redirectLocation, originalUrl.origin); } return redirectUrl.href; } /* Check whether the response status requires redirect. Note: since we only make GET requests, we do not need to handle different redirect statuses having different requirements for handling the request method. */ function isRedirectStatus(statusCode) { return (statusCode === 301 || statusCode === 302 || statusCode === 303 || statusCode === 307 || statusCode === 308); } //# sourceMappingURL=registry-call.js.map /***/ }), /***/ 47235: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); //# sourceMappingURL=types.js.map /***/ }), /***/ 89578: /***/ ((module, exports, __webpack_require__) => { "use strict"; function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /* eslint-env browser */ /** * This is the web browser implementation of `debug()`. */ exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); /** * Colors. */ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ // eslint-disable-next-line complexity function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; } // Internet Explorer and Edge do not support colors. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); if (!this.useColors) { return; } var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function (match) { if (match === '%%') { return; } index++; if (match === '%c') { // We only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { var _console; // This hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (namespaces) { exports.storage.setItem('debug', namespaces); } else { exports.storage.removeItem('debug'); } } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.getItem('debug'); } catch (error) {} // Swallow // XXX (@Qix-) should we be logging these? // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context // The Browser also has localStorage in the global context. return localStorage; } catch (error) {// Swallow // XXX (@Qix-) should we be logging these? } } module.exports = __webpack_require__(55335)(exports); var formatters = module.exports.formatters; /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ formatters.j = function (v) { try { return JSON.stringify(v); } catch (error) { return '[UnexpectedJSONParseError]: ' + error.message; } }; /***/ }), /***/ 55335: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. */ function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = __webpack_require__(57824); Object.keys(env).forEach(function (key) { createDebug[key] = env[key]; }); /** * Active `debug` instances. */ createDebug.instances = []; /** * The currently active debug mode names, and names to skip. */ createDebug.names = []; createDebug.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". */ createDebug.formatters = {}; /** * Selects a color for a debug namespace * @param {String} namespace The namespace string for the for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ function selectColor(namespace) { var hash = 0; for (var i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; // Convert to 32bit integer } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function createDebug(namespace) { var prevTime; function debug() { // Disabled? if (!debug.enabled) { return; } for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var self = debug; // Set `diff` timestamp var curr = Number(new Date()); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== 'string') { // Anything else let's inspect with %O args.unshift('%O'); } // Apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { // If we encounter an escaped % then don't increase the array index if (match === '%%') { return match; } index++; var formatter = createDebug.formatters[format]; if (typeof formatter === 'function') { var val = args[index]; match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // Apply env-specific formatting (colors, etc.) createDebug.formatArgs.call(self, args); var logFn = self.log || createDebug.log; logFn.apply(self, args); } debug.namespace = namespace; debug.enabled = createDebug.enabled(namespace); debug.useColors = createDebug.useColors(); debug.color = selectColor(namespace); debug.destroy = destroy; debug.extend = extend; // Debug.formatArgs = formatArgs; // debug.rawLog = rawLog; // env-specific initialization logic for debug instances if (typeof createDebug.init === 'function') { createDebug.init(debug); } createDebug.instances.push(debug); return debug; } function destroy() { var index = createDebug.instances.indexOf(this); if (index !== -1) { createDebug.instances.splice(index, 1); return true; } return false; } function extend(namespace, delimiter) { return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { createDebug.save(namespaces); createDebug.names = []; createDebug.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { // ignore empty strings continue; } namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } } for (i = 0; i < createDebug.instances.length; i++) { var instance = createDebug.instances[i]; instance.enabled = createDebug.enabled(instance.namespace); } } /** * Disable debug output. * * @api public */ function disable() { createDebug.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i; var len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; /***/ }), /***/ 4993: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { module.exports = __webpack_require__(89578); } else { module.exports = __webpack_require__(61238); } /***/ }), /***/ 61238: /***/ ((module, exports, __webpack_require__) => { "use strict"; /** * Module dependencies. */ var tty = __webpack_require__(33867); var util = __webpack_require__(31669); /** * This is the Node.js implementation of `debug()`. */ exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; /** * Colors. */ exports.colors = [6, 2, 3, 4, 5, 1]; try { // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) // eslint-disable-next-line import/no-extraneous-dependencies var supportsColor = __webpack_require__(92130); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; } } catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. /** * Build up the default `inspectOpts` object from the environment variables. * * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ exports.inspectOpts = Object.keys(process.env).filter(function (key) { return /^debug_/i.test(key); }).reduce(function (obj, key) { // Camel-case var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { return k.toUpperCase(); }); // Coerce string value into JS value var val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === 'null') { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); /** * Is stdout a TTY? Colored output is enabled when `true`. */ function useColors() { return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } /** * Adds ANSI color escape codes if enabled. * * @api public */ function formatArgs(args) { var name = this.namespace, useColors = this.useColors; if (useColors) { var c = this.color; var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); args[0] = prefix + args[0].split('\n').join('\n' + prefix); args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + ' ' + args[0]; } } function getDate() { if (exports.inspectOpts.hideDate) { return ''; } return new Date().toISOString() + ' '; } /** * Invokes `util.format()` with the specified arguments and writes to stderr. */ function log() { return process.stderr.write(util.format.apply(util, arguments) + '\n'); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { // If you set a process.env field to null or undefined, it gets cast to the // string 'null' or 'undefined'. Just delete instead. delete process.env.DEBUG; } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { return process.env.DEBUG; } /** * Init logic for `debug` instances. * * Create a new `inspectOpts` object in case `useColors` is set * differently for a particular `debug` instance. */ function init(debug) { debug.inspectOpts = {}; var keys = Object.keys(exports.inspectOpts); for (var i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } module.exports = __webpack_require__(55335)(exports); var formatters = module.exports.formatters; /** * Map %o to `util.inspect()`, all on a single line. */ formatters.o = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) .split('\n') .map(function (str) { return str.trim(); }) .join(' '); }; /** * Map %O to `util.inspect()`, allowing multiple lines if needed. */ formatters.O = function (v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; /***/ }), /***/ 54226: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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; } /***/ }), /***/ 77663: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "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 __webpack_require__(70540) }, 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 __webpack_require__(32195) }, 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 __webpack_require__(97680) }, }, // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. 'gbk': { type: '_dbcs', table: function() { return __webpack_require__(97680).concat(__webpack_require__(36775)) }, }, '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 __webpack_require__(97680).concat(__webpack_require__(36775)) }, gb18030: function() { return __webpack_require__(99383) }, 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 __webpack_require__(79924) }, }, '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 __webpack_require__(75254) }, }, // 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 __webpack_require__(75254).concat(__webpack_require__(60556)) }, encodeSkipVals: [ // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, ], }, 'cnbig5': 'big5hkscs', 'csbig5': 'big5hkscs', 'xxbig5': 'big5hkscs', }; /***/ }), /***/ 54078: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "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 = [ __webpack_require__(56379), __webpack_require__(57437), __webpack_require__(64189), __webpack_require__(62636), __webpack_require__(33399), __webpack_require__(35768), __webpack_require__(40893), __webpack_require__(54226), __webpack_require__(77663), ]; // 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]; } /***/ }), /***/ 56379: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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 = __webpack_require__(24304).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; } /***/ }), /***/ 33399: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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() { } /***/ }), /***/ 40893: /***/ ((module) => { "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": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" } } /***/ }), /***/ 35768: /***/ ((module) => { "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", }; /***/ }), /***/ 64189: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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'; } /***/ }), /***/ 57437: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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'; } /***/ }), /***/ 62636: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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 "+-"; 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; } /***/ }), /***/ 84938: /***/ ((__unused_webpack_module, exports) => { "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(); } /***/ }), /***/ 62649: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).Buffer; var bomHandling = __webpack_require__(84938), 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 = __webpack_require__(54078); // 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 = __webpack_require__(34638)(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 = __webpack_require__(92413); } 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 (false) {} /***/ }), /***/ 34638: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var Buffer = __webpack_require__(2399).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, }; }; /***/ }), /***/ 21893: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var createHash = __webpack_require__(76417).createHash; function get_header(header, credentials, opts) { var type = header.split(' ')[0], user = credentials[0], pass = credentials[1]; if (type == 'Digest') { return digest.generate(header, user, pass, opts.method, opts.path); } else if (type == 'Basic') { return basic(user, pass); } } //////////////////// // basic function md5(string) { return createHash('md5').update(string).digest('hex'); } function basic(user, pass) { var str = typeof pass == 'undefined' ? user : [user, pass].join(':'); return 'Basic ' + Buffer.from(str).toString('base64'); } //////////////////// // digest // logic inspired from https://github.com/simme/node-http-digest-client var digest = {}; digest.parse_header = function(header) { var challenge = {}, matches = header.match(/([a-z0-9_-]+)="?([a-z0-9_=\/\.@\s-\+)()]+)"?/gi); for (var i = 0, l = matches.length; i < l; i++) { var parts = matches[i].split('='), key = parts.shift(), val = parts.join('=').replace(/^"/, '').replace(/"$/, ''); challenge[key] = val; } return challenge; } digest.update_nc = function(nc) { var max = 99999999; nc++; if (nc > max) nc = 1; var padding = new Array(8).join('0') + ''; nc = nc + ''; return padding.substr(0, 8 - nc.length) + nc; } digest.generate = function(header, user, pass, method, path) { var nc = 1, cnonce = null, challenge = digest.parse_header(header); var ha1 = md5(user + ':' + challenge.realm + ':' + pass), ha2 = md5(method.toUpperCase() + ':' + path), resp = [ha1, challenge.nonce]; if (typeof challenge.qop === 'string') { cnonce = md5(Math.random().toString(36)).substr(0, 8); nc = digest.update_nc(nc); resp = resp.concat(nc, cnonce); resp = resp.concat(challenge.qop, ha2); } else { resp = resp.concat(ha2); } var params = { uri : path, realm : challenge.realm, nonce : challenge.nonce, username : user, response : md5(resp.join(':')) } if (challenge.qop) { params.qop = challenge.qop; } if (challenge.opaque) { params.opaque = challenge.opaque; } if (cnonce) { params.nc = nc; params.cnonce = cnonce; } header = [] for (var k in params) header.push(k + '="' + params[k] + '"') return 'Digest ' + header.join(', '); } module.exports = { header : get_header, basic : basic, digest : digest.generate } /***/ }), /***/ 27208: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { // Simple cookie handling implementation based on the standard RFC 6265. // // This module just has two functionalities: // - Parse a set-cookie-header as a key value object // - Write a cookie-string from a key value object // // All cookie attributes are ignored. var unescape = __webpack_require__(71191).unescape; var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2\s*$/; var EXCLUDED_CHARS = /[\x00-\x1F\x7F\x3B\x3B\s\"\,\\"%]/g; var TRAILING_SEMICOLON = /\x3B+$/; var SEP_SEMICOLON = /\s*\x3B\s*/; // i know these should be 'const', but I'd like to keep // supporting earlier node.js versions as long as I can. :) var KEY_INDEX = 1; // index of key from COOKIE_PAIR match var VALUE_INDEX = 3; // index of value from COOKIE_PAIR match // Returns a copy str trimmed and without trainling semicolon. function cleanCookieString(str) { return str.trim().replace(/\x3B+$/, ''); } function getFirstPair(str) { var index = str.indexOf('\x3B'); return index === -1 ? str : str.substr(0, index); } // Returns a encoded copy of str based on RFC6265 S4.1.1. function encodeCookieComponent(str) { return str.toString().replace(EXCLUDED_CHARS, encodeURIComponent); } // Parses a set-cookie-string based on the standard defined in RFC6265 S4.1.1. function parseSetCookieString(str) { str = cleanCookieString(str); str = getFirstPair(str); var res = COOKIE_PAIR.exec(str); if (!res || !res[VALUE_INDEX]) return null; return { name : unescape(res[KEY_INDEX]), value : unescape(res[VALUE_INDEX]) }; } // Parses a set-cookie-header and returns a key/value object. // Each key represents the name of a cookie. function parseSetCookieHeader(header) { if (!header) return {}; header = Array.isArray(header) ? header : [header]; return header.reduce(function(res, str) { var cookie = parseSetCookieString(str); if (cookie) res[cookie.name] = cookie.value; return res; }, {}); } // Writes a set-cookie-string based on the standard definded in RFC6265 S4.1.1. function writeCookieString(obj) { return Object.keys(obj).reduce(function(str, name) { var encodedName = encodeCookieComponent(name); var encodedValue = encodeCookieComponent(obj[name]); str += (str ? '; ' : '') + encodedName + '=' + encodedValue; return str; }, ''); } // returns a key/val object from an array of cookie strings exports.read = parseSetCookieHeader; // writes a cookie string header exports.write = writeCookieString; /***/ }), /***/ 30365: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var iconv, inherits = __webpack_require__(31669).inherits, stream = __webpack_require__(92413); var regex = /(?:charset|encoding)\s*=\s*['"]? *([\w\-]+)/i; inherits(StreamDecoder, stream.Transform); function StreamDecoder(charset) { if (!(this instanceof StreamDecoder)) return new StreamDecoder(charset); stream.Transform.call(this, charset); this.charset = charset; this.parsed_chunk = false; } StreamDecoder.prototype._transform = function(chunk, encoding, done) { // try to get charset from chunk, but just once if (!this.parsed_chunk && (this.charset == 'utf-8' || this.charset == 'utf8')) { this.parsed_chunk = true; var matches = regex.exec(chunk.toString()); if (matches) { var found = matches[1].toLowerCase().replace('utf8', 'utf-8'); // canonicalize; // set charset, but only if iconv can handle it if (iconv.encodingExists(found)) this.charset = found; } } if (this.charset == 'utf-8') { // no need to decode, just pass through this.push(chunk); return done(); } // initialize stream decoder if not present var self = this; if (!this.decoder) { this.decoder = iconv.decodeStream(this.charset); this.decoder.on('data', function(decoded_chunk) { self.push(decoded_chunk); }); }; this.decoder.write(chunk); done(); } module.exports = function(charset) { try { if (!iconv) iconv = __webpack_require__(62649); } catch(e) { /* iconv not found */ } if (iconv) return new StreamDecoder(charset); else return new stream.PassThrough; } /***/ }), /***/ 13396: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var readFile = __webpack_require__(35747).readFile, basename = __webpack_require__(85622).basename; exports.build = function(data, boundary, callback) { if (typeof data != 'object' || typeof data.pipe == 'function') return callback(new Error('Multipart builder expects data as key/val object.')); var body = '', object = flatten(data), count = Object.keys(object).length; if (count === 0) return callback(new Error('Empty multipart body. Invalid data.')) function done(err, section) { if (err) return callback(err); if (section) body += section; --count || callback(null, body + '--' + boundary + '--'); }; for (var key in object) { var value = object[key]; if (value === null || typeof value == 'undefined') { done(); } else if (Buffer.isBuffer(value)) { var part = { buffer: value, content_type: 'application/octet-stream' }; generate_part(key, part, boundary, done); } else { var part = (value.buffer || value.file || value.content_type) ? value : { value: value }; generate_part(key, part, boundary, done); } } } function generate_part(name, part, boundary, callback) { var return_part = '--' + boundary + '\r\n'; return_part += 'Content-Disposition: form-data; name="' + name + '"'; function append(data, filename) { if (data) { var binary = part.content_type.indexOf('text') == -1; return_part += '; filename="' + encodeURIComponent(filename) + '"\r\n'; if (binary) return_part += 'Content-Transfer-Encoding: binary\r\n'; return_part += 'Content-Type: ' + part.content_type + '\r\n\r\n'; return_part += binary ? data.toString('binary') : data.toString('utf8'); } callback(null, return_part + '\r\n'); }; if ((part.file || part.buffer) && part.content_type) { var filename = part.filename ? part.filename : part.file ? basename(part.file) : name; if (part.buffer) return append(part.buffer, filename); readFile(part.file, function(err, data) { if (err) return callback(err); append(data, filename); }); } else { if (typeof part.value == 'object') return callback(new Error('Object received for ' + name + ', expected string.')) if (part.content_type) { return_part += '\r\n'; return_part += 'Content-Type: ' + part.content_type; } return_part += '\r\n\r\n'; return_part += Buffer.from(String(part.value), 'utf8').toString('binary'); append(); } } // flattens nested objects for multipart body function flatten(object, into, prefix) { into = into || {}; for(var key in object) { var prefix_key = prefix ? prefix + '[' + key + ']' : key; var prop = object[key]; if (prop && typeof prop === 'object' && !(prop.buffer || prop.file || prop.content_type)) flatten(prop, into, prefix_key) else into[prefix_key] = prop; } return into; } /***/ }), /***/ 57441: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { ////////////////////////////////////////// // Needle -- HTTP Client for Node.js // Written by Tomás Pollak // (c) 2012-2020 - Fork Ltd. // MIT Licensed ////////////////////////////////////////// var fs = __webpack_require__(35747), http = __webpack_require__(98605), https = __webpack_require__(57211), url = __webpack_require__(78835), stream = __webpack_require__(92413), debug = __webpack_require__(4993)('needle'), stringify = __webpack_require__(10558)/* .build */ .J, multipart = __webpack_require__(13396), auth = __webpack_require__(21893), cookies = __webpack_require__(27208), parsers = __webpack_require__(55256), decoder = __webpack_require__(30365); ////////////////////////////////////////// // variabilia var version = __webpack_require__(71551)/* .version */ .i8; var user_agent = 'Needle/' + version; user_agent += ' (Node.js ' + process.version + '; ' + process.platform + ' ' + process.arch + ')'; var tls_options = 'pfx key passphrase cert ca ciphers rejectUnauthorized secureProtocol checkServerIdentity family'; // older versions of node (< 0.11.4) prevent the runtime from exiting // because of connections in keep-alive state. so if this is the case // we'll default new requests to set a Connection: close header. var close_by_default = !http.Agent || http.Agent.defaultMaxSockets != Infinity; // see if we have Object.assign. otherwise fall back to util._extend var extend = Object.assign ? Object.assign : __webpack_require__(31669)._extend; // these are the status codes that Needle interprets as redirects. var redirect_codes = [301, 302, 303, 307, 308]; ////////////////////////////////////////// // decompressors for gzip/deflate/br bodies function bind_opts(fn, options) { return fn.bind(null, options); } var decompressors = {}; try { var zlib = __webpack_require__(78761); // Enable Z_SYNC_FLUSH to avoid Z_BUF_ERROR errors (Node PR #2595) var zlib_options = { flush: zlib.Z_SYNC_FLUSH, finishFlush: zlib.Z_SYNC_FLUSH }; var br_options = { flush: zlib.BROTLI_OPERATION_FLUSH, finishFlush: zlib.BROTLI_OPERATION_FLUSH }; decompressors['x-deflate'] = bind_opts(zlib.Inflate, zlib_options); decompressors['deflate'] = bind_opts(zlib.Inflate, zlib_options); decompressors['x-gzip'] = bind_opts(zlib.Gunzip, zlib_options); decompressors['gzip'] = bind_opts(zlib.Gunzip, zlib_options); if (typeof zlib.BrotliDecompress === 'function') { decompressors['br'] = bind_opts(zlib.BrotliDecompress, br_options); } } catch(e) { /* zlib not available */ } ////////////////////////////////////////// // options and aliases var defaults = { // data boundary : '--------------------NODENEEDLEHTTPCLIENT', encoding : 'utf8', parse_response : 'all', // same as true. valid options: 'json', 'xml' or false/null proxy : null, // agent & headers agent : null, headers : {}, accept : '*/*', user_agent : user_agent, // numbers open_timeout : 10000, response_timeout : 0, read_timeout : 0, follow_max : 0, stream_length : -1, // booleans compressed : false, decode_response : true, parse_cookies : true, follow_set_cookies : false, follow_set_referer : false, follow_keep_method : false, follow_if_same_host : false, follow_if_same_protocol : false, follow_if_same_location : false } var aliased = { options: { decode : 'decode_response', parse : 'parse_response', timeout : 'open_timeout', follow : 'follow_max' }, inverted: {} } // only once, invert aliased keys so we can get passed options. Object.keys(aliased.options).map(function(k) { var value = aliased.options[k]; aliased.inverted[value] = k; }); ////////////////////////////////////////// // helpers function get_env_var(keys, try_lower) { var val, i = -1, env = process.env; while (!val && i < keys.length-1) { val = env[keys[++i]]; if (!val && try_lower) { val = env[keys[i].toLowerCase()]; } } return val; } function keys_by_type(type) { return Object.keys(defaults).map(function(el) { if (defaults[el] !== null && defaults[el].constructor == type) return el; }).filter(function(el) { return el }) } function parse_content_type(header) { if (!header || header === '') return {}; var found, charset = 'utf8', arr = header.split(';'); if (arr.length > 1 && (found = arr[1].match(/charset=(.+)/))) charset = found[1]; return { type: arr[0], charset: charset }; } function is_stream(obj) { return typeof obj.pipe === 'function'; } function get_stream_length(stream, given_length, cb) { if (given_length > 0) return cb(given_length); if (stream.end !== void 0 && stream.end !== Infinity && stream.start !== void 0) return cb((stream.end + 1) - (stream.start || 0)); fs.stat(stream.path, function(err, stat) { cb(stat ? stat.size - (stream.start || 0) : null); }); } function resolve_url(href, base) { if (url.URL) return new url.URL(href, base); // older Node version (< v6.13) return base ? url.resolve(base, href) : href; } function host_and_ports_match(url1, url2) { if (url1.indexOf('http') < 0) url1 = 'http://' + url1; if (url2.indexOf('http') < 0) url2 = 'http://' + url2; var a = url.parse(url1), b = url.parse(url2); return a.host == b.host && String(a.port || (a.protocol == 'https:' ? 443 : 80)) == String(b.port || (b.protocol == 'https:' ? 443 : 80)); } // returns false if a no_proxy host matches given url function should_proxy_to(url) { var no_proxy = get_env_var(['NO_PROXY'], true); if (!no_proxy) return true; var host, hosts = no_proxy.split(','); for (var i in hosts) { host = hosts[i]; if (host_and_ports_match(host, url)) { return false; } } return true; } function pump_streams(streams, cb) { if (stream.pipeline) return stream.pipeline.apply(null, streams.concat(cb)); var tmp = streams.shift(); while (streams.length) { tmp = tmp.pipe(streams.shift()); tmp.once('error', function(e) { cb && cb(e); cb = null; }) } } ////////////////////////////////////////// // the main act function Needle(method, uri, data, options, callback) { // if (!(this instanceof Needle)) { // return new Needle(method, uri, data, options, callback); // } if (typeof uri !== 'string') throw new TypeError('URL must be a string, not ' + uri); this.method = method.toLowerCase(); this.uri = uri; this.data = data; if (typeof options == 'function') { this.callback = options; this.options = {}; } else { this.callback = callback; this.options = options; } } Needle.prototype.setup = function(uri, options) { function get_option(key, fallback) { // if original is in options, return that value if (typeof options[key] != 'undefined') return options[key]; // otherwise, return value from alias or fallback/undefined return typeof options[aliased.inverted[key]] != 'undefined' ? options[aliased.inverted[key]] : fallback; } function check_value(expected, key) { var value = get_option(key), type = typeof value; if (type != 'undefined' && type != expected) throw new TypeError(type + ' received for ' + key + ', but expected a ' + expected); return (type == expected) ? value : defaults[key]; } ////////////////////////////////////////////////// // the basics var config = { http_opts : { agent: get_option('agent', defaults.agent), localAddress: get_option('localAddress', undefined), lookup: get_option('lookup', undefined) }, // passed later to http.request() directly headers : {}, output : options.output, proxy : get_option('proxy', defaults.proxy), parser : get_option('parse_response', defaults.parse_response), encoding : options.encoding || (options.multipart ? 'binary' : defaults.encoding) } keys_by_type(Boolean).forEach(function(key) { config[key] = check_value('boolean', key); }) keys_by_type(Number).forEach(function(key) { config[key] = check_value('number', key); }) // populate http_opts with given TLS options tls_options.split(' ').forEach(function(key) { if (typeof options[key] != 'undefined') { if (config.http_opts.agent) { // pass option to existing agent config.http_opts.agent.options[key] = options[key]; } else { config.http_opts[key] = options[key]; } } }); ////////////////////////////////////////////////// // headers, cookies for (var key in defaults.headers) config.headers[key] = defaults.headers[key]; config.headers['accept'] = options.accept || defaults.accept; config.headers['user-agent'] = options.user_agent || defaults.user_agent; if (options.content_type) config.headers['content-type'] = options.content_type; // set connection header if opts.connection was passed, or if node < 0.11.4 (close) if (options.connection || close_by_default) config.headers['connection'] = options.connection || 'close'; if ((options.compressed || defaults.compressed) && typeof zlib != 'undefined') config.headers['accept-encoding'] = decompressors['br'] ? 'gzip, deflate, br' : 'gzip, deflate'; if (options.cookies) config.headers['cookie'] = cookies.write(options.cookies); ////////////////////////////////////////////////// // basic/digest auth if (uri.match(/[^\/]@/)) { // url contains user:pass@host, so parse it. var parts = (url.parse(uri).auth || '').split(':'); options.username = parts[0]; options.password = parts[1]; } if (options.username) { if (options.auth && (options.auth == 'auto' || options.auth == 'digest')) { config.credentials = [options.username, options.password]; } else { config.headers['authorization'] = auth.basic(options.username, options.password); } } var env_proxy = get_env_var(['HTTP_PROXY', 'HTTPS_PROXY'], true); if (!config.proxy && env_proxy) config.proxy = env_proxy; // if proxy is present, set auth header from either url or proxy_user option. if (config.proxy) { if (should_proxy_to(uri)) { if (config.proxy.indexOf('http') === -1) config.proxy = 'http://' + config.proxy; if (config.proxy.indexOf('@') !== -1) { var proxy = (url.parse(config.proxy).auth || '').split(':'); options.proxy_user = proxy[0]; options.proxy_pass = proxy[1]; } if (options.proxy_user) config.headers['proxy-authorization'] = auth.basic(options.proxy_user, options.proxy_pass); } else { delete config.proxy; } } // now that all our headers are set, overwrite them if instructed. for (var h in options.headers) config.headers[h.toLowerCase()] = options.headers[h]; config.uri_modifier = get_option('uri_modifier', null); return config; } Needle.prototype.start = function() { var out = new stream.PassThrough({ objectMode: false }), uri = this.uri, data = this.data, method = this.method, callback = (typeof this.options == 'function') ? this.options : this.callback, options = this.options || {}; // if no 'http' is found on URL, prepend it. if (uri.indexOf('http') === -1) uri = uri.replace(/^(\/\/)?/, 'http://'); var self = this, body, waiting = false, config = this.setup(uri, options); // unless options.json was set to false, assume boss also wants JSON if content-type matches. var json = options.json || (options.json !== false && config.headers['content-type'] == 'application/json'); if (data) { if (options.multipart) { // boss says we do multipart. so we do it. var boundary = options.boundary || defaults.boundary; waiting = true; multipart.build(data, boundary, function(err, parts) { if (err) throw(err); config.headers['content-type'] = 'multipart/form-data; boundary=' + boundary; next(parts); }); } else if (is_stream(data)) { if (method == 'get') throw new Error('Refusing to pipe() a stream via GET. Did you mean .post?'); if (config.stream_length > 0 || (config.stream_length === 0 && data.path)) { // ok, let's get the stream's length and set it as the content-length header. // this prevents some servers from cutting us off before all the data is sent. waiting = true; get_stream_length(data, config.stream_length, function(length) { data.length = length; next(data); }) } else { // if the boss doesn't want us to get the stream's length, or if it doesn't // have a file descriptor for that purpose, then just head on. body = data; } } else if (Buffer.isBuffer(data)) { body = data; // use the raw buffer as request body. } else if (method == 'get' && !json) { // append the data to the URI as a querystring. uri = uri.replace(/\?.*|$/, '?' + stringify(data)); } else { // string or object data, no multipart. // if string, leave it as it is, otherwise, stringify. body = (typeof(data) === 'string') ? data : json ? JSON.stringify(data) : stringify(data); // ensure we have a buffer so bytecount is correct. body = Buffer.from(body, config.encoding); } } function next(body) { if (body) { if (body.length) config.headers['content-length'] = body.length; // if no content-type was passed, determine if json or not. if (!config.headers['content-type']) { config.headers['content-type'] = json ? 'application/json; charset=utf-8' : 'application/x-www-form-urlencoded'; // no charset says W3 spec. } } // unless a specific accept header was set, assume json: true wants JSON back. if (options.json && (!options.accept && !(options.headers || {}).accept)) config.headers['accept'] = 'application/json'; self.send_request(1, method, uri, config, body, out, callback); } if (!waiting) next(body); return out; } Needle.prototype.get_request_opts = function(method, uri, config) { var opts = config.http_opts, proxy = config.proxy, remote = proxy ? url.parse(proxy) : url.parse(uri); opts.protocol = remote.protocol; opts.host = remote.hostname; opts.port = remote.port || (remote.protocol == 'https:' ? 443 : 80); opts.path = proxy ? uri : remote.pathname + (remote.search || ''); opts.method = method; opts.headers = config.headers; if (!opts.headers['host']) { // if using proxy, make sure the host header shows the final destination var target = proxy ? url.parse(uri) : remote; opts.headers['host'] = target.hostname; // and if a non standard port was passed, append it to the port header if (target.port && [80, 443].indexOf(target.port) === -1) { opts.headers['host'] += ':' + target.port; } } return opts; } Needle.prototype.should_follow = function(location, config, original) { if (!location) return false; // returns true if location contains matching property (host or protocol) function matches(property) { var property = original[property]; return location.indexOf(property) !== -1; } // first, check whether the requested location is actually different from the original if (!config.follow_if_same_location && location === original) return false; if (config.follow_if_same_host && !matches('host')) return false; // host does not match, so not following if (config.follow_if_same_protocol && !matches('protocol')) return false; // procotol does not match, so not following return true; } Needle.prototype.send_request = function(count, method, uri, config, post_data, out, callback) { if (typeof config.uri_modifier === 'function') { var modified_uri = config.uri_modifier(uri); debug('Modifying request URI', uri + ' => ' + modified_uri); uri = modified_uri; } var request, timer, returned = 0, self = this, request_opts = this.get_request_opts(method, uri, config), protocol = request_opts.protocol == 'https:' ? https : http; function done(err, resp) { if (returned++ > 0) return debug('Already finished, stopping here.'); if (timer) clearTimeout(timer); request.removeListener('error', had_error); out.done = true; // An error can still be fired after closing. In particular, on macOS. // See also: // - https://github.com/tomas/needle/issues/391 // - https://github.com/less/less.js/issues/3693 // - https://github.com/nodejs/node/issues/27916 request.once('error', function() {}); if (callback) return callback(err, resp, resp ? resp.body : undefined); // NOTE: this event used to be called 'end', but the behaviour was confusing // when errors ocurred, because the stream would still emit an 'end' event. out.emit('done', err); // trigger the 'done' event on streams we're being piped to, if any var pipes = out._readableState.pipes || []; if (!pipes.forEach) pipes = [pipes]; pipes.forEach(function(st) { st.emit('done', err); }) } function had_error(err) { debug('Request error', err); out.emit('err', err); done(err || new Error('Unknown error when making request.')); } function set_timeout(type, milisecs) { if (timer) clearTimeout(timer); if (milisecs <= 0) return; timer = setTimeout(function() { out.emit('timeout', type); request.abort(); // also invoke done() to terminate job on read_timeout if (type == 'read') done(new Error(type + ' timeout')); }, milisecs); } // handle errors on the underlying socket, that may be closed while writing // for an example case, see test/long_string_spec.js. we make sure this // scenario ocurred by verifying the socket's writable & destroyed states. function on_socket_end() { if (returned && !this.writable && this.destroyed === false) { this.destroy(); had_error(new Error('Remote end closed socket abruptly.')) } } debug('Making request #' + count, request_opts); request = protocol.request(request_opts, function(resp) { var headers = resp.headers; debug('Got response', resp.statusCode, headers); out.emit('response', resp); set_timeout('read', config.read_timeout); // if we got cookies, parse them unless we were instructed not to. make sure to include any // cookies that might have been set on previous redirects. if (config.parse_cookies && (headers['set-cookie'] || config.previous_resp_cookies)) { resp.cookies = extend(config.previous_resp_cookies || {}, cookies.read(headers['set-cookie'])); debug('Got cookies', resp.cookies); } // if redirect code is found, determine if we should follow it according to the given options. if (redirect_codes.indexOf(resp.statusCode) !== -1 && self.should_follow(headers.location, config, uri)) { // clear timer before following redirects to prevent unexpected setTimeout consequence clearTimeout(timer); if (count <= config.follow_max) { out.emit('redirect', headers.location); // unless 'follow_keep_method' is true, rewrite the request to GET before continuing. if (!config.follow_keep_method) { method = 'GET'; post_data = null; delete config.headers['content-length']; // in case the original was a multipart POST request. } // if follow_set_cookies is true, insert cookies in the next request's headers. // we set both the original request cookies plus any response cookies we might have received. if (config.follow_set_cookies && host_and_ports_match(headers.location, uri)) { var request_cookies = cookies.read(config.headers['cookie']); config.previous_resp_cookies = resp.cookies; if (Object.keys(request_cookies).length || Object.keys(resp.cookies || {}).length) { config.headers['cookie'] = cookies.write(extend(request_cookies, resp.cookies)); } } else if (config.headers['cookie']) { debug('Clearing original request cookie', config.headers['cookie']); delete config.headers['cookie']; } if (config.follow_set_referer) config.headers['referer'] = encodeURI(uri); // the original, not the destination URL. config.headers['host'] = null; // clear previous Host header to avoid conflicts. var redirect_url = resolve_url(headers.location, uri); debug('Redirecting to ' + redirect_url.toString()); return self.send_request(++count, method, redirect_url.toString(), config, post_data, out, callback); } else if (config.follow_max > 0) { return done(new Error('Max redirects reached. Possible loop in: ' + headers.location)); } } // if auth is requested and credentials were not passed, resend request, provided we have user/pass. if (resp.statusCode == 401 && headers['www-authenticate'] && config.credentials) { if (!config.headers['authorization']) { // only if authentication hasn't been sent var auth_header = auth.header(headers['www-authenticate'], config.credentials, request_opts); if (auth_header) { config.headers['authorization'] = auth_header; return self.send_request(count, method, uri, config, post_data, out, callback); } } } // ok, so we got a valid (non-redirect & authorized) response. let's notify the stream guys. out.emit('header', resp.statusCode, headers); out.emit('headers', headers); var pipeline = [], mime = parse_content_type(headers['content-type']), text_response = mime.type && (mime.type.indexOf('text/') != -1 || !!mime.type.match(/(\/|\+)(xml|json)$/)); // To start, if our body is compressed and we're able to inflate it, do it. if (headers['content-encoding'] && decompressors[headers['content-encoding']]) { var decompressor = decompressors[headers['content-encoding']](); // make sure we catch errors triggered by the decompressor. decompressor.on('error', had_error); pipeline.push(decompressor); } // If parse is enabled and we have a parser for it, then go for it. if (config.parser && parsers[mime.type]) { // If a specific parser was requested, make sure we don't parse other types. var parser_name = config.parser.toString().toLowerCase(); if (['xml', 'json'].indexOf(parser_name) == -1 || parsers[mime.type].name == parser_name) { // OK, so either we're parsing all content types or the one requested matches. out.parser = parsers[mime.type].name; pipeline.push(parsers[mime.type].fn()); // Set objectMode on out stream to improve performance. out._writableState.objectMode = true; out._readableState.objectMode = true; } // If we're not parsing, and unless decoding was disabled, we'll try // decoding non UTF-8 bodies to UTF-8, using the iconv-lite library. } else if (text_response && config.decode_response && mime.charset) { pipeline.push(decoder(mime.charset)); } // And `out` is the stream we finally push the decoded/parsed output to. pipeline.push(out); // Now, release the kraken! pump_streams([resp].concat(pipeline), function(err) { if (err) debug(err) // on node v8.x, if an error ocurrs on the receiving end, // then we want to abort the request to avoid having dangling sockets if (err && err.message == 'write after end') request.destroy(); }); // If the user has requested and output file, pipe the output stream to it. // In stream mode, we will still get the response stream to play with. if (config.output && resp.statusCode == 200) { // for some reason, simply piping resp to the writable stream doesn't // work all the time (stream gets cut in the middle with no warning). // so we'll manually need to do the readable/write(chunk) trick. var file = fs.createWriteStream(config.output); file.on('error', had_error); out.on('end', function() { if (file.writable) file.end(); }); file.on('close', function() { delete out.file; }) out.on('readable', function() { var chunk; while ((chunk = this.read()) !== null) { if (file.writable) file.write(chunk); // if callback was requested, also push it to resp.body if (resp.body) resp.body.push(chunk); } }) out.file = file; } // Only aggregate the full body if a callback was requested. if (callback) { resp.raw = []; resp.body = []; resp.bytes = 0; // Gather and count the amount of (raw) bytes using a PassThrough stream. var clean_pipe = new stream.PassThrough(); clean_pipe.on('readable', function() { var chunk; while ((chunk = this.read()) != null) { resp.bytes += chunk.length; resp.raw.push(chunk); } }) pump_streams([resp, clean_pipe], function(err) { if (err) debug(err); }); // Listen on the 'readable' event to aggregate the chunks, but only if // file output wasn't requested. Otherwise we'd have two stream readers. if (!config.output || resp.statusCode != 200) { out.on('readable', function() { var chunk; while ((chunk = this.read()) !== null) { // We're either pushing buffers or objects, never strings. if (typeof chunk == 'string') chunk = Buffer.from(chunk); // Push all chunks to resp.body. We'll bind them in resp.end(). resp.body.push(chunk); } }) } } // And set the .body property once all data is in. out.on('end', function() { if (resp.body) { // callback mode // we want to be able to access to the raw data later, so keep a reference. resp.raw = Buffer.concat(resp.raw); // if parse was successful, we should have an array with one object if (resp.body[0] !== undefined && !Buffer.isBuffer(resp.body[0])) { // that's our body right there. resp.body = resp.body[0]; // set the parser property on our response. we may want to check. if (out.parser) resp.parser = out.parser; } else { // we got one or several buffers. string or binary. resp.body = Buffer.concat(resp.body); // if we're here and parsed is true, it means we tried to but it didn't work. // so given that we got a text response, let's stringify it. if (text_response || out.parser) { resp.body = resp.body.toString(); } } } // if an output file is being written to, make sure the callback // is triggered after all data has been written to it. if (out.file) { out.file.on('close', function() { done(null, resp); }) } else { // elvis has left the building. done(null, resp); } }); // out.on('error', function(err) { // had_error(err); // if (err.code == 'ERR_STREAM_DESTROYED' || err.code == 'ERR_STREAM_PREMATURE_CLOSE') { // request.abort(); // } // }) }); // end request call // unless open_timeout was disabled, set a timeout to abort the request. set_timeout('open', config.open_timeout); // handle errors on the request object. things might get bumpy. request.on('error', had_error); // make sure timer is cleared if request is aborted (issue #257) request.once('abort', function() { if (timer) clearTimeout(timer); }) // handle socket 'end' event to ensure we don't get delayed EPIPE errors. request.once('socket', function(socket) { if (socket.connecting) { socket.once('connect', function() { set_timeout('response', config.response_timeout); }) } else { set_timeout('response', config.response_timeout); } // socket.once('close', function(e) { // console.log('socket closed!', e); // }) if (!socket.on_socket_end) { socket.on_socket_end = on_socket_end; socket.once('end', function() { process.nextTick(on_socket_end.bind(socket)) }); } }) if (post_data) { if (is_stream(post_data)) { pump_streams([post_data, request], function(err) { if (err) debug(err); }); } else { request.write(post_data, config.encoding); request.end(); } } else { request.end(); } out.abort = function() { request.abort() }; // easier access out.request = request; return out; } ////////////////////////////////////////// // exports if (typeof Promise !== 'undefined') { module.exports = function() { var verb, args = [].slice.call(arguments); if (args[0].match(/\.|\//)) // first argument looks like a URL verb = (args.length > 2) ? 'post' : 'get'; else verb = args.shift(); if (verb.match(/get|head/i) && args.length == 2) args.splice(1, 0, null); // assume no data if head/get with two args (url, options) return new Promise(function(resolve, reject) { module.exports.request(verb, args[0], args[1], args[2], function(err, resp) { return err ? reject(err) : resolve(resp); }); }) } } module.exports.version = version; module.exports.defaults = function(obj) { for (var key in obj) { var target_key = aliased.options[key] || key; if (defaults.hasOwnProperty(target_key) && typeof obj[key] != 'undefined') { if (target_key != 'parse_response' && target_key != 'proxy' && target_key != 'agent') { // ensure type matches the original, except for proxy/parse_response that can be null/bool or string var valid_type = defaults[target_key].constructor.name; if (obj[key].constructor.name != valid_type) throw new TypeError('Invalid type for ' + key + ', should be ' + valid_type); } defaults[target_key] = obj[key]; } else { throw new Error('Invalid property for defaults:' + target_key); } } return defaults; } 'head get'.split(' ').forEach(function(method) { module.exports[method] = function(uri, options, callback) { return new Needle(method, uri, null, options, callback).start(); } }) 'post put patch delete'.split(' ').forEach(function(method) { module.exports[method] = function(uri, data, options, callback) { return new Needle(method, uri, data, options, callback).start(); } }) module.exports.request = function(method, uri, data, opts, callback) { return new Needle(method, uri, data, opts, callback).start(); }; /***/ }), /***/ 55256: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { ////////////////////////////////////////// // Defines mappings between content-type // and the appropriate parsers. ////////////////////////////////////////// var Transform = __webpack_require__(92413).Transform; var sax = __webpack_require__(36099); function parseXML(str, cb) { var obj, current, parser = sax.parser(true, { trim: true, lowercase: true }) parser.onerror = parser.onend = done; function done(err) { parser.onerror = parser.onend = function() { } cb(err, obj) } function newElement(name, attributes) { return { name: name || '', value: '', attributes: attributes || {}, children: [] } } parser.oncdata = parser.ontext = function(t) { if (current) current.value += t } parser.onopentag = function(node) { var element = newElement(node.name, node.attributes) if (current) { element.parent = current current.children.push(element) } else { // root object obj = element } current = element }; parser.onclosetag = function() { if (typeof current.parent !== 'undefined') { var just_closed = current current = current.parent delete just_closed.parent } } parser.write(str).close() } function parserFactory(name, fn) { function parser() { var chunks = [], stream = new Transform({ objectMode: true }); // Buffer all our data stream._transform = function(chunk, encoding, done) { chunks.push(chunk); done(); } // And call the parser when all is there. stream._flush = function(done) { var self = this, data = Buffer.concat(chunks); try { fn(data, function(err, result) { if (err) throw err; self.push(result); }); } catch (err) { self.push(data); // just pass the original data } finally { done(); } } return stream; } return { fn: parser, name: name }; } var parsers = {} function buildParser(name, types, fn) { var parser = parserFactory(name, fn); types.forEach(function(type) { parsers[type] = parser; }) } buildParser('json', [ 'application/json', 'text/javascript', 'application/vnd.api+json' ], function(buffer, cb) { var err, data; try { data = JSON.parse(buffer); } catch (e) { err = e; } cb(err, data); }); buildParser('xml', [ 'text/xml', 'application/xml', 'application/rdf+xml', 'application/rss+xml', 'application/atom+xml' ], function(buffer, cb) { parseXML(buffer.toString(), function(err, obj) { cb(err, obj) }) }); module.exports = parsers; module.exports.use = buildParser; /***/ }), /***/ 10558: /***/ ((__unused_webpack_module, exports) => { // based on the qs module, but handles null objects as expected // fixes by Tomas Pollak. var toString = Object.prototype.toString; function stringify(obj, prefix) { if (prefix && (obj === null || typeof obj == 'undefined')) { return prefix + '='; } else if (toString.call(obj) == '[object Array]') { return stringifyArray(obj, prefix); } else if (toString.call(obj) == '[object Object]') { return stringifyObject(obj, prefix); } else if (toString.call(obj) == '[object Date]') { return obj.toISOString(); } else if (prefix) { // string inside array or hash return prefix + '=' + encodeURIComponent(String(obj)); } else if (String(obj).indexOf('=') !== -1) { // string with equal sign return String(obj); } else { throw new TypeError('Cannot build a querystring out of: ' + obj); } }; function stringifyArray(arr, prefix) { var ret = []; for (var i = 0, len = arr.length; i < len; i++) { if (prefix) ret.push(stringify(arr[i], prefix + '[]')); else ret.push(stringify(arr[i])); } return ret.join('&'); } function stringifyObject(obj, prefix) { var ret = []; Object.keys(obj).forEach(function(key) { ret.push(stringify(obj[key], prefix ? prefix + '[' + encodeURIComponent(key) + ']' : encodeURIComponent(key))); }) return ret.join('&'); } exports.J = stringify; /***/ }), /***/ 54336: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var qs = __webpack_require__(71191) , url = __webpack_require__(78835) , xtend = __webpack_require__(47529); const PARSE_LINK_HEADER_MAXLEN = parseInt(process.env.PARSE_LINK_HEADER_MAXLEN) || 2000; const PARSE_LINK_HEADER_THROW_ON_MAXLEN_EXCEEDED = process.env.PARSE_LINK_HEADER_THROW_ON_MAXLEN_EXCEEDED != null function hasRel(x) { return x && x.rel; } function intoRels (acc, x) { function splitRel (rel) { acc[rel] = xtend(x, { rel: rel }); } x.rel.split(/\s+/).forEach(splitRel); return acc; } function createObjects (acc, p) { // rel="next" => 1: rel 2: next var m = p.match(/\s*(.+)\s*=\s*"?([^"]+)"?/) if (m) acc[m[1]] = m[2]; return acc; } function parseLink(link) { try { var m = link.match(/]*)>(.*)/) , linkUrl = m[1] , parts = m[2].split(';') , parsedUrl = url.parse(linkUrl) , qry = qs.parse(parsedUrl.query); parts.shift(); var info = parts .reduce(createObjects, {}); info = xtend(qry, info); info.url = linkUrl; return info; } catch (e) { return null; } } function checkHeader(linkHeader){ if (!linkHeader) return false; if (linkHeader.length > PARSE_LINK_HEADER_MAXLEN) { if (PARSE_LINK_HEADER_THROW_ON_MAXLEN_EXCEEDED) { throw new Error('Input string too long, it should be under ' + PARSE_LINK_HEADER_MAXLEN + ' characters.'); } else { return false; } } return true; } module.exports = function (linkHeader) { if (!checkHeader(linkHeader)) return null; return linkHeader.split(/,\s* { "use strict"; const taskManager = __webpack_require__(32972); const async_1 = __webpack_require__(64002); const stream_1 = __webpack_require__(3480); const sync_1 = __webpack_require__(62512); const settings_1 = __webpack_require__(95879); const utils = __webpack_require__(73290); async function FastGlob(source, options) { assertPatternsInput(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); } // https://github.com/typescript-eslint/typescript-eslint/issues/60 // eslint-disable-next-line no-redeclare (function (FastGlob) { function sync(source, options) { assertPatternsInput(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob.sync = sync; function stream(source, options) { assertPatternsInput(source); const works = getWorks(source, stream_1.default, options); /** * The stream returned by the provider cannot work with an asynchronous iterator. * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. * This affects performance (+25%). I don't see best solution right now. */ return utils.stream.merge(works); } FastGlob.stream = stream; function generateTasks(source, options) { assertPatternsInput(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } FastGlob.generateTasks = generateTasks; function isDynamicPattern(source, options) { assertPatternsInput(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } FastGlob.isDynamicPattern = isDynamicPattern; function escapePath(source) { assertPatternsInput(source); return utils.path.escape(source); } FastGlob.escapePath = escapePath; })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { const patterns = [].concat(source); const settings = new settings_1.default(options); const tasks = taskManager.generate(patterns, settings); const provider = new _Provider(settings); return tasks.map(provider.read, provider); } function assertPatternsInput(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { throw new TypeError('Patterns must be a string (non empty) or an array of strings'); } } module.exports = FastGlob; /***/ }), /***/ 32972: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; const utils = __webpack_require__(73290); function generate(patterns, settings) { const positivePatterns = getPositivePatterns(patterns); const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); return staticTasks.concat(dynamicTasks); } exports.generate = generate; function convertPatternsToTasks(positive, negative, dynamic) { const positivePatternsGroup = groupPatternsByBaseDirectory(positive); // When we have a global group – there is no reason to divide the patterns into independent tasks. // In this case, the global task covers the rest. if ('.' in positivePatternsGroup) { const task = convertPatternGroupToTask('.', positive, negative, dynamic); return [task]; } return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic); } exports.convertPatternsToTasks = convertPatternsToTasks; function getPositivePatterns(patterns) { return utils.pattern.getPositivePatterns(patterns); } exports.getPositivePatterns = getPositivePatterns; function getNegativePatternsAsPositive(patterns, ignore) { const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); const positive = negative.map(utils.pattern.convertToPositivePattern); return positive; } exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; function groupPatternsByBaseDirectory(patterns) { const group = {}; return patterns.reduce((collection, pattern) => { const base = utils.pattern.getBaseDirectory(pattern); if (base in collection) { collection[base].push(pattern); } else { collection[base] = [pattern]; } return collection; }, group); } exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; function convertPatternGroupsToTasks(positive, negative, dynamic) { return Object.keys(positive).map((base) => { return convertPatternGroupToTask(base, positive[base], negative, dynamic); }); } exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; function convertPatternGroupToTask(base, positive, negative, dynamic) { return { dynamic, positive, negative, base, patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) }; } exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), /***/ 64002: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(3986); const provider_1 = __webpack_require__(29834); class ProviderAsync extends provider_1.default { constructor() { super(...arguments); this._reader = new stream_1.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = []; return new Promise((resolve, reject) => { const stream = this.api(root, task, options); stream.once('error', reject); stream.on('data', (entry) => entries.push(options.transform(entry))); stream.once('end', () => resolve(entries)); }); } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderAsync; /***/ }), /***/ 52744: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(73290); const partial_1 = __webpack_require__(1340); class DeepFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; } getFilter(basePath, positive, negative) { const matcher = this._getMatcher(positive); const negativeRe = this._getNegativePatternsRe(negative); return (entry) => this._filter(basePath, entry, matcher, negativeRe); } _getMatcher(patterns) { return new partial_1.default(patterns, this._settings, this._micromatchOptions); } _getNegativePatternsRe(patterns) { const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); } _filter(basePath, entry, matcher, negativeRe) { if (this._isSkippedByDeep(basePath, entry.path)) { return false; } if (this._isSkippedSymbolicLink(entry)) { return false; } const filepath = utils.path.removeLeadingDotSegment(entry.path); if (this._isSkippedByPositivePatterns(filepath, matcher)) { return false; } return this._isSkippedByNegativePatterns(filepath, negativeRe); } _isSkippedByDeep(basePath, entryPath) { /** * Avoid unnecessary depth calculations when it doesn't matter. */ if (this._settings.deep === Infinity) { return false; } return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; } _getEntryLevel(basePath, entryPath) { const entryPathDepth = entryPath.split('/').length; if (basePath === '') { return entryPathDepth; } const basePathDepth = basePath.split('/').length; return entryPathDepth - basePathDepth; } _isSkippedSymbolicLink(entry) { return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); } _isSkippedByPositivePatterns(entryPath, matcher) { return !this._settings.baseNameMatch && !matcher.match(entryPath); } _isSkippedByNegativePatterns(entryPath, patternsRe) { return !utils.pattern.matchAny(entryPath, patternsRe); } } exports.default = DeepFilter; /***/ }), /***/ 93579: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(73290); class EntryFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; this.index = new Map(); } getFilter(positive, negative) { const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); return (entry) => this._filter(entry, positiveRe, negativeRe); } _filter(entry, positiveRe, negativeRe) { if (this._settings.unique && this._isDuplicateEntry(entry)) { return false; } if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { return false; } if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { return false; } const filepath = this._settings.baseNameMatch ? entry.name : entry.path; const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); if (this._settings.unique && isMatched) { this._createIndexRecord(entry); } return isMatched; } _isDuplicateEntry(entry) { return this.index.has(entry.path); } _createIndexRecord(entry) { this.index.set(entry.path, undefined); } _onlyFileFilter(entry) { return this._settings.onlyFiles && !entry.dirent.isFile(); } _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { if (!this._settings.absolute) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); return utils.pattern.matchAny(fullpath, patternsRe); } _isMatchToPatterns(entryPath, patternsRe) { const filepath = utils.path.removeLeadingDotSegment(entryPath); return utils.pattern.matchAny(filepath, patternsRe); } } exports.default = EntryFilter; /***/ }), /***/ 8520: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(73290); class ErrorFilter { constructor(_settings) { this._settings = _settings; } getFilter() { return (error) => this._isNonFatalError(error); } _isNonFatalError(error) { return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; } } exports.default = ErrorFilter; /***/ }), /***/ 45177: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(73290); class Matcher { constructor(_patterns, _settings, _micromatchOptions) { this._patterns = _patterns; this._settings = _settings; this._micromatchOptions = _micromatchOptions; this._storage = []; this._fillStorage(); } _fillStorage() { /** * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). * So, before expand patterns with brace expansion into separated patterns. */ const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); for (const pattern of patterns) { const segments = this._getPatternSegments(pattern); const sections = this._splitSegmentsIntoSections(segments); this._storage.push({ complete: sections.length <= 1, pattern, segments, sections }); } } _getPatternSegments(pattern) { const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); return parts.map((part) => { const dynamic = utils.pattern.isDynamicPattern(part, this._settings); if (!dynamic) { return { dynamic: false, pattern: part }; } return { dynamic: true, pattern: part, patternRe: utils.pattern.makeRe(part, this._micromatchOptions) }; }); } _splitSegmentsIntoSections(segments) { return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); } } exports.default = Matcher; /***/ }), /***/ 1340: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const matcher_1 = __webpack_require__(45177); class PartialMatcher extends matcher_1.default { match(filepath) { const parts = filepath.split('/'); const levels = parts.length; const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); for (const pattern of patterns) { const section = pattern.sections[0]; /** * In this case, the pattern has a globstar and we must read all directories unconditionally, * but only if the level has reached the end of the first group. * * fixtures/{a,b}/** * ^ true/false ^ always true */ if (!pattern.complete && levels > section.length) { return true; } const match = parts.every((part, index) => { const segment = pattern.segments[index]; if (segment.dynamic && segment.patternRe.test(part)) { return true; } if (!segment.dynamic && segment.pattern === part) { return true; } return false; }); if (match) { return true; } } return false; } } exports.default = PartialMatcher; /***/ }), /***/ 29834: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const deep_1 = __webpack_require__(52744); const entry_1 = __webpack_require__(93579); const error_1 = __webpack_require__(8520); const entry_2 = __webpack_require__(54081); class Provider { constructor(_settings) { this._settings = _settings; this.errorFilter = new error_1.default(this._settings); this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { return path.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === '.' ? '' : task.base; return { basePath, pathSegmentSeparator: '/', concurrency: this._settings.concurrency, deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), entryFilter: this.entryFilter.getFilter(task.positive, task.negative), errorFilter: this.errorFilter.getFilter(), followSymbolicLinks: this._settings.followSymbolicLinks, fs: this._settings.fs, stats: this._settings.stats, throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, transform: this.entryTransformer.getTransformer() }; } _getMicromatchOptions() { return { dot: this._settings.dot, matchBase: this._settings.baseNameMatch, nobrace: !this._settings.braceExpansion, nocase: !this._settings.caseSensitiveMatch, noext: !this._settings.extglob, noglobstar: !this._settings.globstar, posix: true, strictSlashes: false }; } } exports.default = Provider; /***/ }), /***/ 3480: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(92413); const stream_2 = __webpack_require__(3986); const provider_1 = __webpack_require__(29834); class ProviderStream extends provider_1.default { constructor() { super(...arguments); this._reader = new stream_2.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const source = this.api(root, task, options); const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); source .once('error', (error) => destination.emit('error', error)) .on('data', (entry) => destination.emit('data', options.transform(entry))) .once('end', () => destination.emit('end')); destination .once('close', () => source.destroy()); return destination; } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderStream; /***/ }), /***/ 62512: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const sync_1 = __webpack_require__(94311); const provider_1 = __webpack_require__(29834); class ProviderSync extends provider_1.default { constructor() { super(...arguments); this._reader = new sync_1.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = this.api(root, task, options); return entries.map(options.transform); } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderSync; /***/ }), /***/ 54081: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(73290); class EntryTransformer { constructor(_settings) { this._settings = _settings; } getTransformer() { return (entry) => this._transform(entry); } _transform(entry) { let filepath = entry.path; if (this._settings.absolute) { filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); filepath = utils.path.unixify(filepath); } if (this._settings.markDirectories && entry.dirent.isDirectory()) { filepath += '/'; } if (!this._settings.objectMode) { return filepath; } return Object.assign(Object.assign({}, entry), { path: filepath }); } } exports.default = EntryTransformer; /***/ }), /***/ 35346: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const fsStat = __webpack_require__(66203); const utils = __webpack_require__(73290); class Reader { constructor(_settings) { this._settings = _settings; this._fsStatSettings = new fsStat.Settings({ followSymbolicLink: this._settings.followSymbolicLinks, fs: this._settings.fs, throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks }); } _getFullEntryPath(filepath) { return path.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { name: pattern, path: pattern, dirent: utils.fs.createDirentFromStats(pattern, stats) }; if (this._settings.stats) { entry.stats = stats; } return entry; } _isFatalError(error) { return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; } } exports.default = Reader; /***/ }), /***/ 3986: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(92413); const fsStat = __webpack_require__(66203); const fsWalk = __webpack_require__(45439); const reader_1 = __webpack_require__(35346); class ReaderStream extends reader_1.default { constructor() { super(...arguments); this._walkStream = fsWalk.walkStream; this._stat = fsStat.stat; } dynamic(root, options) { return this._walkStream(root, options); } static(patterns, options) { const filepaths = patterns.map(this._getFullEntryPath, this); const stream = new stream_1.PassThrough({ objectMode: true }); stream._write = (index, _enc, done) => { return this._getEntry(filepaths[index], patterns[index], options) .then((entry) => { if (entry !== null && options.entryFilter(entry)) { stream.push(entry); } if (index === filepaths.length - 1) { stream.end(); } done(); }) .catch(done); }; for (let i = 0; i < filepaths.length; i++) { stream.write(i); } return stream; } _getEntry(filepath, pattern, options) { return this._getStat(filepath) .then((stats) => this._makeEntry(stats, pattern)) .catch((error) => { if (options.errorFilter(error)) { return null; } throw error; }); } _getStat(filepath) { return new Promise((resolve, reject) => { this._stat(filepath, this._fsStatSettings, (error, stats) => { return error === null ? resolve(stats) : reject(error); }); }); } } exports.default = ReaderStream; /***/ }), /***/ 94311: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fsStat = __webpack_require__(66203); const fsWalk = __webpack_require__(45439); const reader_1 = __webpack_require__(35346); class ReaderSync extends reader_1.default { constructor() { super(...arguments); this._walkSync = fsWalk.walkSync; this._statSync = fsStat.statSync; } dynamic(root, options) { return this._walkSync(root, options); } static(patterns, options) { const entries = []; for (const pattern of patterns) { const filepath = this._getFullEntryPath(pattern); const entry = this._getEntry(filepath, pattern, options); if (entry === null || !options.entryFilter(entry)) { continue; } entries.push(entry); } return entries; } _getEntry(filepath, pattern, options) { try { const stats = this._getStat(filepath); return this._makeEntry(stats, pattern); } catch (error) { if (options.errorFilter(error)) { return null; } throw error; } } _getStat(filepath) { return this._statSync(filepath, this._fsStatSettings); } } exports.default = ReaderSync; /***/ }), /***/ 95879: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; const fs = __webpack_require__(35747); const os = __webpack_require__(12087); /** * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 */ const CPU_COUNT = Math.max(os.cpus().length, 1); exports.DEFAULT_FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, lstatSync: fs.lstatSync, stat: fs.stat, statSync: fs.statSync, readdir: fs.readdir, readdirSync: fs.readdirSync }; class Settings { constructor(_options = {}) { this._options = _options; this.absolute = this._getValue(this._options.absolute, false); this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); this.braceExpansion = this._getValue(this._options.braceExpansion, true); this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); this.cwd = this._getValue(this._options.cwd, process.cwd()); this.deep = this._getValue(this._options.deep, Infinity); this.dot = this._getValue(this._options.dot, false); this.extglob = this._getValue(this._options.extglob, true); this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); this.fs = this._getFileSystemMethods(this._options.fs); this.globstar = this._getValue(this._options.globstar, true); this.ignore = this._getValue(this._options.ignore, []); this.markDirectories = this._getValue(this._options.markDirectories, false); this.objectMode = this._getValue(this._options.objectMode, false); this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); this.onlyFiles = this._getValue(this._options.onlyFiles, true); this.stats = this._getValue(this._options.stats, false); this.suppressErrors = this._getValue(this._options.suppressErrors, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); this.unique = this._getValue(this._options.unique, true); if (this.onlyDirectories) { this.onlyFiles = false; } if (this.stats) { this.objectMode = true; } } _getValue(option, value) { return option === undefined ? value : option; } _getFileSystemMethods(methods = {}) { return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); } } exports.default = Settings; /***/ }), /***/ 86465: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.splitWhen = exports.flatten = void 0; function flatten(items) { return items.reduce((collection, item) => [].concat(collection, item), []); } exports.flatten = flatten; function splitWhen(items, predicate) { const result = [[]]; let groupIndex = 0; for (const item of items) { if (predicate(item)) { groupIndex++; result[groupIndex] = []; } else { result[groupIndex].push(item); } } return result; } exports.splitWhen = splitWhen; /***/ }), /***/ 66049: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isEnoentCodeError = void 0; function isEnoentCodeError(error) { return error.code === 'ENOENT'; } exports.isEnoentCodeError = isEnoentCodeError; /***/ }), /***/ 4906: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDirentFromStats = void 0; class DirentFromStats { constructor(name, stats) { this.name = name; this.isBlockDevice = stats.isBlockDevice.bind(stats); this.isCharacterDevice = stats.isCharacterDevice.bind(stats); this.isDirectory = stats.isDirectory.bind(stats); this.isFIFO = stats.isFIFO.bind(stats); this.isFile = stats.isFile.bind(stats); this.isSocket = stats.isSocket.bind(stats); this.isSymbolicLink = stats.isSymbolicLink.bind(stats); } } function createDirentFromStats(name, stats) { return new DirentFromStats(name, stats); } exports.createDirentFromStats = createDirentFromStats; /***/ }), /***/ 73290: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; const array = __webpack_require__(86465); exports.array = array; const errno = __webpack_require__(66049); exports.errno = errno; const fs = __webpack_require__(4906); exports.fs = fs; const path = __webpack_require__(55830); exports.path = path; const pattern = __webpack_require__(10038); exports.pattern = pattern; const stream = __webpack_require__(61726); exports.stream = stream; const string = __webpack_require__(63757); exports.string = string; /***/ }), /***/ 55830: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; const path = __webpack_require__(85622); const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; /** * Designed to work only with simple paths: `dir\\file`. */ function unixify(filepath) { return filepath.replace(/\\/g, '/'); } exports.unixify = unixify; function makeAbsolute(cwd, filepath) { return path.resolve(cwd, filepath); } exports.makeAbsolute = makeAbsolute; function escape(pattern) { return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); } exports.escape = escape; function removeLeadingDotSegment(entry) { // We do not use `startsWith` because this is 10x slower than current implementation for some cases. // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with if (entry.charAt(0) === '.') { const secondCharactery = entry.charAt(1); if (secondCharactery === '/' || secondCharactery === '\\') { return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); } } return entry; } exports.removeLeadingDotSegment = removeLeadingDotSegment; /***/ }), /***/ 10038: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; const path = __webpack_require__(85622); const globParent = __webpack_require__(29807); const micromatch = __webpack_require__(70850); const picomatch = __webpack_require__(59444); const GLOBSTAR = '**'; const ESCAPE_SYMBOL = '\\'; const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; function isStaticPattern(pattern, options = {}) { return !isDynamicPattern(pattern, options); } exports.isStaticPattern = isStaticPattern; function isDynamicPattern(pattern, options = {}) { /** * A special case with an empty string is necessary for matching patterns that start with a forward slash. * An empty string cannot be a dynamic pattern. * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. */ if (pattern === '') { return false; } /** * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check * filepath directly (without read directory). */ if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { return true; } if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { return true; } if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { return true; } if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { return true; } return false; } exports.isDynamicPattern = isDynamicPattern; function convertToPositivePattern(pattern) { return isNegativePattern(pattern) ? pattern.slice(1) : pattern; } exports.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return '!' + pattern; } exports.convertToNegativePattern = convertToNegativePattern; function isNegativePattern(pattern) { return pattern.startsWith('!') && pattern[1] !== '('; } exports.isNegativePattern = isNegativePattern; function isPositivePattern(pattern) { return !isNegativePattern(pattern); } exports.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { return patterns.filter(isNegativePattern); } exports.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { return patterns.filter(isPositivePattern); } exports.getPositivePatterns = getPositivePatterns; function getBaseDirectory(pattern) { return globParent(pattern, { flipBackslashes: false }); } exports.getBaseDirectory = getBaseDirectory; function hasGlobStar(pattern) { return pattern.includes(GLOBSTAR); } exports.hasGlobStar = hasGlobStar; function endsWithSlashGlobStar(pattern) { return pattern.endsWith('/' + GLOBSTAR); } exports.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { const basename = path.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; function expandPatternsWithBraceExpansion(patterns) { return patterns.reduce((collection, pattern) => { return collection.concat(expandBraceExpansion(pattern)); }, []); } exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; function expandBraceExpansion(pattern) { return micromatch.braces(pattern, { expand: true, nodupes: true }); } exports.expandBraceExpansion = expandBraceExpansion; function getPatternParts(pattern, options) { let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); /** * The scan method returns an empty array in some cases. * See micromatch/picomatch#58 for more details. */ if (parts.length === 0) { parts = [pattern]; } /** * The scan method does not return an empty part for the pattern with a forward slash. * This is another part of micromatch/picomatch#58. */ if (parts[0].startsWith('/')) { parts[0] = parts[0].slice(1); parts.unshift(''); } return parts; } exports.getPatternParts = getPatternParts; function makeRe(pattern, options) { return micromatch.makeRe(pattern, options); } exports.makeRe = makeRe; function convertPatternsToRe(patterns, options) { return patterns.map((pattern) => makeRe(pattern, options)); } exports.convertPatternsToRe = convertPatternsToRe; function matchAny(entry, patternsRe) { return patternsRe.some((patternRe) => patternRe.test(entry)); } exports.matchAny = matchAny; /***/ }), /***/ 61726: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.merge = void 0; const merge2 = __webpack_require__(60155); function merge(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { stream.once('error', (error) => mergedStream.emit('error', error)); }); mergedStream.once('close', () => propagateCloseEventToSources(streams)); mergedStream.once('end', () => propagateCloseEventToSources(streams)); return mergedStream; } exports.merge = merge; function propagateCloseEventToSources(streams) { streams.forEach((stream) => stream.emit('close')); } /***/ }), /***/ 63757: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isEmpty = exports.isString = void 0; function isString(input) { return typeof input === 'string'; } exports.isString = isString; function isEmpty(input) { return input === ''; } exports.isEmpty = isEmpty; /***/ }), /***/ 10635: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const assert = __webpack_require__(42357); const GEMFILE_DEFAULT_LOCATION = path.resolve(process.cwd(), 'Gemfile.lock'); const WHITESPACE = /^(\s*)/; const GEMFILE_KEY_VALUE = /^\s*([^:(]*)\s*\:*\s*(.*)/; const ORIGINS = ['GEM', 'GIT', 'PATH']; const RUBY = /^ruby\s(.*)/; module.exports = { interpret, parse, parseSync }; function interpret(string, extractMeta) { assert( typeof string === 'string', 'gemfile.interpret expects a UTF-8 Gemfile.lock string source.' ); const gemfileMeta = {}; let line; let index = 0; let previousWhitespace = -1; let keyCount = {}; let gemfile = {}; let lines = string.split('\n'); let stack = []; while((line = lines[index++]) !== undefined) { // Handle depth stack changes let whitespace = WHITESPACE.exec(line)[1].length; if (whitespace <= previousWhitespace) { let stackIndex = stack.length - 1; while(stack[stackIndex] && (whitespace <= stack[stackIndex].depth)) { stack.pop(); stackIndex--; } } // Make note of line's whitespace depth previousWhitespace = whitespace; // Handle new key/value leaf let parts = GEMFILE_KEY_VALUE.exec(line); let key = parts[1].trim(); let value = parts[2] || ''; if (key) { // Handle path traversal let level = gemfile; for (let stackIndex = 0; stackIndex < stack.length; stackIndex++) { if (level[stack[stackIndex].key]) { level = level[stack[stackIndex].key]; } } // Handle data type inference let data = {}; if (value.indexOf('/') > -1) { data.path = value; } else if (value.indexOf('(') > -1) { if (value[value.length - 1] === '!') { value = value.substring(0, value.length - 1); data.outsourced = true; } if (value[1] !== ')') { data.version = value.substring(1, value.length - 1); } } else if (/\b[0-9a-f]{7,40}\b/.test(value)) { data.sha = value; } // Set key at current level // Do not throw away additional top-level key entries // e.g. multiple GIT/GEM blocks if (level[key]) { if (keyCount[key] === undefined) { keyCount[key] = 0; } else { keyCount[key]++; } level[key + keyCount[key]] = level[key]; } level[key] = data; // Push key on stack stack.push({key, depth: whitespace}); } } let keys = Object.keys(gemfile); let hasGemKey = keys.indexOf('GEM') > -1; let hasDependenciesKey = keys.indexOf('DEPENDENCIES') > -1; let hasPlatformsKey = keys.indexOf('PLATFORMS') > -1; if (!hasGemKey || !hasDependenciesKey || !hasPlatformsKey) { console.warn([ 'Are you sure this a Gemfile.lock?', 'If it is, please file an issue on Github: https://github.com/treycordova/gemfile/issues.', 'Regardless, gemfile parsed whatever you gave it.' ].join('\n')); } if (gemfile['BUNDLED WITH']) { gemfile['BUNDLED WITH'] = Object.keys(gemfile['BUNDLED WITH'])[0]; } if (gemfile['RUBY VERSION']) { const rawVersion= Object.keys(gemfile['RUBY VERSION'])[0]; const version = RUBY.exec(rawVersion)[1]; gemfile['RUBY VERSION'] = version; } if (extractMeta) { gemfileMeta.bundledWith = gemfile['BUNDLED WITH']; gemfileMeta.rubyVersion = gemfile['RUBY VERSION']; gemfileMeta.platforms = gemfile['PLATFORMS']; gemfileMeta.dependencies = gemfile['DEPENDENCIES']; gemfileMeta.specs = Object.keys(gemfile) .filter(key => ORIGINS.some(origin => key.startsWith(origin))) .reduce((specs, key) => { const type = key.match(/[A-Z]+/)[0]; const meta = Object.assign({ type }, gemfile[key]); delete meta.specs; Object.assign(specs, Object.keys(gemfile[key].specs).reduce((specs, gem) => { specs[gem] = Object.assign({}, gemfile[key].specs[gem], meta); return specs; }, {})); return specs; }, {}); return gemfileMeta; } return gemfile; } function parse(path, extractMeta) { path = typeof path === 'string' ? path : GEMFILE_DEFAULT_LOCATION; return new Promise(function(resolve, reject) { let file = fs.readFile(path, {encoding: 'utf8'}, function(error, gemfile) { if (error) { return reject(`Couldn't find a Gemfile at the specified location: ${path}.`); } else { return resolve(interpret(gemfile, extractMeta)); } }); }); } function parseSync(path, extractMeta) { path = typeof path === 'string' ? path : GEMFILE_DEFAULT_LOCATION; return interpret(fs.readFileSync(path, 'utf8'), extractMeta); } /***/ }), /***/ 29807: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isGlob = __webpack_require__(46830); var pathPosixDirname = __webpack_require__(85622).posix.dirname; var isWin32 = __webpack_require__(12087).platform() === 'win32'; var slash = '/'; var backslash = /\\/g; var enclosure = /[\{\[].*\/.*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; /** * @param {string} str * @param {Object} opts * @param {boolean} [opts.flipBackslashes=true] * @returns {string} */ module.exports = function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); // flip windows path separators if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { str = str.replace(backslash, slash); } // special case for strings ending in enclosure containing path separator if (enclosure.test(str)) { str += slash; } // preserves full path in case of trailing path separator str += 'a'; // remove path parts that are globby do { str = pathPosixDirname(str); } while (isGlob(str) || globby.test(str)); // remove escape chars and return result return str.replace(escaped, '$1'); }; /***/ }), /***/ 39322: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * Copyright (c) 2014, Chris Pettitt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. 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. * * 3. Neither the name of the copyright holder 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 HOLDER 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. */ var lib = __webpack_require__(19943); module.exports = { Graph: lib.Graph, json: __webpack_require__(40584), alg: __webpack_require__(67550), version: lib.version }; /***/ }), /***/ 94686: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = components; function components(g) { var visited = {}; var cmpts = []; var cmpt; function dfs(v) { if (_.has(visited, v)) return; visited[v] = true; cmpt.push(v); _.each(g.successors(v), dfs); _.each(g.predecessors(v), dfs); } _.each(g.nodes(), function(v) { cmpt = []; dfs(v); if (cmpt.length) { cmpts.push(cmpt); } }); return cmpts; } /***/ }), /***/ 1647: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = dfs; /* * A helper that preforms a pre- or post-order traversal on the input graph * and returns the nodes in the order they were visited. If the graph is * undirected then this algorithm will navigate using neighbors. If the graph * is directed then this algorithm will navigate using successors. * * Order must be one of "pre" or "post". */ function dfs(g, vs, order) { if (!_.isArray(vs)) { vs = [vs]; } var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); var acc = []; var visited = {}; _.each(vs, function(v) { if (!g.hasNode(v)) { throw new Error("Graph does not have node: " + v); } doDfs(g, v, order === "post", visited, navigation, acc); }); return acc; } function doDfs(g, v, postorder, visited, navigation, acc) { if (!_.has(visited, v)) { visited[v] = true; if (!postorder) { acc.push(v); } _.each(navigation(v), function(w) { doDfs(g, w, postorder, visited, navigation, acc); }); if (postorder) { acc.push(v); } } } /***/ }), /***/ 16342: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var dijkstra = __webpack_require__(70785); var _ = __webpack_require__(8570); module.exports = dijkstraAll; function dijkstraAll(g, weightFunc, edgeFunc) { return _.transform(g.nodes(), function(acc, v) { acc[v] = dijkstra(g, v, weightFunc, edgeFunc); }, {}); } /***/ }), /***/ 70785: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); var PriorityQueue = __webpack_require__(85474); module.exports = dijkstra; var DEFAULT_WEIGHT_FUNC = _.constant(1); function dijkstra(g, source, weightFn, edgeFn) { return runDijkstra(g, String(source), weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function(v) { return g.outEdges(v); }); } function runDijkstra(g, source, weightFn, edgeFn) { var results = {}; var pq = new PriorityQueue(); var v, vEntry; var updateNeighbors = function(edge) { var w = edge.v !== v ? edge.v : edge.w; var wEntry = results[w]; var weight = weightFn(edge); var distance = vEntry.distance + weight; if (weight < 0) { throw new Error("dijkstra does not allow negative edge weights. " + "Bad edge: " + edge + " Weight: " + weight); } if (distance < wEntry.distance) { wEntry.distance = distance; wEntry.predecessor = v; pq.decrease(w, distance); } }; g.nodes().forEach(function(v) { var distance = v === source ? 0 : Number.POSITIVE_INFINITY; results[v] = { distance: distance }; pq.add(v, distance); }); while (pq.size() > 0) { v = pq.removeMin(); vEntry = results[v]; if (vEntry.distance === Number.POSITIVE_INFINITY) { break; } edgeFn(v).forEach(updateNeighbors); } return results; } /***/ }), /***/ 81046: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); var tarjan = __webpack_require__(61511); module.exports = findCycles; function findCycles(g) { return _.filter(tarjan(g), function(cmpt) { return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); }); } /***/ }), /***/ 71786: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = floydWarshall; var DEFAULT_WEIGHT_FUNC = _.constant(1); function floydWarshall(g, weightFn, edgeFn) { return runFloydWarshall(g, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function(v) { return g.outEdges(v); }); } function runFloydWarshall(g, weightFn, edgeFn) { var results = {}; var nodes = g.nodes(); nodes.forEach(function(v) { results[v] = {}; results[v][v] = { distance: 0 }; nodes.forEach(function(w) { if (v !== w) { results[v][w] = { distance: Number.POSITIVE_INFINITY }; } }); edgeFn(v).forEach(function(edge) { var w = edge.v === v ? edge.w : edge.v; var d = weightFn(edge); results[v][w] = { distance: d, predecessor: v }; }); }); nodes.forEach(function(k) { var rowK = results[k]; nodes.forEach(function(i) { var rowI = results[i]; nodes.forEach(function(j) { var ik = rowI[k]; var kj = rowK[j]; var ij = rowI[j]; var altDistance = ik.distance + kj.distance; if (altDistance < ij.distance) { ij.distance = altDistance; ij.predecessor = kj.predecessor; } }); }); }); return results; } /***/ }), /***/ 67550: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { components: __webpack_require__(94686), dijkstra: __webpack_require__(70785), dijkstraAll: __webpack_require__(16342), findCycles: __webpack_require__(81046), floydWarshall: __webpack_require__(71786), isAcyclic: __webpack_require__(57200), postorder: __webpack_require__(26877), preorder: __webpack_require__(80573), prim: __webpack_require__(8472), tarjan: __webpack_require__(61511), topsort: __webpack_require__(95626) }; /***/ }), /***/ 57200: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var topsort = __webpack_require__(95626); module.exports = isAcyclic; function isAcyclic(g) { try { topsort(g); } catch (e) { if (e instanceof topsort.CycleException) { return false; } throw e; } return true; } /***/ }), /***/ 26877: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var dfs = __webpack_require__(1647); module.exports = postorder; function postorder(g, vs) { return dfs(g, vs, "post"); } /***/ }), /***/ 80573: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var dfs = __webpack_require__(1647); module.exports = preorder; function preorder(g, vs) { return dfs(g, vs, "pre"); } /***/ }), /***/ 8472: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); var Graph = __webpack_require__(6583); var PriorityQueue = __webpack_require__(85474); module.exports = prim; function prim(g, weightFunc) { var result = new Graph(); var parents = {}; var pq = new PriorityQueue(); var v; function updateNeighbors(edge) { var w = edge.v === v ? edge.w : edge.v; var pri = pq.priority(w); if (pri !== undefined) { var edgeWeight = weightFunc(edge); if (edgeWeight < pri) { parents[w] = v; pq.decrease(w, edgeWeight); } } } if (g.nodeCount() === 0) { return result; } _.each(g.nodes(), function(v) { pq.add(v, Number.POSITIVE_INFINITY); result.setNode(v); }); // Start from an arbitrary node pq.decrease(g.nodes()[0], 0); var init = false; while (pq.size() > 0) { v = pq.removeMin(); if (_.has(parents, v)) { result.setEdge(v, parents[v]); } else if (init) { throw new Error("Input graph is not connected: " + g); } else { init = true; } g.nodeEdges(v).forEach(updateNeighbors); } return result; } /***/ }), /***/ 61511: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = tarjan; function tarjan(g) { var index = 0; var stack = []; var visited = {}; // node id -> { onStack, lowlink, index } var results = []; function dfs(v) { var entry = visited[v] = { onStack: true, lowlink: index, index: index++ }; stack.push(v); g.successors(v).forEach(function(w) { if (!_.has(visited, w)) { dfs(w); entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); } else if (visited[w].onStack) { entry.lowlink = Math.min(entry.lowlink, visited[w].index); } }); if (entry.lowlink === entry.index) { var cmpt = []; var w; do { w = stack.pop(); visited[w].onStack = false; cmpt.push(w); } while (v !== w); results.push(cmpt); } } g.nodes().forEach(function(v) { if (!_.has(visited, v)) { dfs(v); } }); return results; } /***/ }), /***/ 95626: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = topsort; topsort.CycleException = CycleException; function topsort(g) { var visited = {}; var stack = {}; var results = []; function visit(node) { if (_.has(stack, node)) { throw new CycleException(); } if (!_.has(visited, node)) { stack[node] = true; visited[node] = true; _.each(g.predecessors(node), visit); delete stack[node]; results.push(node); } } _.each(g.sinks(), visit); if (_.size(visited) !== g.nodeCount()) { throw new CycleException(); } return results; } function CycleException() {} CycleException.prototype = new Error(); // must be an instance of Error to pass testing /***/ }), /***/ 85474: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); module.exports = PriorityQueue; /** * A min-priority queue data structure. This algorithm is derived from Cormen, * et al., "Introduction to Algorithms". The basic idea of a min-priority * queue is that you can efficiently (in O(1) time) get the smallest key in * the queue. Adding and removing elements takes O(log n) time. A key can * have its priority decreased in O(log n) time. */ function PriorityQueue() { this._arr = []; this._keyIndices = {}; } /** * Returns the number of elements in the queue. Takes `O(1)` time. */ PriorityQueue.prototype.size = function() { return this._arr.length; }; /** * Returns the keys that are in the queue. Takes `O(n)` time. */ PriorityQueue.prototype.keys = function() { return this._arr.map(function(x) { return x.key; }); }; /** * Returns `true` if **key** is in the queue and `false` if not. */ PriorityQueue.prototype.has = function(key) { return _.has(this._keyIndices, key); }; /** * Returns the priority for **key**. If **key** is not present in the queue * then this function returns `undefined`. Takes `O(1)` time. * * @param {Object} key */ PriorityQueue.prototype.priority = function(key) { var index = this._keyIndices[key]; if (index !== undefined) { return this._arr[index].priority; } }; /** * Returns the key for the minimum element in this queue. If the queue is * empty this function throws an Error. Takes `O(1)` time. */ PriorityQueue.prototype.min = function() { if (this.size() === 0) { throw new Error("Queue underflow"); } return this._arr[0].key; }; /** * Inserts a new key into the priority queue. If the key already exists in * the queue this function returns `false`; otherwise it will return `true`. * Takes `O(n)` time. * * @param {Object} key the key to add * @param {Number} priority the initial priority for the key */ PriorityQueue.prototype.add = function(key, priority) { var keyIndices = this._keyIndices; key = String(key); if (!_.has(keyIndices, key)) { var arr = this._arr; var index = arr.length; keyIndices[key] = index; arr.push({key: key, priority: priority}); this._decrease(index); return true; } return false; }; /** * Removes and returns the smallest key in the queue. Takes `O(log n)` time. */ PriorityQueue.prototype.removeMin = function() { this._swap(0, this._arr.length - 1); var min = this._arr.pop(); delete this._keyIndices[min.key]; this._heapify(0); return min.key; }; /** * Decreases the priority for **key** to **priority**. If the new priority is * greater than the previous priority, this function will throw an Error. * * @param {Object} key the key for which to raise priority * @param {Number} priority the new priority for the key */ PriorityQueue.prototype.decrease = function(key, priority) { var index = this._keyIndices[key]; if (priority > this._arr[index].priority) { throw new Error("New priority is greater than current priority. " + "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); } this._arr[index].priority = priority; this._decrease(index); }; PriorityQueue.prototype._heapify = function(i) { var arr = this._arr; var l = 2 * i; var r = l + 1; var largest = i; if (l < arr.length) { largest = arr[l].priority < arr[largest].priority ? l : largest; if (r < arr.length) { largest = arr[r].priority < arr[largest].priority ? r : largest; } if (largest !== i) { this._swap(i, largest); this._heapify(largest); } } }; PriorityQueue.prototype._decrease = function(index) { var arr = this._arr; var priority = arr[index].priority; var parent; while (index !== 0) { parent = index >> 1; if (arr[parent].priority < priority) { break; } this._swap(index, parent); index = parent; } }; PriorityQueue.prototype._swap = function(i, j) { var arr = this._arr; var keyIndices = this._keyIndices; var origArrI = arr[i]; var origArrJ = arr[j]; arr[i] = origArrJ; arr[j] = origArrI; keyIndices[origArrJ.key] = i; keyIndices[origArrI.key] = j; }; /***/ }), /***/ 6583: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var _ = __webpack_require__(8570); module.exports = Graph; var DEFAULT_EDGE_NAME = "\x00"; var GRAPH_NODE = "\x00"; var EDGE_KEY_DELIM = "\x01"; // Implementation notes: // // * Node id query functions should return string ids for the nodes // * Edge id query functions should return an "edgeObj", edge object, that is // composed of enough information to uniquely identify an edge: {v, w, name}. // * Internally we use an "edgeId", a stringified form of the edgeObj, to // reference edges. This is because we need a performant way to look these // edges up and, object properties, which have string keys, are the closest // we're going to get to a performant hashtable in JavaScript. function Graph(opts) { this._isDirected = _.has(opts, "directed") ? opts.directed : true; this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; this._isCompound = _.has(opts, "compound") ? opts.compound : false; // Label for the graph itself this._label = undefined; // Defaults to be set when creating a new node this._defaultNodeLabelFn = _.constant(undefined); // Defaults to be set when creating a new edge this._defaultEdgeLabelFn = _.constant(undefined); // v -> label this._nodes = {}; if (this._isCompound) { // v -> parent this._parent = {}; // v -> children this._children = {}; this._children[GRAPH_NODE] = {}; } // v -> edgeObj this._in = {}; // u -> v -> Number this._preds = {}; // v -> edgeObj this._out = {}; // v -> w -> Number this._sucs = {}; // e -> edgeObj this._edgeObjs = {}; // e -> label this._edgeLabels = {}; } /* Number of nodes in the graph. Should only be changed by the implementation. */ Graph.prototype._nodeCount = 0; /* Number of edges in the graph. Should only be changed by the implementation. */ Graph.prototype._edgeCount = 0; /* === Graph functions ========= */ Graph.prototype.isDirected = function() { return this._isDirected; }; Graph.prototype.isMultigraph = function() { return this._isMultigraph; }; Graph.prototype.isCompound = function() { return this._isCompound; }; Graph.prototype.setGraph = function(label) { this._label = label; return this; }; Graph.prototype.graph = function() { return this._label; }; /* === Node functions ========== */ Graph.prototype.setDefaultNodeLabel = function(newDefault) { if (!_.isFunction(newDefault)) { newDefault = _.constant(newDefault); } this._defaultNodeLabelFn = newDefault; return this; }; Graph.prototype.nodeCount = function() { return this._nodeCount; }; Graph.prototype.nodes = function() { return _.keys(this._nodes); }; Graph.prototype.sources = function() { var self = this; return _.filter(this.nodes(), function(v) { return _.isEmpty(self._in[v]); }); }; Graph.prototype.sinks = function() { var self = this; return _.filter(this.nodes(), function(v) { return _.isEmpty(self._out[v]); }); }; Graph.prototype.setNodes = function(vs, value) { var args = arguments; var self = this; _.each(vs, function(v) { if (args.length > 1) { self.setNode(v, value); } else { self.setNode(v); } }); return this; }; Graph.prototype.setNode = function(v, value) { if (_.has(this._nodes, v)) { if (arguments.length > 1) { this._nodes[v] = value; } return this; } this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); if (this._isCompound) { this._parent[v] = GRAPH_NODE; this._children[v] = {}; this._children[GRAPH_NODE][v] = true; } this._in[v] = {}; this._preds[v] = {}; this._out[v] = {}; this._sucs[v] = {}; ++this._nodeCount; return this; }; Graph.prototype.node = function(v) { return this._nodes[v]; }; Graph.prototype.hasNode = function(v) { return _.has(this._nodes, v); }; Graph.prototype.removeNode = function(v) { var self = this; if (_.has(this._nodes, v)) { var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; delete this._nodes[v]; if (this._isCompound) { this._removeFromParentsChildList(v); delete this._parent[v]; _.each(this.children(v), function(child) { self.setParent(child); }); delete this._children[v]; } _.each(_.keys(this._in[v]), removeEdge); delete this._in[v]; delete this._preds[v]; _.each(_.keys(this._out[v]), removeEdge); delete this._out[v]; delete this._sucs[v]; --this._nodeCount; } return this; }; Graph.prototype.setParent = function(v, parent) { if (!this._isCompound) { throw new Error("Cannot set parent in a non-compound graph"); } if (_.isUndefined(parent)) { parent = GRAPH_NODE; } else { // Coerce parent to string parent += ""; for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) { if (ancestor === v) { throw new Error("Setting " + parent+ " as parent of " + v + " would create a cycle"); } } this.setNode(parent); } this.setNode(v); this._removeFromParentsChildList(v); this._parent[v] = parent; this._children[parent][v] = true; return this; }; Graph.prototype._removeFromParentsChildList = function(v) { delete this._children[this._parent[v]][v]; }; Graph.prototype.parent = function(v) { if (this._isCompound) { var parent = this._parent[v]; if (parent !== GRAPH_NODE) { return parent; } } }; Graph.prototype.children = function(v) { if (_.isUndefined(v)) { v = GRAPH_NODE; } if (this._isCompound) { var children = this._children[v]; if (children) { return _.keys(children); } } else if (v === GRAPH_NODE) { return this.nodes(); } else if (this.hasNode(v)) { return []; } }; Graph.prototype.predecessors = function(v) { var predsV = this._preds[v]; if (predsV) { return _.keys(predsV); } }; Graph.prototype.successors = function(v) { var sucsV = this._sucs[v]; if (sucsV) { return _.keys(sucsV); } }; Graph.prototype.neighbors = function(v) { var preds = this.predecessors(v); if (preds) { return _.union(preds, this.successors(v)); } }; Graph.prototype.isLeaf = function (v) { var neighbors; if (this.isDirected()) { neighbors = this.successors(v); } else { neighbors = this.neighbors(v); } return neighbors.length === 0; }; Graph.prototype.filterNodes = function(filter) { var copy = new this.constructor({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound }); copy.setGraph(this.graph()); var self = this; _.each(this._nodes, function(value, v) { if (filter(v)) { copy.setNode(v, value); } }); _.each(this._edgeObjs, function(e) { if (copy.hasNode(e.v) && copy.hasNode(e.w)) { copy.setEdge(e, self.edge(e)); } }); var parents = {}; function findParent(v) { var parent = self.parent(v); if (parent === undefined || copy.hasNode(parent)) { parents[v] = parent; return parent; } else if (parent in parents) { return parents[parent]; } else { return findParent(parent); } } if (this._isCompound) { _.each(copy.nodes(), function(v) { copy.setParent(v, findParent(v)); }); } return copy; }; /* === Edge functions ========== */ Graph.prototype.setDefaultEdgeLabel = function(newDefault) { if (!_.isFunction(newDefault)) { newDefault = _.constant(newDefault); } this._defaultEdgeLabelFn = newDefault; return this; }; Graph.prototype.edgeCount = function() { return this._edgeCount; }; Graph.prototype.edges = function() { return _.values(this._edgeObjs); }; Graph.prototype.setPath = function(vs, value) { var self = this; var args = arguments; _.reduce(vs, function(v, w) { if (args.length > 1) { self.setEdge(v, w, value); } else { self.setEdge(v, w); } return w; }); return this; }; /* * setEdge(v, w, [value, [name]]) * setEdge({ v, w, [name] }, [value]) */ Graph.prototype.setEdge = function() { var v, w, name, value; var valueSpecified = false; var arg0 = arguments[0]; if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { v = arg0.v; w = arg0.w; name = arg0.name; if (arguments.length === 2) { value = arguments[1]; valueSpecified = true; } } else { v = arg0; w = arguments[1]; name = arguments[3]; if (arguments.length > 2) { value = arguments[2]; valueSpecified = true; } } v = "" + v; w = "" + w; if (!_.isUndefined(name)) { name = "" + name; } var e = edgeArgsToId(this._isDirected, v, w, name); if (_.has(this._edgeLabels, e)) { if (valueSpecified) { this._edgeLabels[e] = value; } return this; } if (!_.isUndefined(name) && !this._isMultigraph) { throw new Error("Cannot set a named edge when isMultigraph = false"); } // It didn't exist, so we need to create it. // First ensure the nodes exist. this.setNode(v); this.setNode(w); this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); // Ensure we add undirected edges in a consistent way. v = edgeObj.v; w = edgeObj.w; Object.freeze(edgeObj); this._edgeObjs[e] = edgeObj; incrementOrInitEntry(this._preds[w], v); incrementOrInitEntry(this._sucs[v], w); this._in[w][e] = edgeObj; this._out[v][e] = edgeObj; this._edgeCount++; return this; }; Graph.prototype.edge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); return this._edgeLabels[e]; }; Graph.prototype.hasEdge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); return _.has(this._edgeLabels, e); }; Graph.prototype.removeEdge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); var edge = this._edgeObjs[e]; if (edge) { v = edge.v; w = edge.w; delete this._edgeLabels[e]; delete this._edgeObjs[e]; decrementOrRemoveEntry(this._preds[w], v); decrementOrRemoveEntry(this._sucs[v], w); delete this._in[w][e]; delete this._out[v][e]; this._edgeCount--; } return this; }; Graph.prototype.inEdges = function(v, u) { var inV = this._in[v]; if (inV) { var edges = _.values(inV); if (!u) { return edges; } return _.filter(edges, function(edge) { return edge.v === u; }); } }; Graph.prototype.outEdges = function(v, w) { var outV = this._out[v]; if (outV) { var edges = _.values(outV); if (!w) { return edges; } return _.filter(edges, function(edge) { return edge.w === w; }); } }; Graph.prototype.nodeEdges = function(v, w) { var inEdges = this.inEdges(v, w); if (inEdges) { return inEdges.concat(this.outEdges(v, w)); } }; function incrementOrInitEntry(map, k) { if (map[k]) { map[k]++; } else { map[k] = 1; } } function decrementOrRemoveEntry(map, k) { if (!--map[k]) { delete map[k]; } } function edgeArgsToId(isDirected, v_, w_, name) { var v = "" + v_; var w = "" + w_; if (!isDirected && v > w) { var tmp = v; v = w; w = tmp; } return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); } function edgeArgsToObj(isDirected, v_, w_, name) { var v = "" + v_; var w = "" + w_; if (!isDirected && v > w) { var tmp = v; v = w; w = tmp; } var edgeObj = { v: v, w: w }; if (name) { edgeObj.name = name; } return edgeObj; } function edgeObjToId(isDirected, edgeObj) { return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); } /***/ }), /***/ 19943: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Includes only the "core" of graphlib module.exports = { Graph: __webpack_require__(6583), version: __webpack_require__(79554) }; /***/ }), /***/ 40584: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _ = __webpack_require__(8570); var Graph = __webpack_require__(6583); module.exports = { write: write, read: read }; function write(g) { var json = { options: { directed: g.isDirected(), multigraph: g.isMultigraph(), compound: g.isCompound() }, nodes: writeNodes(g), edges: writeEdges(g) }; if (!_.isUndefined(g.graph())) { json.value = _.clone(g.graph()); } return json; } function writeNodes(g) { return _.map(g.nodes(), function(v) { var nodeValue = g.node(v); var parent = g.parent(v); var node = { v: v }; if (!_.isUndefined(nodeValue)) { node.value = nodeValue; } if (!_.isUndefined(parent)) { node.parent = parent; } return node; }); } function writeEdges(g) { return _.map(g.edges(), function(e) { var edgeValue = g.edge(e); var edge = { v: e.v, w: e.w }; if (!_.isUndefined(e.name)) { edge.name = e.name; } if (!_.isUndefined(edgeValue)) { edge.value = edgeValue; } return edge; }); } function read(json) { var g = new Graph(json.options).setGraph(json.value); _.each(json.nodes, function(entry) { g.setNode(entry.v, entry.value); if (entry.parent) { g.setParent(entry.v, entry.parent); } }); _.each(json.edges, function(entry) { g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); }); return g; } /***/ }), /***/ 8570: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // eslint-disable-next-line no-redeclare /* global window */ var lodash; if (true) { try { lodash = { clone: __webpack_require__(33543), constant: __webpack_require__(4254), each: __webpack_require__(43590), filter: __webpack_require__(4474), has: __webpack_require__(38394), isArray: Array.isArray, isEmpty: __webpack_require__(99245), isFunction: __webpack_require__(98423), isUndefined: __webpack_require__(28801), keys: __webpack_require__(44799), map: __webpack_require__(80820), reduce: __webpack_require__(34766), size: __webpack_require__(27946), transform: __webpack_require__(10684), union: __webpack_require__(96744), values: __webpack_require__(17720) }; } catch (e) { // continue regardless of error } } if (!lodash) { lodash = window._; } module.exports = lodash; /***/ }), /***/ 79554: /***/ ((module) => { module.exports = '2.1.9-patch.3'; /***/ }), /***/ 65619: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildCallGraph = void 0; const graphlib_1 = __webpack_require__(39322); const class_parsing_1 = __webpack_require__(64417); function getNodeLabel(functionCall, classPerJarMapping) { // com.ibm.wala.FakeRootClass:fakeRootMethod const [className, functionName] = functionCall.split(':'); const jarName = classPerJarMapping[className]; return { className, functionName, jarName, }; } function buildCallGraph(input, classPerJarMapping) { const graph = new graphlib_1.Graph(); for (const line of input.trim().split('\n')) { const [caller, callee] = line .trim() .split(' -> ') .map(class_parsing_1.removeParams) .map(class_parsing_1.toFQclassName); graph.setNode(caller, getNodeLabel(caller, classPerJarMapping)); graph.setNode(callee, getNodeLabel(callee, classPerJarMapping)); graph.setEdge(caller, callee); } return graph; } exports.buildCallGraph = buildCallGraph; //# sourceMappingURL=call-graph.js.map /***/ }), /***/ 64417: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toFQclassName = exports.removeParams = void 0; function removeParams(functionCall) { // com/ibm/wala/FakeRootClass.fakeRootMethod:()V return functionCall.split(':')[0]; } exports.removeParams = removeParams; function toFQclassName(functionCall) { // com/ibm/wala/FakeRootClass.fakeRootMethod -> com.ibm.wala.FakeRootClass:fakeRootMethod return functionCall.replace('.', ':').replace(/\//g, '.'); } exports.toFQclassName = toFQclassName; //# sourceMappingURL=class-parsing.js.map /***/ }), /***/ 35034: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ClassPath = void 0; const path = __webpack_require__(85622); function canonicalize(rawClasspath) { let sanitisedClassPath = rawClasspath.trim(); while (sanitisedClassPath.startsWith(path.delimiter)) { sanitisedClassPath = sanitisedClassPath.slice(1); } while (sanitisedClassPath.endsWith(path.delimiter)) { sanitisedClassPath = sanitisedClassPath.slice(0, -1); } return sanitisedClassPath; } class ClassPath { constructor(classPath) { this.value = canonicalize(classPath); } isEmpty() { return this.value.length === 0; } concat(other) { const elements = this.value.split(path.delimiter); const otherElements = other.value.split(path.delimiter); const newElements = Array.from(new Set(elements.concat(otherElements)).values()); return new ClassPath(newElements.join(path.delimiter)); } toString() { return this.value; } } exports.ClassPath = ClassPath; //# sourceMappingURL=classpath.js.map /***/ }), /***/ 60725: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const snykConfig = __webpack_require__(8658); const path = __webpack_require__(85622); const config = snykConfig.loadConfig(path.join(__dirname, '..')); module.exports = config; //# sourceMappingURL=config.js.map /***/ }), /***/ 1187: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.debug = void 0; const debugModule = __webpack_require__(15158); // To enable debugging output, use `snyk -d` function debug(s) { if (process.env.DEBUG) { debugModule.enable(process.env.DEBUG); } return debugModule(`snyk-java-call-graph-builder`)(s); } exports.debug = debug; //# sourceMappingURL=debug.js.map /***/ }), /***/ 38133: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MalformedModulesSpecError = exports.SubprocessError = exports.SubprocessTimeoutError = exports.MissingTargetFolderError = exports.EmptyClassPathError = exports.ClassPathGenerationError = exports.CallGraphGenerationError = void 0; class CallGraphGenerationError extends Error { constructor(msg, innerError) { super(msg); Object.setPrototypeOf(this, CallGraphGenerationError.prototype); this.innerError = innerError; } } exports.CallGraphGenerationError = CallGraphGenerationError; class ClassPathGenerationError extends Error { constructor(innerError) { super('Class path generation error'); this.userMessage = "Could not determine the project's class path. Please contact our support or submit an issue at https://github.com/snyk/java-call-graph-builder/issues. Re-running the command with the `-d` flag will provide useful information for the support engineers."; Object.setPrototypeOf(this, ClassPathGenerationError.prototype); this.innerError = innerError; } } exports.ClassPathGenerationError = ClassPathGenerationError; class EmptyClassPathError extends Error { constructor(command) { super(`The command "${command}" returned an empty class path`); this.userMessage = 'The class path for the project is empty. Please contact our support or submit an issue at https://github.com/snyk/java-call-graph-builder/issues. Re-running the command with the `-d` flag will provide useful information for the support engineers.'; Object.setPrototypeOf(this, EmptyClassPathError.prototype); } } exports.EmptyClassPathError = EmptyClassPathError; class MissingTargetFolderError extends Error { constructor(targetPath, packageManager) { super(`Could not find the target folder starting in "${targetPath}"`); this.errorMessagePerPackageManager = { mvn: "Could not find the project's output directory. Please build your project and try again. " + 'The reachable vulnerabilities feature only supports the default Maven project layout, ' + "where the output directory is named 'target'.", gradle: "Could not find the project's target folder. Please compile your code and try again.", }; Object.setPrototypeOf(this, MissingTargetFolderError.prototype); this.userMessage = this.errorMessagePerPackageManager[packageManager]; } } exports.MissingTargetFolderError = MissingTargetFolderError; class SubprocessTimeoutError extends Error { constructor(command, args, timeout) { super(`The command "${command} ${args}" timed out after ${timeout / 1000}s`); this.userMessage = 'Scanning for reachable vulnerabilities took too long. Please use the --reachable-timeout flag to increase the timeout for finding reachable vulnerabilities.'; Object.setPrototypeOf(this, SubprocessTimeoutError.prototype); } } exports.SubprocessTimeoutError = SubprocessTimeoutError; class SubprocessError extends Error { constructor(command, args, exitCode, stdError) { super(`The command "${command} ${args}" exited with code ${exitCode}${stdError ? ', Standard Error Output: ' + stdError : ''}`); Object.setPrototypeOf(this, SubprocessError.prototype); } } exports.SubprocessError = SubprocessError; class MalformedModulesSpecError extends Error { constructor(modulesXml) { super(`Malformed modules XML: ${modulesXml}`); Object.setPrototypeOf(this, MalformedModulesSpecError.prototype); } } exports.MalformedModulesSpecError = MalformedModulesSpecError; //# sourceMappingURL=errors.js.map /***/ }), /***/ 6026: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fetch = exports.JAR_NAME = void 0; const tslib_1 = __webpack_require__(70655); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const needle = __webpack_require__(64484); const ciInfo = __webpack_require__(25943); const ProgressBar = __webpack_require__(15157); const tempDir = __webpack_require__(21661); const crypto = __webpack_require__(76417); const debug_1 = __webpack_require__(1187); const metrics = __webpack_require__(17040); const promisifedFs = __webpack_require__(12959); exports.JAR_NAME = 'java-call-graph-generator.jar'; const LOCAL_PATH = path.join(tempDir, 'call-graph-generator', exports.JAR_NAME); function createProgressBar(total, name) { return new ProgressBar(`downloading ${name} [:bar] :rate/Kbps :percent :etas remaining`, { complete: '=', incomplete: '.', width: 20, total: total / 1000, clear: true, }); } function downloadAnalyzer(url, localPath, expectedChecksum) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { const fsStream = fs.createWriteStream(localPath + '.part'); try { let progressBar; debug_1.debug(`fetching java graph generator from ${url}`); const req = needle.get(url); let matchChecksum; let hasError = false; // TODO: Try pump (https://www.npmjs.com/package/pump) for more organised flow req .on('response', (res) => tslib_1.__awaiter(this, void 0, void 0, function* () { if (res.statusCode >= 400) { const err = new Error('Bad HTTP response for snyk-call-graph-generator download'); // TODO: add custom error for status code => err.statusCode = res.statusCode; fsStream.destroy(); hasError = true; return reject(err); } matchChecksum = verifyChecksum(req, expectedChecksum); debug_1.debug(`downloading ${exports.JAR_NAME} ...`); if (!ciInfo.isCI) { const total = parseInt(res.headers['content-length'], 10); progressBar = createProgressBar(total, exports.JAR_NAME); } })) .on('data', (chunk) => { if (progressBar) { progressBar.tick(chunk.length / 1000); } }) .on('error', (err) => { return reject(err); }) .pipe(fsStream) .on('error', (err) => { fsStream.destroy(); return reject(err); }) .on('finish', () => tslib_1.__awaiter(this, void 0, void 0, function* () { if (hasError) { yield promisifedFs.unlink(localPath + '.part'); } else { if (!(yield matchChecksum)) { return reject(new Error('Wrong checksum of downloaded call-graph-generator.')); } yield promisifedFs.rename(localPath + '.part', localPath); resolve(localPath); } })); } catch (err) { reject(err); } }); }); } function verifyChecksum(localPathStream, expectedChecksum) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { const hash = crypto.createHash('sha256'); localPathStream .on('error', reject) .on('data', (chunk) => { hash.update(chunk); }) .on('end', () => { resolve(hash.digest('hex') === expectedChecksum); }); }); }); } function fetch(url, expectedChecksum) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const localPath = LOCAL_PATH; if (yield promisifedFs.exists(localPath)) { if (yield verifyChecksum(fs.createReadStream(localPath), expectedChecksum)) { return localPath; } debug_1.debug(`new version of ${exports.JAR_NAME} available`); } if (!(yield promisifedFs.exists(path.dirname(localPath)))) { yield promisifedFs.mkdir(path.dirname(localPath)); } return yield metrics.timeIt('fetchCallGraphBuilder', () => downloadAnalyzer(url, localPath, expectedChecksum)); }); } exports.fetch = fetch; //# sourceMappingURL=fetch-snyk-java-call-graph-generator.js.map /***/ }), /***/ 85562: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getClassPathFromGradle = exports.getGradleCommandArgs = void 0; const tslib_1 = __webpack_require__(70655); __webpack_require__(20406); const sub_process_1 = __webpack_require__(28219); const path = __webpack_require__(85622); const os_1 = __webpack_require__(12087); const errors_1 = __webpack_require__(38133); const fs = __webpack_require__(35747); const tmp = __webpack_require__(21086); function getGradleCommandArgs(targetPath, initScript, confAttrs) { // For binary releases, the original file would be in the binary build and inaccesible const originalPath = path.join(__dirname, ...'../bin/init.gradle'.split('/')); const tmpFilePath = tmp.fileSync().name; fs.copyFileSync(originalPath, tmpFilePath); const gradleArgs = ['printClasspath', '-I', tmpFilePath, '-q']; if (targetPath) { gradleArgs.push('-p', targetPath); } if (initScript) { gradleArgs.push('--init-script', initScript); } if (confAttrs) { const isWin = /^win/.test(os_1.platform()); const quot = isWin ? '"' : "'"; gradleArgs.push(`-PconfAttrs=${quot}${confAttrs}${quot}`); } return gradleArgs; } exports.getGradleCommandArgs = getGradleCommandArgs; function getClassPathFromGradle(targetPath, gradlePath, initScript, confAttrs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const args = getGradleCommandArgs(targetPath, initScript, confAttrs); try { const output = yield sub_process_1.execute(gradlePath, args, { cwd: targetPath }); const lines = output.trim().split(os_1.EOL); const lastLine = lines[lines.length - 1]; return lastLine.trim(); } catch (e) { console.log(e); throw new errors_1.ClassPathGenerationError(e); } }); } exports.getClassPathFromGradle = getClassPathFromGradle; //# sourceMappingURL=gradle-wrapper.js.map /***/ }), /***/ 16623: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findBuildDirs = exports.runtimeMetrics = exports.getCallGraphGradle = exports.getCallGraphMvn = exports.getCallGraphMvnLegacy = void 0; const tslib_1 = __webpack_require__(70655); __webpack_require__(20406); const mvn_wrapper_legacy_1 = __webpack_require__(49505); const gradle_wrapper_1 = __webpack_require__(85562); const java_wrapper_1 = __webpack_require__(53042); const metrics_1 = __webpack_require__(17040); const errors_1 = __webpack_require__(38133); const promisified_fs_glob_1 = __webpack_require__(12959); const path = __webpack_require__(85622); const mvn_wrapper_1 = __webpack_require__(71418); const debug_1 = __webpack_require__(1187); const tmp = __webpack_require__(21086); tmp.setGracefulCleanup(); function getCallGraphMvnLegacy(targetPath, timeout, customMavenArgs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { try { const [classPath, targets] = yield Promise.all([ metrics_1.timeIt('getMvnClassPath', () => mvn_wrapper_legacy_1.getClassPathFromMvn(targetPath, customMavenArgs)), metrics_1.timeIt('getEntrypoints', () => findBuildDirs(targetPath, 'mvn')), ]); return yield metrics_1.timeIt('getCallGraph', () => java_wrapper_1.getCallGraph(classPath, targetPath, targets, timeout)); } catch (e) { throw new errors_1.CallGraphGenerationError(e.userMessage || 'Failed to scan for reachable vulnerabilities. Please contact our support or submit an issue at https://github.com/snyk/java-call-graph-builder/issues. Re-running the command with the `-d` flag will provide useful information for the support engineers.', e); } }); } exports.getCallGraphMvnLegacy = getCallGraphMvnLegacy; function getCallGraphMvn(targetPath, timeout, customMavenArgs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { try { const project = yield mvn_wrapper_1.makeMavenProject(targetPath, customMavenArgs); const classPath = project.getClassPath(); const buildDirectories = yield Promise.all(project.modules.map((m) => m.buildDirectory)); return yield metrics_1.timeIt('getCallGraph', () => java_wrapper_1.getCallGraph(classPath, targetPath, buildDirectories, timeout)); } catch (e) { debug_1.debug(`Failed to get the call graph for the Maven project in: ${targetPath}. ' + 'Falling back to the legacy method.`); return getCallGraphMvnLegacy(targetPath, timeout, customMavenArgs); } }); } exports.getCallGraphMvn = getCallGraphMvn; function getCallGraphGradle(targetPath, gradlePath = 'gradle', initScript, confAttrs, timeout) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const [classPath, targets] = yield Promise.all([ metrics_1.timeIt('getGradleClassPath', () => gradle_wrapper_1.getClassPathFromGradle(targetPath, gradlePath, initScript, confAttrs)), metrics_1.timeIt('getEntrypoints', () => findBuildDirs(targetPath, 'gradle')), ]); debug_1.debug(`got class path: ${classPath}`); debug_1.debug(`got targets: ${targets}`); return yield metrics_1.timeIt('getCallGraph', () => java_wrapper_1.getCallGraph(classPath, targetPath, targets, timeout)); }); } exports.getCallGraphGradle = getCallGraphGradle; function runtimeMetrics() { return metrics_1.getMetrics(); } exports.runtimeMetrics = runtimeMetrics; function findBuildDirs(targetPath, packageManager) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const targetFoldersByPackageManager = { mvn: 'target', gradle: 'build', }; const targetDirs = yield promisified_fs_glob_1.glob(path.join(targetPath, `**/${targetFoldersByPackageManager[packageManager]}`)); if (!targetDirs.length) { throw new errors_1.MissingTargetFolderError(targetPath, packageManager); } return targetDirs; }); } exports.findBuildDirs = findBuildDirs; //# sourceMappingURL=index.js.map /***/ }), /***/ 53042: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCallGraph = exports.getClassPerJarMapping = exports.getCallGraphGenCommandArgs = void 0; const tslib_1 = __webpack_require__(70655); __webpack_require__(20406); const jszip = __webpack_require__(66085); const path = __webpack_require__(85622); const config = __webpack_require__(60725); const sub_process_1 = __webpack_require__(28219); const fetch_snyk_java_call_graph_generator_1 = __webpack_require__(6026); const call_graph_1 = __webpack_require__(65619); const promisifedFs = __webpack_require__(12959); const promisified_fs_glob_1 = __webpack_require__(12959); const class_parsing_1 = __webpack_require__(64417); const metrics_1 = __webpack_require__(17040); const tempDir = __webpack_require__(21661); function getCallGraphGenCommandArgs(classPath, jarPath, targets) { return [ '-cp', jarPath, 'io.snyk.callgraph.app.App', '--application-classpath-file', classPath, '--dirs-to-get-entrypoints', targets.join(','), ]; } exports.getCallGraphGenCommandArgs = getCallGraphGenCommandArgs; function getClassPerJarMapping(classPath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const classPerJarMapping = {}; for (const classPathItem of classPath.split(path.delimiter)) { // classpath can also contain local directories with classes - we don't need them for package mapping if (!classPathItem.endsWith('.jar')) { continue; } const jarFileContent = yield promisified_fs_glob_1.readFile(classPathItem); const jarContent = yield jszip.loadAsync(jarFileContent); for (const classFile of Object.keys(jarContent.files).filter((name) => name.endsWith('.class'))) { const className = class_parsing_1.toFQclassName(classFile.replace('.class', '')); // removing .class from name classPerJarMapping[className] = classPathItem; } } return classPerJarMapping; }); } exports.getClassPerJarMapping = getClassPerJarMapping; function getCallGraph(classPath, targetPath, targets, timeout) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const [jarPath, { tmpDir, classPathFile }] = yield Promise.all([ fetch_snyk_java_call_graph_generator_1.fetch(config.CALL_GRAPH_GENERATOR_URL, config.CALL_GRAPH_GENERATOR_CHECKSUM), writeClassPathToTempDir(classPath), ]); const callgraphGenCommandArgs = getCallGraphGenCommandArgs(classPathFile, jarPath, targets); try { const [javaOutput, classPerJarMapping] = yield Promise.all([ metrics_1.timeIt('generateCallGraph', () => sub_process_1.execute('java', callgraphGenCommandArgs, { cwd: targetPath, timeout, })), metrics_1.timeIt('mapClassesPerJar', () => getClassPerJarMapping(classPath)), ]); return call_graph_1.buildCallGraph(javaOutput, classPerJarMapping); } finally { // Fire and forget - we don't have to wait for a deletion of a temporary file cleanupTempDir(classPathFile, tmpDir); } }); } exports.getCallGraph = getCallGraph; function writeClassPathToTempDir(classPath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const tmpDir = yield promisifedFs.mkdtemp(path.join(tempDir, 'call-graph-generator')); const classPathFile = path.join(tmpDir, 'callgraph-classpath'); yield promisifedFs.writeFile(classPathFile, classPath); return { tmpDir, classPathFile }; }); } function cleanupTempDir(classPathFile, tmpDir) { return tslib_1.__awaiter(this, void 0, void 0, function* () { try { yield promisifedFs.unlink(classPathFile); yield promisifedFs.rmdir(tmpDir); } catch (_a) { // we couldn't delete temporary data in temporary folder, no big deal } }); } //# sourceMappingURL=java-wrapper.js.map /***/ }), /***/ 17040: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getMetrics = exports.timeIt = void 0; const tslib_1 = __webpack_require__(70655); const metricsState = { getEntrypoints: { seconds: 0, nanoseconds: 0 }, generateCallGraph: { seconds: 0, nanoseconds: 0 }, mapClassesPerJar: { seconds: 0, nanoseconds: 0 }, getCallGraph: { seconds: 0, nanoseconds: 0 }, }; function start(metric) { const [secs, nsecs] = process.hrtime(); metricsState[metric] = { seconds: secs, nanoseconds: nsecs }; } function stop(metric) { const { seconds, nanoseconds } = metricsState[metric] || { seconds: 0, nanoseconds: 0, }; const [secs, nsecs] = process.hrtime([seconds, nanoseconds]); metricsState[metric] = { seconds: secs, nanoseconds: nsecs }; } function getMetrics() { const metrics = {}; for (const [metric, value] of Object.entries(metricsState)) { if (!value) { continue; } const { seconds, nanoseconds } = value; metrics[metric] = seconds + nanoseconds / 1e9; } return metrics; } exports.getMetrics = getMetrics; function timeIt(metric, fn) { return tslib_1.__awaiter(this, void 0, void 0, function* () { start(metric); const x = yield fn(); stop(metric); return x; }); } exports.timeIt = timeIt; //# sourceMappingURL=metrics.js.map /***/ }), /***/ 49505: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getClassPathFromMvn = exports.mergeMvnClassPaths = exports.parseMvnExecCommandOutput = exports.parseMvnDependencyPluginCommandOutput = exports.getMvnCommandArgsForMvnExec = void 0; const tslib_1 = __webpack_require__(70655); __webpack_require__(20406); const sub_process_1 = __webpack_require__(28219); const errors_1 = __webpack_require__(38133); const path = __webpack_require__(85622); const os = __webpack_require__(12087); function getMvnCommandArgsForMvnExec(targetPath) { return process.platform === 'win32' ? [ '-q', 'exec:exec', '-Dexec.classpathScope="compile"', '-Dexec.executable="cmd"', '-Dexec.args="/c echo %classpath"', '-f', targetPath, ] : [ '-q', 'exec:exec', '-Dexec.classpathScope="compile"', '-Dexec.executable="echo"', '-Dexec.args="%classpath"', '-f', targetPath, ]; } exports.getMvnCommandArgsForMvnExec = getMvnCommandArgsForMvnExec; function getMvnCommandArgsForDependencyPlugin(targetPath) { return ['dependency:build-classpath', '-f', targetPath]; } function parseMvnDependencyPluginCommandOutput(mvnCommandOutput) { const outputLines = mvnCommandOutput.split(os.EOL); const uniqueClassPaths = new Set(); let startIndex = 0; let i = outputLines.indexOf('[INFO] Dependencies classpath:', startIndex); while (i > -1) { if (outputLines[i + 1] !== '') { uniqueClassPaths.add(outputLines[i + 1]); } startIndex = i + 2; i = outputLines.indexOf('[INFO] Dependencies classpath:', startIndex); } return Array.from(uniqueClassPaths.values()).sort(); } exports.parseMvnDependencyPluginCommandOutput = parseMvnDependencyPluginCommandOutput; function parseMvnExecCommandOutput(mvnCommandOutput) { return mvnCommandOutput .trim() .split(os.EOL) .sort(); } exports.parseMvnExecCommandOutput = parseMvnExecCommandOutput; function mergeMvnClassPaths(classPaths) { // this magic joins all items in array with :, splits result by : again // makes Set (to uniq items), create Array from it and join it by : to have // proper path like format return Array.from(new Set(classPaths.join(path.delimiter).split(path.delimiter))) .sort() .join(path.delimiter); } exports.mergeMvnClassPaths = mergeMvnClassPaths; function getClassPathFromMvn(targetPath, customMavenArgs = []) { return tslib_1.__awaiter(this, void 0, void 0, function* () { let classPaths = []; let args = []; try { try { // there are two ways of getting classpath - either from maven plugin or by exec command // try `mvn exec` for classpath args = getMvnCommandArgsForMvnExec(targetPath).concat(customMavenArgs); const output = yield sub_process_1.execute('mvn', args, { cwd: targetPath }); classPaths = parseMvnExecCommandOutput(output); } catch (e) { // if it fails, try mvn dependency:build-classpath // TODO send error message for further analysis args = getMvnCommandArgsForDependencyPlugin(targetPath).concat(customMavenArgs); const output = yield sub_process_1.execute('mvn', args, { cwd: targetPath }); classPaths = parseMvnDependencyPluginCommandOutput(output); } } catch (e) { throw new errors_1.ClassPathGenerationError(e); } if (classPaths.length === 0) { throw new errors_1.EmptyClassPathError(`mvn ${args.join(' ')}`); } return mergeMvnClassPaths(classPaths); }); } exports.getClassPathFromMvn = getClassPathFromMvn; //# sourceMappingURL=mvn-wrapper-legacy.js.map /***/ }), /***/ 71418: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.makeMavenProject = exports.makeMavenModule = exports.MavenProject = exports.MavenModule = exports.parseModuleNames = exports.getDepsClassPath = exports.getOutputDir = exports.getBuildDir = exports.withOutputToTemporaryFile = void 0; const tslib_1 = __webpack_require__(70655); __webpack_require__(20406); const path = __webpack_require__(85622); const fs = __webpack_require__(35747); const xmlJs = __webpack_require__(7888); const classpath_1 = __webpack_require__(35034); const tmp = __webpack_require__(21086); const sub_process_1 = __webpack_require__(28219); const errors_1 = __webpack_require__(38133); const metrics_1 = __webpack_require__(17040); const debug_1 = __webpack_require__(1187); // Low level helper functions function withOutputToTemporaryFile(f) { return tslib_1.__awaiter(this, void 0, void 0, function* () { // NOTE(alexmu): We have to do this little dance with output written to files // because that seems to be the only way to get the output without having to // parse maven logs const file = tmp.fileSync({ discardDescriptor: true }); try { yield f(file.name); } catch (e) { debug_1.debug(`Failed to execute command with temporary file: ${e}`); throw e; } try { return fs.readFileSync(file.name, 'utf8'); } catch (e) { debug_1.debug(`Failed to read temporary file: ${e}`); throw e; } }); } exports.withOutputToTemporaryFile = withOutputToTemporaryFile; function runCommand(projectDirectory, args) { return sub_process_1.execute('mvn', args.concat(['-f', projectDirectory]), { cwd: projectDirectory, }); } // Domain specific helpers function evaluateExpression(projectDirectory, expression, customMavenArgs = []) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return yield withOutputToTemporaryFile((outputFile) => tslib_1.__awaiter(this, void 0, void 0, function* () { yield runCommand(projectDirectory, [ 'help:evaluate', `-Dexpression="${expression}"`, `-Doutput=${outputFile}`, ...customMavenArgs, ]); })); }); } function getBuildDir(baseDir, customMavenArgs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return yield evaluateExpression(baseDir, 'project.build.directory', customMavenArgs); }); } exports.getBuildDir = getBuildDir; function getOutputDir(baseDir, customMavenArgs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return yield evaluateExpression(baseDir, 'project.build.outputDirectory', customMavenArgs); }); } exports.getOutputDir = getOutputDir; function getDepsClassPath(baseDir, customMavenArgs = []) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const classPath = yield withOutputToTemporaryFile((outputFile) => tslib_1.__awaiter(this, void 0, void 0, function* () { yield runCommand(baseDir, [ 'dependency:build-classpath', `-Dmdep.outputFile=${outputFile}`, ...customMavenArgs, ]); })); return new classpath_1.ClassPath(classPath); }); } exports.getDepsClassPath = getDepsClassPath; function parseModuleNames(modulesXml) { const modulesSpec = xmlJs.xml2js(modulesXml, { compact: true }); if ('strings' in modulesSpec && 'string' in modulesSpec['strings']) { debug_1.debug(`Found 'strings' in the modules XML`); return modulesSpec['strings']['string'].map((s) => s['_text']); } else if ('modules' in modulesSpec) { debug_1.debug(`Empty modules XML`); return []; } else { throw new errors_1.MalformedModulesSpecError(modulesXml); } } exports.parseModuleNames = parseModuleNames; // Maven model class MavenModule { constructor(baseDir, buildDirectory, outputDirectory, dependenciesClassPath) { if ((buildDirectory === null || buildDirectory === void 0 ? void 0 : buildDirectory.length) === 0) { throw new Error(`Empty build directory for the project in: ${baseDir}`); } if ((outputDirectory === null || outputDirectory === void 0 ? void 0 : outputDirectory.length) === 0) { throw new Error(`Empty output directory for the project in: ${baseDir}`); } if (dependenciesClassPath === null || dependenciesClassPath === void 0 ? void 0 : dependenciesClassPath.isEmpty()) { throw new Error(`Empty dependencies for the project in: ${baseDir}`); } this.baseDirectory = baseDir; this.buildDirectory = buildDirectory; this.outputDirectory = outputDirectory; this.dependenciesClassPath = dependenciesClassPath; } getClassPath() { debug_1.debug(`Dependencies class path: ${this.dependenciesClassPath}`); debug_1.debug(`Output directory: ${this.outputDirectory}`); return this.dependenciesClassPath.concat(new classpath_1.ClassPath(this.outputDirectory)); } } exports.MavenModule = MavenModule; class MavenProject { constructor(baseDir, modules) { if ((modules === null || modules === void 0 ? void 0 : modules.length) === 0) { throw new Error(`Empty module list for the project in: ${baseDir}`); } this.baseDir = baseDir; this.modules = modules; } getClassPath() { const classPaths = this.modules.map((module) => module.getClassPath()); const cp = classPaths.reduce((cp1, cp2) => cp1.concat(cp2)); debug_1.debug(`Project class path: ${cp}`); return cp.toString(); } } exports.MavenProject = MavenProject; // Factories that deal with the low level details function makeMavenModule(baseDir, args) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const buildDir = yield getBuildDir(baseDir, args); const outputDir = yield getOutputDir(baseDir, args); const depsClassPath = yield metrics_1.timeIt('getMvnClassPath', () => tslib_1.__awaiter(this, void 0, void 0, function* () { return yield getDepsClassPath(baseDir, args); })); return new MavenModule(baseDir, buildDir, outputDir, depsClassPath); }); } exports.makeMavenModule = makeMavenModule; function makeMavenProject(baseDir, customMavenArgs) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const modulesXml = yield evaluateExpression(baseDir, 'project.modules', customMavenArgs); const moduleNames = parseModuleNames(modulesXml); const modules = [yield makeMavenModule(baseDir, customMavenArgs)]; const submodules = yield Promise.all(moduleNames.map((name) => makeMavenModule(path.join(baseDir, name)))); modules.push(...submodules); const validModules = modules.filter((module) => fs.existsSync(module.buildDirectory)); return new MavenProject(baseDir, validModules); }); } exports.makeMavenProject = makeMavenProject; //# sourceMappingURL=mvn-wrapper.js.map /***/ }), /***/ 12959: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.glob = exports.rmdir = exports.writeFile = exports.readFile = exports.mkdtemp = exports.mkdir = exports.unlink = exports.rename = exports.exists = void 0; const util_1 = __webpack_require__(31669); const fs = __webpack_require__(35747); const globOrig = __webpack_require__(12884); exports.exists = util_1.promisify(fs.exists); exports.rename = util_1.promisify(fs.rename); exports.unlink = util_1.promisify(fs.unlink); exports.mkdir = util_1.promisify(fs.mkdir); exports.mkdtemp = util_1.promisify(fs.mkdtemp); exports.readFile = util_1.promisify(fs.readFile); exports.writeFile = util_1.promisify(fs.writeFile); exports.rmdir = util_1.promisify(fs.rmdir); exports.glob = util_1.promisify(globOrig); //# sourceMappingURL=promisified-fs-glob.js.map /***/ }), /***/ 28219: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execute = void 0; const childProcess = __webpack_require__(63129); const debug_1 = __webpack_require__(1187); const errors_1 = __webpack_require__(38133); function execute(command, args, options) { const spawnOptions = { shell: true }; if (options && options.cwd) { spawnOptions.cwd = options.cwd; } return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; debug_1.debug(`executing command: "${command} ${args.join(' ')}"`); const proc = childProcess.spawn(command, args, spawnOptions); let timerId = null; if (options === null || options === void 0 ? void 0 : options.timeout) { timerId = setTimeout(() => { proc.kill(); const err = new errors_1.SubprocessTimeoutError(command, args.join(' '), options.timeout || 0); debug_1.debug(err.message); reject(err); }, options.timeout); } proc.stdout.on('data', (data) => { stdout = stdout + data; }); proc.stderr.on('data', (data) => { stderr = stderr + data; }); proc.on('close', (code) => { if (timerId !== null) { clearTimeout(timerId); } if (code !== 0) { const trimmedStackTrace = stderr .replace(/\t/g, '') .split('\n') .slice(0, 5) .join(', '); const err = new errors_1.SubprocessError(command, args.join(' '), code, trimmedStackTrace); debug_1.debug(err.message); return reject(err); } resolve(stdout); }); }); } exports.execute = execute; //# sourceMappingURL=sub-process.js.map /***/ }), /***/ 25943: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var vendors = __webpack_require__(38184) var env = process.env // Used for testing only Object.defineProperty(exports, "_vendors", ({ value: vendors.map(function (v) { return v.constant }) })) exports.name = null exports.isPR = null vendors.forEach(function (vendor) { var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env] var isCI = envs.every(function (obj) { return checkEnv(obj) }) exports[vendor.constant] = isCI if (isCI) { exports.name = vendor.name switch (typeof vendor.pr) { case 'string': // "pr": "CIRRUS_PR" exports.isPR = !!env[vendor.pr] break case 'object': if ('env' in vendor.pr) { // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne } else if ('any' in vendor.pr) { // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } exports.isPR = vendor.pr.any.some(function (key) { return !!env[key] }) } else { // "pr": { "DRONE_BUILD_EVENT": "pull_request" } exports.isPR = checkEnv(vendor.pr) } break default: // PR detection not supported for this vendor exports.isPR = null } } }) exports.isCI = !!( env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI env.BUILD_NUMBER || // Jenkins, TeamCity env.RUN_ID || // TaskCluster, dsari exports.name || false ) function checkEnv (obj) { if (typeof obj === 'string') return !!env[obj] return Object.keys(obj).every(function (k) { return env[k] === obj[k] }) } /***/ }), /***/ 39445: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const assert = __webpack_require__(42357) const path = __webpack_require__(85622) const fs = __webpack_require__(35747) let glob = undefined try { glob = __webpack_require__(12884) } 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 /***/ }), /***/ 21086: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /*! * Tmp * * Copyright (c) 2011-2017 KARASZI Istvan * * MIT Licensed */ /* * Module dependencies. */ const fs = __webpack_require__(35747); const os = __webpack_require__(12087); const path = __webpack_require__(85622); const crypto = __webpack_require__(76417); const _c = { fs: fs.constants, os: os.constants }; const rimraf = __webpack_require__(39445); /* * The working inner variables. */ const // the random characters to choose from RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', TEMPLATE_PATTERN = /XXXXXX/, DEFAULT_TRIES = 3, CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), // constants are off on the windows platform and will not match the actual errno codes IS_WIN32 = os.platform() === 'win32', EBADF = _c.EBADF || _c.os.errno.EBADF, ENOENT = _c.ENOENT || _c.os.errno.ENOENT, DIR_MODE = 0o700 /* 448 */, FILE_MODE = 0o600 /* 384 */, EXIT = 'exit', // this will hold the objects need to be removed on exit _removeObjects = [], // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback FN_RMDIR_SYNC = fs.rmdirSync.bind(fs), FN_RIMRAF_SYNC = rimraf.sync; let _gracefulCleanup = false; /** * Gets a temporary file name. * * @param {(Options|tmpNameCallback)} options options or callback * @param {?tmpNameCallback} callback the callback function */ function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; try { _assertAndSanitizeOptions(opts); } catch (err) { return cb(err); } let tries = opts.tries; (function _getUniqueName() { try { const name = _generateTmpName(opts); // check whether the path exists then retry if needed fs.stat(name, function (err) { /* istanbul ignore else */ if (!err) { /* istanbul ignore else */ if (tries-- > 0) return _getUniqueName(); return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name)); } cb(null, name); }); } catch (err) { cb(err); } }()); } /** * Synchronous version of tmpName. * * @param {Object} options * @returns {string} the generated random name * @throws {Error} if the options are invalid or could not generate a filename */ function tmpNameSync(options) { const args = _parseArguments(options), opts = args[0]; _assertAndSanitizeOptions(opts); let tries = opts.tries; do { const name = _generateTmpName(opts); try { fs.statSync(name); } catch (e) { return name; } } while (tries-- > 0); throw new Error('Could not get a unique tmp filename, max tries reached'); } /** * Creates and opens a temporary file. * * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined * @param {?fileCallback} callback */ function file(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; // gets a temporary filename tmpName(opts, function _tmpNameCreated(err, name) { /* istanbul ignore else */ if (err) return cb(err); // create and open the file fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { /* istanbu ignore else */ if (err) return cb(err); if (opts.discardDescriptor) { return fs.close(fd, function _discardCallback(possibleErr) { // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care // about the descriptor const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); } }); }); } /** * Synchronous version of file. * * @param {Options} options * @returns {FileSyncObject} object consists of name, fd and removeCallback * @throws {Error} if cannot create a file */ function fileSync(options) { const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); /* istanbul ignore else */ if (opts.discardDescriptor) { fs.closeSync(fd); fd = undefined; } return { name: name, fd: fd, removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) }; } /** * Creates a temporary directory. * * @param {(Options|dirCallback)} options the options or the callback function * @param {?dirCallback} callback */ function dir(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; // gets a temporary filename tmpName(opts, function _tmpNameCreated(err, name) { /* istanbul ignore else */ if (err) return cb(err); // create the directory fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) { /* istanbul ignore else */ if (err) return cb(err); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); }); } /** * Synchronous version of dir. * * @param {Options} options * @returns {DirSyncObject} object consists of name and removeCallback * @throws {Error} if it cannot create a directory */ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); fs.mkdirSync(name, opts.mode || DIR_MODE); return { name: name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) }; } /** * Removes files asynchronously. * * @param {Object} fdPath * @param {Function} next * @private */ function _removeFileAsync(fdPath, next) { const _handler = function (err) { if (err && !_isENOENT(err)) { // reraise any unanticipated error return next(err); } next(); }; if (0 <= fdPath[0]) fs.close(fdPath[0], function () { fs.unlink(fdPath[1], _handler); }); else fs.unlink(fdPath[1], _handler); } /** * Removes files synchronously. * * @param {Object} fdPath * @private */ function _removeFileSync(fdPath) { let rethrownException = null; try { if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); } catch (e) { // reraise any unanticipated error if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { fs.unlinkSync(fdPath[1]); } catch (e) { // reraise any unanticipated error if (!_isENOENT(e)) rethrownException = e; } } if (rethrownException !== null) { throw rethrownException; } } /** * Prepares the callback for removal of the temporary file. * * Returns either a sync callback or a async callback depending on whether * fileSync or file was called, which is expressed by the sync parameter. * * @param {string} name the path of the file * @param {number} fd file descriptor * @param {Object} opts * @param {boolean} sync * @returns {fileCallback | fileCallbackSync} * @private */ function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } /** * Prepares the callback for removal of the temporary directory. * * Returns either a sync callback or a async callback depending on whether * tmpFileSync or tmpFile was called, which is expressed by the sync parameter. * * @param {string} name * @param {Object} opts * @param {boolean} sync * @returns {Function} the callback * @private */ function _prepareTmpDirRemoveCallback(name, opts, sync) { const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } /** * Creates a guarded function wrapping the removeFunction call. * * The cleanup callback is save to be called multiple times. * Subsequent invocations will be ignored. * * @param {Function} removeFunction * @param {string} fileOrDirName * @param {boolean} sync * @param {cleanupCallbackSync?} cleanupCallbackSync * @returns {cleanupCallback | cleanupCallbackSync} * @private */ function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { let called = false; // if sync is true, the next parameter will be ignored return function _cleanupCallback(next) { /* istanbul ignore else */ if (!called) { // remove cleanupCallback from cache const toRemove = cleanupCallbackSync || _cleanupCallback; const index = _removeObjects.indexOf(toRemove); /* istanbul ignore else */ if (index >= 0) _removeObjects.splice(index, 1); called = true; if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { return removeFunction(fileOrDirName); } else { return removeFunction(fileOrDirName, next || function() {}); } } }; } /** * The garbage collector. * * @private */ function _garbageCollector() { /* istanbul ignore else */ if (!_gracefulCleanup) return; // the function being called removes itself from _removeObjects, // loop until _removeObjects is empty while (_removeObjects.length) { try { _removeObjects[0](); } catch (e) { // already removed? } } } /** * Random name generator based on crypto. * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript * * @param {number} howMany * @returns {string} the generated random name * @private */ function _randomChars(howMany) { let value = [], rnd = null; // make sure that we do not fail because we ran out of entropy try { rnd = crypto.randomBytes(howMany); } catch (e) { rnd = crypto.pseudoRandomBytes(howMany); } for (var i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); } return value.join(''); } /** * Helper which determines whether a string s is blank, that is undefined, or empty or null. * * @private * @param {string} s * @returns {Boolean} true whether the string s is blank, false otherwise */ function _isBlank(s) { return s === null || _isUndefined(s) || !s.trim(); } /** * Checks whether the `obj` parameter is defined or not. * * @param {Object} obj * @returns {boolean} true if the object is undefined * @private */ function _isUndefined(obj) { return typeof obj === 'undefined'; } /** * Parses the function arguments. * * This function helps to have optional arguments. * * @param {(Options|null|undefined|Function)} options * @param {?Function} callback * @returns {Array} parsed arguments * @private */ function _parseArguments(options, callback) { /* istanbul ignore else */ if (typeof options === 'function') { return [{}, options]; } /* istanbul ignore else */ if (_isUndefined(options)) { return [{}, callback]; } // copy options so we do not leak the changes we make internally const actualOptions = {}; for (const key of Object.getOwnPropertyNames(options)) { actualOptions[key] = options[key]; } return [actualOptions, callback]; } /** * Generates a new temporary name. * * @param {Object} opts * @returns {string} the new random name according to opts * @private */ function _generateTmpName(opts) { const tmpDir = opts.tmpdir; /* istanbul ignore else */ if (!_isUndefined(opts.name)) return path.join(tmpDir, opts.dir, opts.name); /* istanbul ignore else */ if (!_isUndefined(opts.template)) return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); // prefix and postfix const name = [ opts.prefix ? opts.prefix : 'tmp', '-', process.pid, '-', _randomChars(12), opts.postfix ? '-' + opts.postfix : '' ].join(''); return path.join(tmpDir, opts.dir, name); } /** * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing * options. * * @param {Options} options * @private */ function _assertAndSanitizeOptions(options) { options.tmpdir = _getTmpDir(options); const tmpDir = options.tmpdir; /* istanbul ignore else */ if (!_isUndefined(options.name)) _assertIsRelative(options.name, 'name', tmpDir); /* istanbul ignore else */ if (!_isUndefined(options.dir)) _assertIsRelative(options.dir, 'dir', tmpDir); /* istanbul ignore else */ if (!_isUndefined(options.template)) { _assertIsRelative(options.template, 'template', tmpDir); if (!options.template.match(TEMPLATE_PATTERN)) throw new Error(`Invalid template, found "${options.template}".`); } /* istanbul ignore else */ if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) throw new Error(`Invalid tries, found "${options.tries}".`); // if a name was specified we will try once options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; options.keep = !!options.keep; options.detachDescriptor = !!options.detachDescriptor; options.discardDescriptor = !!options.discardDescriptor; options.unsafeCleanup = !!options.unsafeCleanup; // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir)); options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir)); // sanitize further if template is relative to options.dir options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template); // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to options.name = _isUndefined(options.name) ? undefined : _sanitizeName(options.name); options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; } /** * Resolve the specified path name in respect to tmpDir. * * The specified name might include relative path components, e.g. ../ * so we need to resolve in order to be sure that is is located inside tmpDir * * @param name * @param tmpDir * @returns {string} * @private */ function _resolvePath(name, tmpDir) { const sanitizedName = _sanitizeName(name); if (sanitizedName.startsWith(tmpDir)) { return path.resolve(sanitizedName); } else { return path.resolve(path.join(tmpDir, sanitizedName)); } } /** * Sanitize the specified path name by removing all quote characters. * * @param name * @returns {string} * @private */ function _sanitizeName(name) { if (_isBlank(name)) { return name; } return name.replace(/["']/g, ''); } /** * Asserts whether specified name is relative to the specified tmpDir. * * @param {string} name * @param {string} option * @param {string} tmpDir * @throws {Error} * @private */ function _assertIsRelative(name, option, tmpDir) { if (option === 'name') { // assert that name is not absolute and does not contain a path if (path.isAbsolute(name)) throw new Error(`${option} option must not contain an absolute path, found "${name}".`); // must not fail on valid . or .. or similar such constructs let basename = path.basename(name); if (basename === '..' || basename === '.' || basename !== name) throw new Error(`${option} option must not contain a path, found "${name}".`); } else { // if (option === 'dir' || option === 'template') { // assert that dir or template are relative to tmpDir if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); } let resolvedPath = _resolvePath(name, tmpDir); if (!resolvedPath.startsWith(tmpDir)) throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); } } /** * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows. * * @private */ function _isEBADF(error) { return _isExpectedError(error, -EBADF, 'EBADF'); } /** * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows. * * @private */ function _isENOENT(error) { return _isExpectedError(error, -ENOENT, 'ENOENT'); } /** * Helper to determine whether the expected error code matches the actual code and errno, * which will differ between the supported node versions. * * - Node >= 7.0: * error.code {string} * error.errno {number} any numerical value will be negated * * CAVEAT * * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT * is no different here. * * @param {SystemError} error * @param {number} errno * @param {string} code * @private */ function _isExpectedError(error, errno, code) { return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; } /** * Sets the graceful cleanup. * * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary * object removals. */ function setGracefulCleanup() { _gracefulCleanup = true; } /** * Returns the currently configured tmp dir from os.tmpdir(). * * @private * @param {?Options} options * @returns {string} the currently configured tmp dir */ function _getTmpDir(options) { return path.resolve(_sanitizeName(options && options.tmpdir || os.tmpdir())); } // Install process exit listener process.addListener(EXIT, _garbageCollector); /** * Configuration options. * * @typedef {Object} Options * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected * @property {?number} tries the number of tries before give up the name generation * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files * @property {?string} template the "mkstemp" like filename template * @property {?string} name fixed name relative to tmpdir or the specified dir option * @property {?string} dir tmp directory relative to the root tmp directory in use * @property {?string} prefix prefix for the generated name * @property {?string} postfix postfix for the generated name * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection */ /** * @typedef {Object} FileSyncObject * @property {string} name the name of the file * @property {string} fd the file descriptor or -1 if the fd has been discarded * @property {fileCallback} removeCallback the callback function to remove the file */ /** * @typedef {Object} DirSyncObject * @property {string} name the name of the directory * @property {fileCallback} removeCallback the callback function to remove the directory */ /** * @callback tmpNameCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name */ /** * @callback fileCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {number} fd the file descriptor or -1 if the fd had been discarded * @param {cleanupCallback} fn the cleanup callback function */ /** * @callback fileCallbackSync * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {number} fd the file descriptor or -1 if the fd had been discarded * @param {cleanupCallbackSync} fn the cleanup callback function */ /** * @callback dirCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {cleanupCallback} fn the cleanup callback function */ /** * @callback dirCallbackSync * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {cleanupCallbackSync} fn the cleanup callback function */ /** * Removes the temporary created file or directory. * * @callback cleanupCallback * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed */ /** * Removes the temporary created file or directory. * * @callback cleanupCallbackSync */ /** * Callback function for function composition. * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57} * * @callback simpleCallback */ // exporting all the needed methods // evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will // allow users to reconfigure the temporary directory Object.defineProperty(module.exports, "tmpdir", ({ enumerable: true, configurable: false, get: function () { return _getTmpDir(); } })); module.exports.dir = dir; module.exports.dirSync = dirSync; module.exports.file = file; module.exports.fileSync = fileSync; module.exports.tmpName = tmpName; module.exports.tmpNameSync = tmpNameSync; module.exports.setGracefulCleanup = setGracefulCleanup; /***/ }), /***/ 59468: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.buildDepGraphs = void 0; const dep_graph_1 = __webpack_require__(71479); const out_of_sync_error_1 = __webpack_require__(71757); const is_dev_dependency_1 = __webpack_require__(92700); const get_non_hex_version_1 = __webpack_require__(3749); function buildDepGraphs(mixJsonResult, includeDev = false, strict = true, allProjects = false) { const manifest = mixJsonResult === null || mixJsonResult === void 0 ? void 0 : mixJsonResult.manifest; if (!manifest) throw new Error('No manifest found'); const lock = mixJsonResult.lock[0]; if (!lock) throw new Error('No lock file found'); const lockDepMap = Object.entries(lock).reduce((acc, [key, dep]) => { const [packageManager, name, version, hash, , dependencies] = dep; acc[key] = { packageManager, name, version, hash, dependencies, }; return acc; }, {}); if (mixJsonResult.parent_umbrella_manifest) { const umbrella = mixJsonResult.parent_umbrella_manifest; const prefix = `${getManifestName(umbrella)}/${umbrella.apps_path}/`; const name = `${umbrella.apps_path}/${getManifestName(manifest)}`; return { [name]: getDepGraph(prefix, manifest, includeDev, lockDepMap, strict), }; } const apps = allProjects || isEmpty(mixJsonResult.apps) ? {} : mixJsonResult.apps; const projects = { root: manifest, ...apps }; const appsPrefix = `${getManifestName(manifest)}/${manifest.apps_path}/`; return Object.entries(projects).reduce((acc, [key, manifest]) => { const prefix = key === 'root' ? '' : appsPrefix; acc[key] = getDepGraph(prefix, manifest, includeDev, lockDepMap, strict); return acc; }, {}); } exports.buildDepGraphs = buildDepGraphs; function isEmpty(obj) { return !obj || Object.keys(obj).length === 0; } function getDepGraph(prefix, manifest, includeDev, lockDepMap, strict) { const builder = new dep_graph_1.DepGraphBuilder({ name: 'hex' }, getRootPkg(prefix, manifest)); if (!manifest.deps) return builder.build(); const transitivesQueue = []; const deps = getTopLevelDeps(manifest); for (const topLevelDep of deps) { // eslint-disable-next-line prefer-const let [depName, depVersionSpec, options] = topLevelDep; if (typeof depVersionSpec === 'object') { options = depVersionSpec; depVersionSpec = undefined; } const isDev = is_dev_dependency_1.isDevDependency(options); if (!includeDev && isDev) continue; const scope = isDev ? 'dev' : 'prod'; const parentNodeId = builder.rootNodeId; let dep = lockDepMap[depName]; let labels; if (!dep) { const nonHexVersion = get_non_hex_version_1.getNonHexVersion(options); if (!nonHexVersion && strict) throw new out_of_sync_error_1.OutOfSyncError(depName); labels = { missingLockFileEntry: 'true', ...((nonHexVersion === null || nonHexVersion === void 0 ? void 0 : nonHexVersion.labels) || {}), }; dep = { name: depName, version: (nonHexVersion === null || nonHexVersion === void 0 ? void 0 : nonHexVersion.title) || depVersionSpec }; } transitivesQueue.push({ dep, parentNodeId, scope, labels }); } while (transitivesQueue.length > 0) { const { dep, parentNodeId, scope, labels } = transitivesQueue.shift(); const nodeId = addNode(dep.name, dep.version, scope, labels); builder.connectDep(parentNodeId, nodeId); if (!dep.dependencies) continue; for (const [childName, , childOptions] of dep.dependencies) { const lockDep = lockDepMap[childName]; if (!lockDep && childOptions && !childOptions.optional) throw new out_of_sync_error_1.OutOfSyncError(childName); else if (!lockDep) continue; transitivesQueue.push({ parentNodeId: nodeId, dep: lockDep, scope }); } } return builder.build(); function addNode(name, version, scope, labels) { const nodeInfo = { labels: { scope, ...(labels || {}), }, }; const nodeId = `${name}@${version || ''}`; builder.addPkgNode({ name, version }, nodeId, nodeInfo); return nodeId; } } function getRootPkg(prefix, manifest) { const name = getManifestName(manifest); return { name: `${prefix}${name}`, version: manifest.version || '0.0.0' }; } function getManifestName(manifest) { var _a; return (manifest.app || ((_a = manifest.module_name) === null || _a === void 0 ? void 0 : _a.replace(/\.Mix\w{4,}$/, '').toLowerCase()) || 'no_name'); } function getTopLevelDeps(manifest) { return Array.isArray(manifest.deps) ? manifest.deps : Object.entries(manifest.deps).map(([key, value]) => Array.isArray(value) ? [key, ...value] : [key, value]); } //# sourceMappingURL=build-dep-graphs.js.map /***/ }), /***/ 3749: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getNonHexVersion = void 0; const PATH_OPTION_PROPS = ['path', 'in_umbrella']; const GIT_OPTION_PROPS = [ 'git', 'github', 'ref', 'branch', 'tag', 'submodules', 'sparse', ]; function getNonHexVersion(options) { if (hasPathOptionProps(options)) return generatePathDepVersion(options); else if (hasGitOptionProps(options)) return generateGitDepVersion(options); } exports.getNonHexVersion = getNonHexVersion; function hasPathOptionProps(options) { return PATH_OPTION_PROPS.some((key) => options === null || options === void 0 ? void 0 : options[key]); } function generatePathDepVersion(options) { if (options.in_umbrella) return { title: 'in_umbrella', labels: {} }; else if (options.path) return { title: 'path', labels: { path: options.path } }; } function hasGitOptionProps(options) { return GIT_OPTION_PROPS.some((key) => options === null || options === void 0 ? void 0 : options[key]); } function generateGitDepVersion(options) { const gitAddress = options.github ? `https://github.com/${options.github}.git` : options.git; const ref = options.branch || options.tag || options.ref || 'HEAD'; const title = `${gitAddress}@${ref}`; const labels = {}; for (const prop of GIT_OPTION_PROPS) { if (!options[prop]) continue; labels[prop] = options[prop]; } return { title, labels }; } //# sourceMappingURL=get-non-hex-version.js.map /***/ }), /***/ 72559: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var build_dep_graphs_1 = __webpack_require__(59468); Object.defineProperty(exports, "buildDepGraphs", ({ enumerable: true, get: function () { return build_dep_graphs_1.buildDepGraphs; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 92700: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isDevDependency = void 0; /* * A dependency can be a limited to more than one environment (i.e. :dev and :test) * The logic to decide the scope (dev/prod): * If the dependency is not whitelisted, or if :prod is in the `only` whitelist, we consider it as a prod dependency * Otherwise it's a dev dependency. * */ function isDevDependency(options) { if (!options || !options.only) return false; const envs = Array.isArray(options.only) ? options.only : [options.only]; return envs.every((env) => env !== 'prod'); } exports.isDevDependency = isDevDependency; //# sourceMappingURL=is-dev-dependency.js.map /***/ }), /***/ 71757: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OutOfSyncError = void 0; class OutOfSyncError extends Error { constructor(dependencyName) { super(`Dependency ${dependencyName} was not found in ` + `mix.lock. Your mix.exs and ` + `mix.lock are probably out of sync. Please run ` + `"mix deps.get" and try again.`); this.name = 'OutOfSyncError'; this.dependencyName = dependencyName; Error.captureStackTrace(this, OutOfSyncError); } } exports.OutOfSyncError = OutOfSyncError; //# sourceMappingURL=out-of-sync-error.js.map /***/ }), /***/ 78217: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(45776); const types_2 = __webpack_require__(98590); /** * Extract the values from a hash index, which is stored in a Hash DB page. * The hash index contains key/value pairs. The key is usually some number * which is not relevant to the application. This function returns only the * values stored in the index. * @param data A database page. * @param entries How many entries are stored in the index. */ function bufferToHashIndexValues(page, entries) { // Hash table entries are always stored in pairs of 2. if (entries % 2 !== 0) { const pageNumber = page.readUInt32LE(8); throw new types_2.ParserError('The number of entries must be a multiple of 2', { entries, pageNumber, }); } // Every entry is a 2-byte offset that points somewhere in the current database page. const hashIndexSize = entries * types_1.HASH_INDEX_ENTRY_SIZE; const hashIndex = page.slice(types_1.DATABASE_PAGE_HEADER_SIZE, types_1.DATABASE_PAGE_HEADER_SIZE + hashIndexSize); // We only want the values, not the keys. Data is stored in key/value pairs. // The following skips over all keys and stores only the values. An entry is 2 bytes long. const keyValuePairSize = 2 * types_1.HASH_INDEX_ENTRY_SIZE; const hashIndexValues = hashIndex.reduce((values, _, byteOffset) => { // Is the current byte the start of a value? if ((byteOffset - types_1.HASH_INDEX_ENTRY_SIZE) % keyValuePairSize === 0) { const value = hashIndex.readInt16LE(byteOffset); values.push(value); } return values; }, new Array()); return hashIndexValues; } exports.bufferToHashIndexValues = bufferToHashIndexValues; //# sourceMappingURL=database-pages.js.map /***/ }), /***/ 85959: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(45776); const types_2 = __webpack_require__(98590); /** * Traverse the data (overflow) pages and extract the data. * The data may be spread over multiple pages, so for every page we need to: * 1. Strip the page header of every page. * 2. Collate with data collected so far. * 3. Make sure to read the right data offset if we reach the last page. * The pages are not in order, so we may have to jump all across the BerkeleyDB file. * This is why we also need a Buffer to the database contents. * @param berkeleydb The contents of the database. * @param page Which page to start looking from. This should be an Overflow page. * @param pageStartOffset Which byte in the BerkeleyDB points to the start of the page. * @param pageSizeBytes How big is every page (typically it would be 4096 bytes). */ function bufferToHashValueContent(berkeleydb, page, pageStartOffset, pageSizeBytes) { // The byte offset that describes the page type is the same regardless of the page type. // Note there may be 5 different page types of varying length, but we are interested only one. const pageType = page.readUInt8(pageStartOffset); if (pageType !== types_1.HashPageType.H_OFFPAGE) { throw new types_2.ParserError('Unsupported page type', { pageType }); } const startPageNumber = page.readUInt32LE(pageStartOffset + 4); const dataLengthBytes = page.readUInt32LE(pageStartOffset + 8); const result = Buffer.alloc(dataLengthBytes); let bytesWritten = 0; // Traverse the pages, using "nextPageNumber" in the page metadata to see if we've reached the end. for (let currentPageNumber = startPageNumber; currentPageNumber !== 0;) { const pageStart = pageSizeBytes * currentPageNumber; const pageEnd = pageStart + pageSizeBytes; const currentPage = berkeleydb.slice(pageStart, pageEnd); const nextPageNumber = currentPage.readUInt32LE(16); const freeAreaOffset = currentPage.readUInt16LE(22); const isLastPage = nextPageNumber === 0; const bytesToWrite = isLastPage ? // The last page points to where the data ends. currentPage.slice(types_1.DATABASE_PAGE_HEADER_SIZE, freeAreaOffset) : // Otherwise the whole page is filled with content. currentPage.slice(types_1.DATABASE_PAGE_HEADER_SIZE, currentPage.length); const byteOffset = bytesWritten; result.set(bytesToWrite, byteOffset); bytesWritten += bytesToWrite.length; currentPageNumber = nextPageNumber; } return result; } exports.bufferToHashValueContent = bufferToHashValueContent; //# sourceMappingURL=hash-pages.js.map /***/ }), /***/ 40218: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const event_loop_spinner_1 = __webpack_require__(77158); const database_pages_1 = __webpack_require__(78217); exports.bufferToHashIndexValues = database_pages_1.bufferToHashIndexValues; const hash_pages_1 = __webpack_require__(85959); exports.bufferToHashValueContent = hash_pages_1.bufferToHashValueContent; const types_1 = __webpack_require__(45776); const types_2 = __webpack_require__(98590); const validPageSizes = [ 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, ]; /** * Extract the RPM package contents from a BerkeleyDB. Note that the contents * are returned as a Buffer of data for every package and that they need to be further * processed to extract meaningful package information. * * This implementation is interested in finding only data blobs of type Hash DB. * * The BerkeleyDB that we are interested in contains only the following pages: * - A metadata page -- the first page (index 0) of the database. * - A Hash DB page -- this page basically tells us where to find the data in the BerkeleyDB. * - An Overflow page -- this page contains the data. The data may span multiple pages (hence "overflow" pages). * @param data The contents of a BerkeleyDB database. */ async function bufferToHashDbValues(data) { validateBerkeleyDbMetadata(data); const pageSize = data.readUInt32LE(20); validatePageSize(pageSize); const lastPageNumber = data.readUInt32LE(32); const result = new Array(); // The 0th index page is the database metadata page, so start from the 1st index page. for (let pageNumber = 1; pageNumber < lastPageNumber; pageNumber++) { const pageStart = pageNumber * pageSize; const pageEnd = pageStart + pageSize; const pageType = data[pageStart + 25]; // Look only for HASH pages, we will traverse their content in subsequent steps. if (pageType !== types_1.DatabasePageType.P_HASH) { continue; } const page = data.slice(pageStart, pageEnd); const entries = page.readUInt16LE(20); // Hash DB entries come in key/value pairs. We are only interested in the values. const hashIndex = database_pages_1.bufferToHashIndexValues(page, entries); for (const hashPage of hashIndex) { const valuePageType = page[hashPage]; // Only Overflow pages contain package data, skip anything else. if (valuePageType !== types_1.HashPageType.H_OFFPAGE) { continue; } // Traverse the page to concatenate the data that may span multiple pages. const valueContent = hash_pages_1.bufferToHashValueContent(data, page, hashPage, pageSize); result.push(valueContent); } if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } return result; } exports.bufferToHashDbValues = bufferToHashDbValues; /** * Exported for testing */ function validateBerkeleyDbMetadata(data) { // We are only interested in Hash DB. Other types are B-Tree, Queue, Heap, etc. const magicNumber = data.readUInt32LE(12); if (magicNumber !== types_1.MagicNumber.DB_HASH) { throw new types_2.ParserError('Unexpected database magic number', { magicNumber }); } // The first page of the database must be a Hash DB metadata page. const pageType = data.readUInt8(25); if (pageType !== types_1.DatabasePageType.P_HASHMETA) { throw new types_2.ParserError('Unexpected page type', { pageType }); } const encryptionAlgorithm = data.readUInt8(24); if (encryptionAlgorithm !== 0) { throw new types_2.ParserError('Encrypted databases are not supported', { encryptionAlgorithm, }); } // We will be pre-allocating some memory for the entries in the database. // Choose a very high, possibly unrealistic number, for the number of installed // packages on the system. We don't want to allocate too much memory. const entriesCount = data.readUInt32LE(88); if (entriesCount < 0 || entriesCount > 50000) { throw new types_2.ParserError('Invalid number of entries in the database', { entriesCount, }); } } exports.validateBerkeleyDbMetadata = validateBerkeleyDbMetadata; /** * Exported for testing */ function validatePageSize(pageSize) { if (!validPageSizes.includes(pageSize)) { throw new types_2.ParserError('Invalid page size', { pageSize }); } } exports.validatePageSize = validatePageSize; //# sourceMappingURL=index.js.map /***/ }), /***/ 45776: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /** * Every entry in the index is a 2-byte offset that points somewhere in the current database page. */ exports.HASH_INDEX_ENTRY_SIZE = 2; /** * Every DB page has a 26 bytes header at the start of the page. */ exports.DATABASE_PAGE_HEADER_SIZE = 26; /** * Every BerkeleyDB will contain a magic number that additionally proves that * the file is of a particular type. */ var MagicNumber; (function (MagicNumber) { MagicNumber[MagicNumber["DB_HASH"] = 398689] = "DB_HASH"; })(MagicNumber = exports.MagicNumber || (exports.MagicNumber = {})); /** * Every page in the database has a particular type. * These are the only types we need for fully reading the list of packages. */ var DatabasePageType; (function (DatabasePageType) { DatabasePageType[DatabasePageType["P_OVERFLOW"] = 7] = "P_OVERFLOW"; DatabasePageType[DatabasePageType["P_HASHMETA"] = 8] = "P_HASHMETA"; DatabasePageType[DatabasePageType["P_HASH"] = 13] = "P_HASH"; })(DatabasePageType = exports.DatabasePageType || (exports.DatabasePageType = {})); /** * We are only interested in Hash pages of type Overflow since they are the only ones containing data. */ var HashPageType; (function (HashPageType) { HashPageType[HashPageType["H_OFFPAGE"] = 3] = "H_OFFPAGE"; })(HashPageType = exports.HashPageType || (exports.HashPageType = {})); //# sourceMappingURL=types.js.map /***/ }), /***/ 76713: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const berkeleydb_1 = __webpack_require__(40218); const rpm_1 = __webpack_require__(22604); const sql_js_1 = __webpack_require__(26657); /** * Get a list of packages given a Buffer that contains an RPM database in BerkeleyDB format. * The database is inspected as best-effort, returning all valid/readable entries. * @param data An RPM database in BerkeleyDB format. * @deprecated Should use snyk/dep-graph. The response format is kept for backwards compatibility with snyk/kubernetes-monitor. */ async function getPackages(data) { try { const berkeleyDbValues = await berkeleydb_1.bufferToHashDbValues(data); let packagesSkipped = 0; let packagesProcessed = 0; const rpmPackageInfos = new Array(); for (const entry of berkeleyDbValues) { try { const packageInfo = await rpm_1.bufferToPackageInfo(entry); if (packageInfo !== undefined) { rpmPackageInfos.push(packageInfo); packagesProcessed += 1; } else { packagesSkipped += 1; } } catch (error) { packagesSkipped += 1; } } const formattedPackages = formatRpmPackages(rpmPackageInfos); const response = formattedPackages.join('\n'); return { response, rpmMetadata: { packagesProcessed, packagesSkipped, }, }; } catch (error) { return { response: '', error: error, }; } } exports.getPackages = getPackages; function formatRpmPackages(packages) { return packages.map((packageInfo) => { return `${packageInfo.name}\t${formatRpmPackageVersion(packageInfo)}\t${packageInfo.size}`; }); } function formatRpmPackageVersion(packageInfo) { if (packageInfo.epoch === undefined || packageInfo.epoch === 0) { return `${packageInfo.version}-${packageInfo.release}`; } return `${packageInfo.epoch}:${packageInfo.version}-${packageInfo.release}`; } exports.formatRpmPackageVersion = formatRpmPackageVersion; /** * Get a list of packages given a file path to an Sqlite RPM packages DB. * The database is inspected as best-effort, returning all valid/readable entries. * @param sqliteFilePath A path to an RPM sqlite Packages DB. */ async function getPackagesSqlite(sqliteDbBuffer) { try { const packageInfoBlobs = await getBlobsFromPackagesTableSqliteDb(sqliteDbBuffer); const packages = await Promise.all(packageInfoBlobs.map((data) => rpm_1.bufferToPackageInfo(data))); return { response: packages }; } catch (error) { return { response: [], error: error }; } } exports.getPackagesSqlite = getPackagesSqlite; // TODO: revisit when new version of sql.js is available // OR we're able to use sqlite3 (Snyk CLI limitation with native modules) async function getBlobsFromPackagesTableSqliteDb(sqliteDbBuffer) { const SQL = await sql_js_1.default(); const db = new SQL.Database(sqliteDbBuffer); const dbContent = db.exec('SELECT blob FROM Packages'); const packagesInfoBlobs = dbContent[0].values; db.close(); return packagesInfoBlobs.map((data) => Buffer.from(data[0])); } //# sourceMappingURL=index.js.map /***/ }), /***/ 34808: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const event_loop_spinner_1 = __webpack_require__(77158); const types_1 = __webpack_require__(61668); const types_2 = __webpack_require__(98590); /** * Iterate through RPM metadata entries to build the full package data. * @param entries Entries that were previously extracted from a BerkeleyDB blob. */ async function getPackageInfo(entries) { const packageInfo = {}; for (const entry of entries) { switch (entry.info.tag) { case types_1.RpmTag.NAME: if (entry.info.type !== types_1.RpmType.STRING) { throw new types_2.ParserError('Unexpected type for name tag', { type: entry.info.type, }); } packageInfo.name = extractString(entry.data); break; case types_1.RpmTag.RELEASE: if (entry.info.type !== types_1.RpmType.STRING) { throw new types_2.ParserError('Unexpected type for release tag', { type: entry.info.type, }); } packageInfo.release = extractString(entry.data); break; case types_1.RpmTag.ARCH: if (entry.info.type !== types_1.RpmType.STRING) { throw new types_2.ParserError('Unexpected type for arch tag', { type: entry.info.type, }); } packageInfo.arch = extractString(entry.data); break; case types_1.RpmTag.EPOCH: if (entry.info.type !== types_1.RpmType.INT32) { throw new types_2.ParserError('Unexpected type for epoch tag', { type: entry.info.type, }); } packageInfo.epoch = entry.data.readInt32BE(0); break; case types_1.RpmTag.SIZE: if (entry.info.type !== types_1.RpmType.INT32) { throw new types_2.ParserError('Unexpected type for size tag', { type: entry.info.type, }); } packageInfo.size = entry.data.readInt32BE(0); break; case types_1.RpmTag.VERSION: if (entry.info.type !== types_1.RpmType.STRING) { throw new types_2.ParserError('Unexpected type for version tag', { type: entry.info.type, }); } packageInfo.version = extractString(entry.data); break; default: break; } if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } return isPackageInfo(packageInfo) ? packageInfo : undefined; } exports.getPackageInfo = getPackageInfo; /** * The content may be padded with zeros so we can't directly convert it to string. * Find the first 0 byte which indicates where the string ends. */ function extractString(data) { const contentEnd = data.indexOf(0); return data.slice(0, contentEnd).toString('utf-8'); } /** * Type checks to assert we are dealing with the expected type. */ function isPackageInfo(packageInfo) { return (packageInfo.name !== undefined && packageInfo.version !== undefined && packageInfo.release !== undefined && packageInfo.size !== undefined); } //# sourceMappingURL=extensions.js.map /***/ }), /***/ 65224: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const event_loop_spinner_1 = __webpack_require__(77158); const types_1 = __webpack_require__(61668); const types_2 = __webpack_require__(98590); /** * Transform a blob of metadadata into addressable RPM package entries. * The entries need to be further processed to extract package information. * @param data A blob of RPM metadata, as stored inside BerkeleyDB. */ async function headerImport(data) { const indexLength = data.readInt32BE(0); const dataLength = data.readInt32BE(4); if (indexLength <= 0 || indexLength > 50000) { // Ensure we don't allocate something crazy... throw new types_2.ParserError('Invalid index length', { indexLength }); } const entryInfos = new Array(); // Skip the first 2 items (index and data lengths) const dataStart = 8 + indexLength * types_1.ENTRY_INFO_SIZE; const index = data.slice(8, indexLength * types_1.ENTRY_INFO_SIZE); for (let i = 0; i < indexLength; i++) { const entry = index.slice(i * types_1.ENTRY_INFO_SIZE, i * types_1.ENTRY_INFO_SIZE + types_1.ENTRY_INFO_SIZE); if (entry.length < types_1.ENTRY_INFO_SIZE) { continue; } const entryInfo = { tag: entry.readInt32BE(0), type: entry.readUInt32BE(4), offset: entry.readInt32BE(8), count: entry.readUInt32BE(12), }; if (types_1.PRIVATE_RPM_TAGS.includes(entryInfo.tag)) { continue; } entryInfos.push(entryInfo); if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } return regionSwab(data, entryInfos, dataStart, dataLength); } exports.headerImport = headerImport; async function regionSwab(data, entryInfos, dataStart, dataLength) { const indexEntries = new Array(entryInfos.length); for (let i = 0; i < entryInfos.length; i++) { const entryInfo = entryInfos[i]; const entryLength = i < entryInfos.length - 1 ? entryInfos[i + 1].offset - entryInfo.offset : dataLength - entryInfo.offset; const entryStart = dataStart + entryInfo.offset; const entryEnd = entryStart + entryLength; const indexEntry = { info: entryInfo, data: data.slice(entryStart, entryEnd), length: entryLength, }; indexEntries[i] = indexEntry; if (event_loop_spinner_1.eventLoopSpinner.isStarving()) { await event_loop_spinner_1.eventLoopSpinner.spin(); } } return indexEntries; } //# sourceMappingURL=header.js.map /***/ }), /***/ 22604: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const header_1 = __webpack_require__(65224); const extensions_1 = __webpack_require__(34808); /** * Extracts as much package information as available from a blob of RPM metadata. * Returns undefined if the package cannot be constructed due to missing or corrupt data. * @param data A blob of RPM metadata, as stored inside BerkeleyDB. */ async function bufferToPackageInfo(data) { const entries = await header_1.headerImport(data); const packageInfo = await extensions_1.getPackageInfo(entries); return packageInfo; } exports.bufferToPackageInfo = bufferToPackageInfo; //# sourceMappingURL=index.js.map /***/ }), /***/ 61668: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /** * Size of an RPM metadata entry in bytes. */ exports.ENTRY_INFO_SIZE = 16; /** https://github.com/rpm-software-management/rpm/blob/ad1cad7e6a5def8b6036b90f2634297eda79dc7d/lib/rpmtag.h#L16-L25 */ exports.PRIVATE_RPM_TAGS = [ 61, 62, 63, 64, 100, 256, ]; var RpmTag; (function (RpmTag) { RpmTag[RpmTag["NAME"] = 1000] = "NAME"; RpmTag[RpmTag["VERSION"] = 1001] = "VERSION"; RpmTag[RpmTag["RELEASE"] = 1002] = "RELEASE"; RpmTag[RpmTag["EPOCH"] = 1003] = "EPOCH"; RpmTag[RpmTag["SIZE"] = 1009] = "SIZE"; RpmTag[RpmTag["ARCH"] = 1022] = "ARCH"; })(RpmTag = exports.RpmTag || (exports.RpmTag = {})); var RpmType; (function (RpmType) { RpmType[RpmType["NULL"] = 0] = "NULL"; RpmType[RpmType["CHAR"] = 1] = "CHAR"; RpmType[RpmType["INT8"] = 2] = "INT8"; RpmType[RpmType["INT16"] = 3] = "INT16"; RpmType[RpmType["INT32"] = 4] = "INT32"; RpmType[RpmType["INT64"] = 5] = "INT64"; RpmType[RpmType["STRING"] = 6] = "STRING"; RpmType[RpmType["BIN"] = 7] = "BIN"; RpmType[RpmType["STRING_ARRAY"] = 8] = "STRING_ARRAY"; RpmType[RpmType["I18NSTRING"] = 9] = "I18NSTRING"; })(RpmType = exports.RpmType || (exports.RpmType = {})); //# sourceMappingURL=types.js.map /***/ }), /***/ 98590: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class ParserError extends Error { constructor(message, context) { super(message); Error.captureStackTrace(this, this.constructor); this.context = context; } } exports.ParserError = ParserError; //# sourceMappingURL=types.js.map /***/ }), /***/ 49556: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OutOfSyncError = exports.inspect = void 0; const tslib_1 = __webpack_require__(58432); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const crypto = __webpack_require__(76417); const subProcess = __webpack_require__(85468); const cocoapods_lockfile_parser_1 = __webpack_require__(84537); const legacy_1 = __webpack_require__(67790); // Compile-time check that we are implementing the plugin API properly // eslint-disable-next-line @typescript-eslint/no-unused-vars const _ = { pluginName() { return "snyk-cocoapods-plugin"; }, inspect, }; const MANIFEST_FILE_NAMES = [ "CocoaPods.podfile.yaml", "CocoaPods.podfile", "Podfile", "Podfile.rb", ]; const LOCKFILE_NAME = "Podfile.lock"; function inspect(root, targetFile, options) { return tslib_1.__awaiter(this, void 0, void 0, function* () { if (!options) { options = { dev: false }; } if (!("strictOutOfSync" in options)) { options.strictOutOfSync = false; } if (options.subProject) { throw new Error("The CocoaPods plugin doesn't support specifying a subProject!"); } let lockfilePath; function expectToFindLockfile(dir = '.') { return tslib_1.__awaiter(this, void 0, void 0, function* () { const discoveredLockfilePath = yield findLockfile(root, dir); if (!discoveredLockfilePath) { throw new Error("Could not find lockfile \"Podfile.lock\"! This might be resolved by running `pod install`."); } return discoveredLockfilePath; }); } let manifestFilePath; if (targetFile) { const { base, dir } = path.parse(targetFile); if (base === LOCKFILE_NAME) { lockfilePath = targetFile; manifestFilePath = yield findManifestFile(root, dir); } else if (MANIFEST_FILE_NAMES.indexOf(base) !== -1) { const absTargetFilePath = path.join(root, targetFile); if (!(yield fsExists(absTargetFilePath))) { throw new Error(`Given target file ("${targetFile}") doesn't exist!`); } manifestFilePath = targetFile; lockfilePath = yield expectToFindLockfile(dir); } else { throw new Error("Unexpected name for target file!"); } } else { manifestFilePath = yield findManifestFile(root); lockfilePath = yield expectToFindLockfile(); } const absLockfilePath = path.join(root, lockfilePath); if (options.strictOutOfSync) { if (!manifestFilePath) { throw new Error("Option `--strict-out-of-sync=true` given, but no manifest file could be found!"); } const absManifestFilePath = path.join(root, manifestFilePath); const result = yield verifyChecksum(absManifestFilePath, absLockfilePath); if (result === ChecksumVerificationResult.NoChecksumInLockfile) { throw new Error("Option `--strict-out-of-sync=true` given, but lockfile doesn't encode checksum of Podfile! " + "Try to update the CocoaPods integration via \"pod install\" or omit the option."); } if (result === ChecksumVerificationResult.Invalid) { throw new OutOfSyncError(manifestFilePath, lockfilePath); } } const plugin = { meta: {}, name: 'cocoapods', runtime: yield cocoapodsVersion(root), targetFile: manifestFilePath || lockfilePath, }; const depTree = yield getAllDeps(absLockfilePath); return { package: depTree, plugin, }; }); } exports.inspect = inspect; function fsExists(pathToTest) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { try { fs.exists(pathToTest, (exists) => resolve(exists)); } catch (error) { reject(error); } }); }); } function fsReadFile(filename) { return tslib_1.__awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { fs.readFile(filename, 'utf8', (err, data) => { if (err) { reject(err); return; } resolve(data); }); }); }); } function findManifestFile(root, dir = '.') { return tslib_1.__awaiter(this, void 0, void 0, function* () { for (const manifestFileName of MANIFEST_FILE_NAMES) { const targetFilePath = path.join(root, dir, manifestFileName); if (yield fsExists(targetFilePath)) { return path.join(dir, manifestFileName); } } }); } function findLockfile(root, dir = '.') { return tslib_1.__awaiter(this, void 0, void 0, function* () { const lockfilePath = path.join(root, dir, LOCKFILE_NAME); if (yield fsExists(lockfilePath)) { return path.join(dir, LOCKFILE_NAME); } }); } var ChecksumVerificationResult; (function (ChecksumVerificationResult) { ChecksumVerificationResult[ChecksumVerificationResult["Valid"] = 0] = "Valid"; ChecksumVerificationResult[ChecksumVerificationResult["Invalid"] = 1] = "Invalid"; ChecksumVerificationResult[ChecksumVerificationResult["NoChecksumInLockfile"] = 2] = "NoChecksumInLockfile"; })(ChecksumVerificationResult || (ChecksumVerificationResult = {})); function verifyChecksum(manifestFilePath, lockfilePath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const manifestFileContents = yield fsReadFile(manifestFilePath); const checksum = crypto.createHash('sha1').update(manifestFileContents).digest('hex'); const parser = yield cocoapods_lockfile_parser_1.LockfileParser.readFile(lockfilePath); if (parser.podfileChecksum === undefined) { return ChecksumVerificationResult.NoChecksumInLockfile; } else if (parser.podfileChecksum === checksum) { return ChecksumVerificationResult.Valid; } else { return ChecksumVerificationResult.Invalid; } }); } function getAllDeps(lockfilePath) { return tslib_1.__awaiter(this, void 0, void 0, function* () { let parser; try { parser = yield cocoapods_lockfile_parser_1.LockfileParser.readFile(lockfilePath); } catch (error) { throw new Error(`Error while parsing ${LOCKFILE_NAME}:\n${error.message}`); } const graph = parser.toDepGraph(); return legacy_1.graphToDepTree(graph, "cocoapods"); }); } function cocoapodsVersion(root) { return tslib_1.__awaiter(this, void 0, void 0, function* () { let podVersionOutput = ''; try { // 1st: try to run CocoaPods via bundler podVersionOutput = yield subProcess.execute('bundle exec pod', ['--version'], { cwd: root }); } catch (_a) { try { // 2nd: try to run CocoaPods directly podVersionOutput = yield subProcess.execute('pod', ['--version'], { cwd: root }); } catch (_b) { // intentionally empty } } return podVersionOutput.trim(); }); } class OutOfSyncError extends Error { constructor(manifestFileName, lockfileName) { super(`Your Podfile ("${manifestFileName}") is not in sync ` + `with your lockfile ("${lockfileName}"). ` + `Please run "pod install" and try again.`); this.code = 422; this.name = 'OutOfSyncError'; Error.captureStackTrace(this, OutOfSyncError); } } exports.OutOfSyncError = OutOfSyncError; //# sourceMappingURL=index.js.map /***/ }), /***/ 85468: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execute = void 0; const childProcess = __webpack_require__(63129); function execute(command, args = [], options) { const spawnOptions = { shell: true }; if (options && options.cwd) { spawnOptions.cwd = options.cwd; } return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; const proc = childProcess.spawn(command, args, spawnOptions); proc.stdout.on('data', (data) => { stdout = stdout + data; }); proc.stderr.on('data', (data) => { stderr = stderr + data; }); proc.on('close', (code) => { if (code !== 0) { return reject(new Error(stdout || stderr)); } resolve(stdout || stderr); }); }); } exports.execute = execute; //# sourceMappingURL=sub-process.js.map /***/ }), /***/ 58432: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "__extends": () => (/* binding */ __extends), /* harmony export */ "__assign": () => (/* binding */ __assign), /* harmony export */ "__rest": () => (/* binding */ __rest), /* harmony export */ "__decorate": () => (/* binding */ __decorate), /* harmony export */ "__param": () => (/* binding */ __param), /* harmony export */ "__metadata": () => (/* binding */ __metadata), /* harmony export */ "__awaiter": () => (/* binding */ __awaiter), /* harmony export */ "__generator": () => (/* binding */ __generator), /* harmony export */ "__createBinding": () => (/* binding */ __createBinding), /* harmony export */ "__exportStar": () => (/* binding */ __exportStar), /* harmony export */ "__values": () => (/* binding */ __values), /* harmony export */ "__read": () => (/* binding */ __read), /* harmony export */ "__spread": () => (/* binding */ __spread), /* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays), /* harmony export */ "__spreadArray": () => (/* binding */ __spreadArray), /* harmony export */ "__await": () => (/* binding */ __await), /* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator), /* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator), /* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues), /* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject), /* harmony export */ "__importStar": () => (/* binding */ __importStar), /* harmony export */ "__importDefault": () => (/* binding */ __importDefault), /* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet), /* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet) /* harmony export */ }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. 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. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __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]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } /***/ }), /***/ 17603: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DockerPull = void 0; const registryClient = __webpack_require__(28310); const crypto = __webpack_require__(76417); const fs = __webpack_require__(35747); const os = __webpack_require__(12087); const path = __webpack_require__(85622); const tmp = __webpack_require__(29033); const subProcess = __webpack_require__(77685); const tar = __webpack_require__(53871); const util_1 = __webpack_require__(31669); const errors_1 = __webpack_require__(26518); const readFile = util_1.promisify(fs.readFile); const link = util_1.promisify(fs.link); const stat = util_1.promisify(fs.stat); const DEFAULT_LAYER_JSON = { created: "0001-01-01T00:00:00Z", // eslint-disable-next-line @typescript-eslint/camelcase container_config: { Hostname: "", Domainname: "", User: "", AttachStdin: false, AttachStdout: false, AttachStderr: false, Tty: false, OpenStdin: false, StdinOnce: false, Env: null, Cmd: null, Image: "", Volumes: null, WorkingDir: "", Entrypoint: null, OnBuild: null, Labels: null } }; class DockerPull { static async findDockerBinary() { return subProcess .execute("which", ["docker"], undefined, undefined, true) .then(cmdOutput => cmdOutput.stdout.trim()) .catch(cmdOutput => { throw new Error(cmdOutput.stderr); }); } async pull(registryBase, repo, tag, opt) { const loadImage = (opt === null || opt === void 0 ? void 0 : opt.loadImage) === undefined ? true : opt.loadImage; const manifest = await registryClient.getManifest(registryBase, repo, tag, opt === null || opt === void 0 ? void 0 : opt.username, opt === null || opt === void 0 ? void 0 : opt.password, opt === null || opt === void 0 ? void 0 : opt.reqOptions); if (manifest.schemaVersion !== 2) { throw new errors_1.InvalidManifestSchemaVersionError(manifest.schemaVersion); } const imageConfigMetadata = manifest.config; const imageConfig = await registryClient.getImageConfig(registryBase, repo, imageConfigMetadata.digest, opt === null || opt === void 0 ? void 0 : opt.username, opt === null || opt === void 0 ? void 0 : opt.password, opt === null || opt === void 0 ? void 0 : opt.reqOptions); const t0 = Date.now(); const layersConfigs = manifest.layers; const missingLayers = await this.getLayers(layersConfigs, registryBase, repo, opt === null || opt === void 0 ? void 0 : opt.username, opt === null || opt === void 0 ? void 0 : opt.password, opt === null || opt === void 0 ? void 0 : opt.reqOptions); const pullDuration = Date.now() - t0; let imageDigest; const stagingDir = this.createDownloadedImageDestination(opt === null || opt === void 0 ? void 0 : opt.imageSavePath); try { await this.buildImage(imageConfigMetadata.digest, imageConfig, layersConfigs, missingLayers, stagingDir); if (loadImage) { imageDigest = await this.loadImage(registryBase, repo, tag, stagingDir); } } catch (err) { throw new Error(err.stderr); } finally { try { // Check is the image should be saved for debugging const saveMatcher = Object.assign(Object.assign({}, opt), { registryBase, repo, tag }); for (const [name, requestMatcher] of Object.entries(await this.saveRequests())) { if (Object.keys(requestMatcher).every(key => requestMatcher[key] === saveMatcher[key])) { await link(path.join(stagingDir.name, "image.tar"), tmp.tmpNameSync({ prefix: `${name}-`, postfix: ".tar" })); break; } } } catch (err) { console.error("pullSaveRequest error: ", err); } if (loadImage) { stagingDir.removeCallback(); } } return { imageDigest, stagingDir: loadImage ? null : stagingDir, cachedLayersDigests: [], missingLayersDigests: missingLayers.map(layer => layer.config.digest), pullDuration, missingLayersCalculatedDigests: opt.calculateMissingLayersDigests ? missingLayers.map(layer => this.calculateLayerDigest(layer)) : [] }; } async getLayers(layersConfigs, registryBase, repo, username, password, // weak typing on the client // eslint-disable-next-line @typescript-eslint/no-explicit-any reqOptions = {}) { return await Promise.all(layersConfigs.map(async (config) => { const blob = await registryClient.getLayer(registryBase, repo, config.digest, username, password, reqOptions); return { config, blob }; })); } calculateLayerDigest(layer) { const hashAlgorithm = layer.config.digest.split(":")[0]; const calculatedDigest = crypto .createHash(hashAlgorithm) .update(layer.blob) .digest("hex"); return `${hashAlgorithm}:${calculatedDigest}`; } async saveRequests() { const saveRequestsPath = path.join(os.tmpdir(), "pullSaveRequest.json"); try { if (await stat(saveRequestsPath)) { return JSON.parse((await readFile(saveRequestsPath)).toString("utf-8")); } } catch (err) { return {}; } } async buildImage(imageDigest, imageConfig, layersConfigs, layers, stagingDir) { const pack = tar.pack(); // write layers let parentDigest; for (const layerConfig of layersConfigs) { const digest = layerConfig.digest.replace("sha256:", ""); // write layer.tar let blob; for (const layer of layers) { if (layerConfig.digest === layer.config.digest) { blob = layer.blob; break; } } if (!blob) { throw new Error(`missing blob during build: ${digest}`); } pack.entry({ name: path.join(digest, "layer.tar") }, blob); // write json let json = Object.assign({}, { id: digest }, DEFAULT_LAYER_JSON); if (parentDigest) { json = Object.assign({ parent: parentDigest }); } pack.entry({ name: path.join(digest, "json") }, JSON.stringify(json)); parentDigest = digest; // write version pack.entry({ name: path.join(digest, "VERSION") }, "1.0"); } imageDigest = imageDigest.replace("sha256:", ""); // write image json pack.entry({ name: `${imageDigest}.json` }, JSON.stringify(imageConfig)); // write manifest.json const manifestJson = [ { Config: `${imageDigest}.json`, RepoTags: null, Layers: layersConfigs.map(config => `${config.digest.replace("sha256:", "")}/layer.tar`) } ]; pack.entry({ name: "manifest.json" }, JSON.stringify(manifestJson), () => { pack.finalize(); }); const imagePath = path.join(stagingDir.name, "image.tar"); const file = fs.createWriteStream(imagePath); pack.pipe(file); return new Promise(resolve => { file.on("close", () => { resolve(path.join(imagePath)); }); }); } async loadImage(registryBase, repo, tag, stagingDir) { const dockerBinary = await DockerPull.findDockerBinary(); const stdout = (await subProcess.execute(dockerBinary, ["load", "-i", "image.tar"], stagingDir.name)).stdout; // Loaded image ID: sha256:36456e9e9cb7c4b17d97461a5aeb062a481401e3d2b559285c7083d8e7f8efa6 const imgDigest = stdout.split("sha256:")[1].trim(); await subProcess.execute(dockerBinary, [ "tag", `${imgDigest}`, `${registryBase}/${repo}:${tag}` ]); return imgDigest; } createDownloadedImageDestination(imageSavePath) { if (!imageSavePath) { return tmp.dirSync({ unsafeCleanup: true }); } const dirResult = { name: imageSavePath, removeCallback: () => { /* do nothing */ } }; return dirResult; } } exports.DockerPull = DockerPull; //# sourceMappingURL=docker-pull.js.map /***/ }), /***/ 26518: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.InvalidManifestSchemaVersionError = void 0; class InvalidManifestSchemaVersionError extends Error { constructor(version) { super(`Invalid manifest schema version ${version}`); this.code = 422; } } exports.InvalidManifestSchemaVersionError = InvalidManifestSchemaVersionError; //# sourceMappingURL=errors.js.map /***/ }), /***/ 39106: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var docker_pull_1 = __webpack_require__(17603); Object.defineProperty(exports, "DockerPull", ({ enumerable: true, get: function () { return docker_pull_1.DockerPull; } })); var errors_1 = __webpack_require__(26518); Object.defineProperty(exports, "InvalidManifestSchemaVersionError", ({ enumerable: true, get: function () { return errors_1.InvalidManifestSchemaVersionError; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 77685: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execute = void 0; const childProcess = __webpack_require__(63129); async function execute(command, args, cwd, env, shell = false) { const spawnOptions = { shell }; if (cwd) { spawnOptions.cwd = cwd; } if (env) { spawnOptions.env = env; } return new Promise((resolve, reject) => { let stdout = ""; let stderr = ""; const proc = childProcess.spawn(command, args, spawnOptions); proc.stdout.on("data", data => { stdout = stdout + data; }); proc.stderr.on("data", data => { stderr = stderr + data; }); proc.on("close", code => { const output = { stdout, stderr }; if (code !== 0) { return reject(output); } resolve(output); }); }); } exports.execute = execute; //# sourceMappingURL=sub-process.js.map /***/ }), /***/ 37129: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const assert = __webpack_require__(42357) const path = __webpack_require__(85622) const fs = __webpack_require__(35747) let glob = undefined try { glob = __webpack_require__(12884) } 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 /***/ }), /***/ 29033: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /*! * Tmp * * Copyright (c) 2011-2017 KARASZI Istvan * * MIT Licensed */ /* * Module dependencies. */ const fs = __webpack_require__(35747); const os = __webpack_require__(12087); const path = __webpack_require__(85622); const crypto = __webpack_require__(76417); const _c = { fs: fs.constants, os: os.constants }; const rimraf = __webpack_require__(37129); /* * The working inner variables. */ const // the random characters to choose from RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', TEMPLATE_PATTERN = /XXXXXX/, DEFAULT_TRIES = 3, CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), // constants are off on the windows platform and will not match the actual errno codes IS_WIN32 = os.platform() === 'win32', EBADF = _c.EBADF || _c.os.errno.EBADF, ENOENT = _c.ENOENT || _c.os.errno.ENOENT, DIR_MODE = 0o700 /* 448 */, FILE_MODE = 0o600 /* 384 */, EXIT = 'exit', // this will hold the objects need to be removed on exit _removeObjects = [], // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback FN_RMDIR_SYNC = fs.rmdirSync.bind(fs), FN_RIMRAF_SYNC = rimraf.sync; let _gracefulCleanup = false; /** * Gets a temporary file name. * * @param {(Options|tmpNameCallback)} options options or callback * @param {?tmpNameCallback} callback the callback function */ function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; try { _assertAndSanitizeOptions(opts); } catch (err) { return cb(err); } let tries = opts.tries; (function _getUniqueName() { try { const name = _generateTmpName(opts); // check whether the path exists then retry if needed fs.stat(name, function (err) { /* istanbul ignore else */ if (!err) { /* istanbul ignore else */ if (tries-- > 0) return _getUniqueName(); return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name)); } cb(null, name); }); } catch (err) { cb(err); } }()); } /** * Synchronous version of tmpName. * * @param {Object} options * @returns {string} the generated random name * @throws {Error} if the options are invalid or could not generate a filename */ function tmpNameSync(options) { const args = _parseArguments(options), opts = args[0]; _assertAndSanitizeOptions(opts); let tries = opts.tries; do { const name = _generateTmpName(opts); try { fs.statSync(name); } catch (e) { return name; } } while (tries-- > 0); throw new Error('Could not get a unique tmp filename, max tries reached'); } /** * Creates and opens a temporary file. * * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined * @param {?fileCallback} callback */ function file(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; // gets a temporary filename tmpName(opts, function _tmpNameCreated(err, name) { /* istanbul ignore else */ if (err) return cb(err); // create and open the file fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { /* istanbu ignore else */ if (err) return cb(err); if (opts.discardDescriptor) { return fs.close(fd, function _discardCallback(possibleErr) { // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care // about the descriptor const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); } }); }); } /** * Synchronous version of file. * * @param {Options} options * @returns {FileSyncObject} object consists of name, fd and removeCallback * @throws {Error} if cannot create a file */ function fileSync(options) { const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); /* istanbul ignore else */ if (opts.discardDescriptor) { fs.closeSync(fd); fd = undefined; } return { name: name, fd: fd, removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) }; } /** * Creates a temporary directory. * * @param {(Options|dirCallback)} options the options or the callback function * @param {?dirCallback} callback */ function dir(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; // gets a temporary filename tmpName(opts, function _tmpNameCreated(err, name) { /* istanbul ignore else */ if (err) return cb(err); // create the directory fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) { /* istanbul ignore else */ if (err) return cb(err); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); }); } /** * Synchronous version of dir. * * @param {Options} options * @returns {DirSyncObject} object consists of name and removeCallback * @throws {Error} if it cannot create a directory */ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); fs.mkdirSync(name, opts.mode || DIR_MODE); return { name: name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) }; } /** * Removes files asynchronously. * * @param {Object} fdPath * @param {Function} next * @private */ function _removeFileAsync(fdPath, next) { const _handler = function (err) { if (err && !_isENOENT(err)) { // reraise any unanticipated error return next(err); } next(); }; if (0 <= fdPath[0]) fs.close(fdPath[0], function () { fs.unlink(fdPath[1], _handler); }); else fs.unlink(fdPath[1], _handler); } /** * Removes files synchronously. * * @param {Object} fdPath * @private */ function _removeFileSync(fdPath) { let rethrownException = null; try { if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); } catch (e) { // reraise any unanticipated error if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { fs.unlinkSync(fdPath[1]); } catch (e) { // reraise any unanticipated error if (!_isENOENT(e)) rethrownException = e; } } if (rethrownException !== null) { throw rethrownException; } } /** * Prepares the callback for removal of the temporary file. * * Returns either a sync callback or a async callback depending on whether * fileSync or file was called, which is expressed by the sync parameter. * * @param {string} name the path of the file * @param {number} fd file descriptor * @param {Object} opts * @param {boolean} sync * @returns {fileCallback | fileCallbackSync} * @private */ function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } /** * Prepares the callback for removal of the temporary directory. * * Returns either a sync callback or a async callback depending on whether * tmpFileSync or tmpFile was called, which is expressed by the sync parameter. * * @param {string} name * @param {Object} opts * @param {boolean} sync * @returns {Function} the callback * @private */ function _prepareTmpDirRemoveCallback(name, opts, sync) { const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } /** * Creates a guarded function wrapping the removeFunction call. * * The cleanup callback is save to be called multiple times. * Subsequent invocations will be ignored. * * @param {Function} removeFunction * @param {string} fileOrDirName * @param {boolean} sync * @param {cleanupCallbackSync?} cleanupCallbackSync * @returns {cleanupCallback | cleanupCallbackSync} * @private */ function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { let called = false; // if sync is true, the next parameter will be ignored return function _cleanupCallback(next) { /* istanbul ignore else */ if (!called) { // remove cleanupCallback from cache const toRemove = cleanupCallbackSync || _cleanupCallback; const index = _removeObjects.indexOf(toRemove); /* istanbul ignore else */ if (index >= 0) _removeObjects.splice(index, 1); called = true; if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { return removeFunction(fileOrDirName); } else { return removeFunction(fileOrDirName, next || function() {}); } } }; } /** * The garbage collector. * * @private */ function _garbageCollector() { /* istanbul ignore else */ if (!_gracefulCleanup) return; // the function being called removes itself from _removeObjects, // loop until _removeObjects is empty while (_removeObjects.length) { try { _removeObjects[0](); } catch (e) { // already removed? } } } /** * Random name generator based on crypto. * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript * * @param {number} howMany * @returns {string} the generated random name * @private */ function _randomChars(howMany) { let value = [], rnd = null; // make sure that we do not fail because we ran out of entropy try { rnd = crypto.randomBytes(howMany); } catch (e) { rnd = crypto.pseudoRandomBytes(howMany); } for (var i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); } return value.join(''); } /** * Helper which determines whether a string s is blank, that is undefined, or empty or null. * * @private * @param {string} s * @returns {Boolean} true whether the string s is blank, false otherwise */ function _isBlank(s) { return s === null || _isUndefined(s) || !s.trim(); } /** * Checks whether the `obj` parameter is defined or not. * * @param {Object} obj * @returns {boolean} true if the object is undefined * @private */ function _isUndefined(obj) { return typeof obj === 'undefined'; } /** * Parses the function arguments. * * This function helps to have optional arguments. * * @param {(Options|null|undefined|Function)} options * @param {?Function} callback * @returns {Array} parsed arguments * @private */ function _parseArguments(options, callback) { /* istanbul ignore else */ if (typeof options === 'function') { return [{}, options]; } /* istanbul ignore else */ if (_isUndefined(options)) { return [{}, callback]; } // copy options so we do not leak the changes we make internally const actualOptions = {}; for (const key of Object.getOwnPropertyNames(options)) { actualOptions[key] = options[key]; } return [actualOptions, callback]; } /** * Generates a new temporary name. * * @param {Object} opts * @returns {string} the new random name according to opts * @private */ function _generateTmpName(opts) { const tmpDir = opts.tmpdir; /* istanbul ignore else */ if (!_isUndefined(opts.name)) return path.join(tmpDir, opts.dir, opts.name); /* istanbul ignore else */ if (!_isUndefined(opts.template)) return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); // prefix and postfix const name = [ opts.prefix ? opts.prefix : 'tmp', '-', process.pid, '-', _randomChars(12), opts.postfix ? '-' + opts.postfix : '' ].join(''); return path.join(tmpDir, opts.dir, name); } /** * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing * options. * * @param {Options} options * @private */ function _assertAndSanitizeOptions(options) { options.tmpdir = _getTmpDir(options); const tmpDir = options.tmpdir; /* istanbul ignore else */ if (!_isUndefined(options.name)) _assertIsRelative(options.name, 'name', tmpDir); /* istanbul ignore else */ if (!_isUndefined(options.dir)) _assertIsRelative(options.dir, 'dir', tmpDir); /* istanbul ignore else */ if (!_isUndefined(options.template)) { _assertIsRelative(options.template, 'template', tmpDir); if (!options.template.match(TEMPLATE_PATTERN)) throw new Error(`Invalid template, found "${options.template}".`); } /* istanbul ignore else */ if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) throw new Error(`Invalid tries, found "${options.tries}".`); // if a name was specified we will try once options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; options.keep = !!options.keep; options.detachDescriptor = !!options.detachDescriptor; options.discardDescriptor = !!options.discardDescriptor; options.unsafeCleanup = !!options.unsafeCleanup; // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir)); options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir)); // sanitize further if template is relative to options.dir options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template); // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to options.name = _isUndefined(options.name) ? undefined : _sanitizeName(options.name); options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; } /** * Resolve the specified path name in respect to tmpDir. * * The specified name might include relative path components, e.g. ../ * so we need to resolve in order to be sure that is is located inside tmpDir * * @param name * @param tmpDir * @returns {string} * @private */ function _resolvePath(name, tmpDir) { const sanitizedName = _sanitizeName(name); if (sanitizedName.startsWith(tmpDir)) { return path.resolve(sanitizedName); } else { return path.resolve(path.join(tmpDir, sanitizedName)); } } /** * Sanitize the specified path name by removing all quote characters. * * @param name * @returns {string} * @private */ function _sanitizeName(name) { if (_isBlank(name)) { return name; } return name.replace(/["']/g, ''); } /** * Asserts whether specified name is relative to the specified tmpDir. * * @param {string} name * @param {string} option * @param {string} tmpDir * @throws {Error} * @private */ function _assertIsRelative(name, option, tmpDir) { if (option === 'name') { // assert that name is not absolute and does not contain a path if (path.isAbsolute(name)) throw new Error(`${option} option must not contain an absolute path, found "${name}".`); // must not fail on valid . or .. or similar such constructs let basename = path.basename(name); if (basename === '..' || basename === '.' || basename !== name) throw new Error(`${option} option must not contain a path, found "${name}".`); } else { // if (option === 'dir' || option === 'template') { // assert that dir or template are relative to tmpDir if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); } let resolvedPath = _resolvePath(name, tmpDir); if (!resolvedPath.startsWith(tmpDir)) throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); } } /** * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows. * * @private */ function _isEBADF(error) { return _isExpectedError(error, -EBADF, 'EBADF'); } /** * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows. * * @private */ function _isENOENT(error) { return _isExpectedError(error, -ENOENT, 'ENOENT'); } /** * Helper to determine whether the expected error code matches the actual code and errno, * which will differ between the supported node versions. * * - Node >= 7.0: * error.code {string} * error.errno {number} any numerical value will be negated * * CAVEAT * * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT * is no different here. * * @param {SystemError} error * @param {number} errno * @param {string} code * @private */ function _isExpectedError(error, errno, code) { return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; } /** * Sets the graceful cleanup. * * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary * object removals. */ function setGracefulCleanup() { _gracefulCleanup = true; } /** * Returns the currently configured tmp dir from os.tmpdir(). * * @private * @param {?Options} options * @returns {string} the currently configured tmp dir */ function _getTmpDir(options) { return path.resolve(_sanitizeName(options && options.tmpdir || os.tmpdir())); } // Install process exit listener process.addListener(EXIT, _garbageCollector); /** * Configuration options. * * @typedef {Object} Options * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected * @property {?number} tries the number of tries before give up the name generation * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files * @property {?string} template the "mkstemp" like filename template * @property {?string} name fixed name relative to tmpdir or the specified dir option * @property {?string} dir tmp directory relative to the root tmp directory in use * @property {?string} prefix prefix for the generated name * @property {?string} postfix postfix for the generated name * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection */ /** * @typedef {Object} FileSyncObject * @property {string} name the name of the file * @property {string} fd the file descriptor or -1 if the fd has been discarded * @property {fileCallback} removeCallback the callback function to remove the file */ /** * @typedef {Object} DirSyncObject * @property {string} name the name of the directory * @property {fileCallback} removeCallback the callback function to remove the directory */ /** * @callback tmpNameCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name */ /** * @callback fileCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {number} fd the file descriptor or -1 if the fd had been discarded * @param {cleanupCallback} fn the cleanup callback function */ /** * @callback fileCallbackSync * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {number} fd the file descriptor or -1 if the fd had been discarded * @param {cleanupCallbackSync} fn the cleanup callback function */ /** * @callback dirCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {cleanupCallback} fn the cleanup callback function */ /** * @callback dirCallbackSync * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name * @param {cleanupCallbackSync} fn the cleanup callback function */ /** * Removes the temporary created file or directory. * * @callback cleanupCallback * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed */ /** * Removes the temporary created file or directory. * * @callback cleanupCallbackSync */ /** * Callback function for function composition. * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57} * * @callback simpleCallback */ // exporting all the needed methods // evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will // allow users to reconfigure the temporary directory Object.defineProperty(module.exports, "tmpdir", ({ enumerable: true, configurable: false, get: function () { return _getTmpDir(); } })); module.exports.dir = dir; module.exports.dirSync = dirSync; module.exports.file = file; module.exports.fileSync = fileSync; module.exports.tmpName = tmpName; module.exports.tmpNameSync = tmpNameSync; module.exports.setGracefulCleanup = setGracefulCleanup; /***/ }), /***/ 88395: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.copyElixirCodeToTempDir = void 0; // This file was mostly copied from snyk-python-plugin and its purpose it to support the homebrew package const fs = __webpack_require__(35747); const path = __webpack_require__(85287); const tmp = __webpack_require__(36276); function copyElixirCodeToTempDir() { const tmpDir = tmp.dirSync({ unsafeCleanup: true }); dumpAllFilesInTempDir(tmpDir.name); return tmpDir; } exports.copyElixirCodeToTempDir = copyElixirCodeToTempDir; function dumpAllFilesInTempDir(tempDirName) { createAssets().forEach((currentReadFilePath) => { if (!fs.existsSync(currentReadFilePath)) { throw new Error('The file `' + currentReadFilePath + '` is missing'); } const relFilePathToDumpDir = getFilePathRelativeToDumpDir(currentReadFilePath); const writeFilePath = path.join(tempDirName, relFilePathToDumpDir); const contents = fs.readFileSync(currentReadFilePath, 'utf8'); writeFile(writeFilePath, contents); }); } function createAssets() { return [ path.join(__dirname, '../elixirsrc/mix.exs'), path.join(__dirname, '../elixirsrc/mix.lock'), path.join(__dirname, '../elixirsrc/lib/mix/tasks/read.mix.ex'), path.join(__dirname, '../elixirsrc/lib/json/mix.exs'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/encoder.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/logger.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/decoder.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/encoder/default_implementations.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/encoder/errors.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/encoder/helpers.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser/number.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser/object.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser/unicode.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser/string.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser/array.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json/parser.ex'), path.join(__dirname, '../elixirsrc/lib/json/lib/json.ex'), path.join(__dirname, '../elixirsrc/lib/json/.formatter.exs'), path.join(__dirname, '../elixirsrc/lib/common.ex'), path.join(__dirname, '../elixirsrc/lib/mix_project.ex'), ]; } function getFilePathRelativeToDumpDir(filePath) { let pathParts = filePath.split('\\elixirsrc\\'); // Windows if (pathParts.length > 1) { return pathParts[1]; } // Unix pathParts = filePath.split('/elixirsrc/'); return pathParts[1]; } function writeFile(writeFilePath, contents) { const dirPath = path.dirname(writeFilePath); if (!fs.existsSync(dirPath)) { fs.mkdirSync(dirPath, { recursive: true }); } fs.writeFileSync(writeFilePath, contents); } //# sourceMappingURL=copy-elixir-code-to-temp-dir.js.map /***/ }), /***/ 39410: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.init = exports.debug = void 0; const debugLib = __webpack_require__(15158); const PLUGIN_NAME = 'snyk-hex-plugin'; exports.debug = debugLib(PLUGIN_NAME); function init(enable = false) { enable ? debugLib.enable(PLUGIN_NAME) : debugLib.disable(); } exports.init = init; //# sourceMappingURL=debug.js.map /***/ }), /***/ 1649: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var scan_1 = __webpack_require__(3113); Object.defineProperty(exports, "scan", ({ enumerable: true, get: function () { return scan_1.scan; } })); var inspect_1 = __webpack_require__(12442); Object.defineProperty(exports, "inspect", ({ enumerable: true, get: function () { return inspect_1.inspect; } })); //# sourceMappingURL=index.js.map /***/ }), /***/ 12442: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.inspect = void 0; const subProcess = __webpack_require__(21977); const scan_1 = __webpack_require__(3113); const PLUGIN_NAME = 'snyk-hex-plugin'; async function inspect(root, targetFile, options = {}) { const { debug, dev, allProjects, 'project-name': projectName } = options; const [scanResult, pluginVersion] = await Promise.all([ scan_1.scan({ debug, dev, allProjects, projectName, path: root, targetFile }), getPluginVersion(), ]); const scannedProjects = scanResult.scanResults.map(({ identity, facts: [{ data: depGraph }], name }) => ({ packageManager: 'hex', targetFile: identity.targetFile, depGraph, ...(name ? { meta: { projectName: name } } : {}), })); return { plugin: { name: PLUGIN_NAME, runtime: pluginVersion, targetFile: 'mix.exs', }, scannedProjects, }; } exports.inspect = inspect; async function getPluginVersion() { const output = await subProcess.execute('mix', ['-v']); const versionMatch = /(Mix\s\d+\.\d+\.\d*)/.exec(output); return versionMatch ? versionMatch[0] : 'Unknown version'; } //# sourceMappingURL=inspect.js.map /***/ }), /***/ 3113: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.scan = void 0; const path = __webpack_require__(85287); const fs = __webpack_require__(35747); const mix_parser_1 = __webpack_require__(72559); const subProcess = __webpack_require__(21977); const debug_1 = __webpack_require__(39410); const copy_elixir_code_to_temp_dir_1 = __webpack_require__(88395); const MANIFEST_FILE_NAME = 'mix.exs'; async function scan(options) { debug_1.init(options.debug); const targetFile = path.parse(path.resolve(options.path, options.targetFile || MANIFEST_FILE_NAME)); if (targetFile.base !== MANIFEST_FILE_NAME) { throw new Error("target file must be 'mix.exs'."); } await verifyMixInstalled(); const mixResult = await getMixResult(targetFile.dir); const depGraphMap = mix_parser_1.buildDepGraphs(mixResult, !!options.dev, true, options.allProjects); const scanResults = Object.entries(depGraphMap).map(([name, depGraph], index) => { const isRoot = index === 0; const relativePathToManifest = getRelativePathToManifest(options, targetFile, isRoot, name); return { identity: { type: 'hex', targetFile: relativePathToManifest, }, facts: [ { type: 'depGraph', data: depGraph, }, ], ...(options.projectName ? { name: getProjectNamePath(options, relativePathToManifest) } : {}), }; }); return { scanResults }; } exports.scan = scan; async function verifyMixInstalled() { try { const mixVersion = await subProcess.execute('mix', ['-v']); debug_1.debug(`mix version: `, mixVersion); } catch (_a) { throw new Error('mix is not installed. please make sure Elixir is installed and try again.'); } } async function getMixResult(root) { const elixirTmpDir = copy_elixir_code_to_temp_dir_1.copyElixirCodeToTempDir(); const cwd = elixirTmpDir.name; let filePath; try { const output = await subProcess.execute('mix', ['read.mix', root], { cwd }); debug_1.debug(`read.mix output: ${output}`); const fileName = output.trim().split('\n').pop(); debug_1.debug(`fileName: ${fileName}`); filePath = path.resolve(cwd, fileName); const result = (await fs.promises.readFile(filePath, 'utf8')); return JSON.parse(result); } catch (err) { const errorMessage = `Error parsing manifest file on ${root}`; debug_1.debug(errorMessage, err); throw new Error(errorMessage); } finally { try { elixirTmpDir.removeCallback(); } catch (err) { debug_1.debug(`can't remove ${elixirTmpDir.name}`, err); } } } function normalizePath(filePath) { const parts = filePath.split(path.sep); return parts.join(path.posix.sep); } function getRelativePathToManifest(options, targetFile, isRoot, name) { return normalizePath(path.relative(options.path, path.resolve(targetFile.dir, isRoot ? '' : name, targetFile.base))); } function getProjectNamePath(options, relativePathToManifest) { return [ options.projectName, ...relativePathToManifest.split('/').slice(0, -1), ].join('/'); } //# sourceMappingURL=scan.js.map /***/ }), /***/ 21977: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execute = void 0; const childProcess = __webpack_require__(63129); const debug_1 = __webpack_require__(39410); function execute(command, args, options) { debug_1.debug(`running "${command} ${args.join(' ')}"`); const spawnOptions = { shell: true }; if (options && options.cwd) { spawnOptions.cwd = options.cwd; } return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; const proc = childProcess.spawn(command, args, spawnOptions); proc.stdout.on('data', (data) => { stdout = stdout + data; }); proc.stderr.on('data', (data) => { stderr = stderr + data; }); proc.on('close', (code) => { if (code !== 0) { debug_1.debug(`Error running "${command} ${args.join(' ')}", exit code: ${code}`); return reject(stdout || stderr); } debug_1.debug(`Sub process stderr:`, stderr); resolve(stdout || stderr); }); }); } exports.execute = execute; //# sourceMappingURL=sub-process.js.map /***/ }), /***/ 60081: /***/ ((module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const defer_to_connect_1 = __webpack_require__(1313); const util_1 = __webpack_require__(31669); const nodejsMajorVersion = Number(process.versions.node.split('.')[0]); const timer = (request) => { if (request.timings) { return request.timings; } const timings = { start: Date.now(), socket: undefined, lookup: undefined, connect: undefined, secureConnect: undefined, upload: undefined, response: undefined, end: undefined, error: undefined, abort: undefined, phases: { wait: undefined, dns: undefined, tcp: undefined, tls: undefined, request: undefined, firstByte: undefined, download: undefined, total: undefined } }; request.timings = timings; const handleError = (origin) => { const emit = origin.emit.bind(origin); origin.emit = (event, ...args) => { // Catches the `error` event if (event === 'error') { timings.error = Date.now(); timings.phases.total = timings.error - timings.start; origin.emit = emit; } // Saves the original behavior return emit(event, ...args); }; }; handleError(request); const onAbort = () => { timings.abort = Date.now(); // Let the `end` response event be responsible for setting the total phase, // unless the Node.js major version is >= 13. if (!timings.response || nodejsMajorVersion >= 13) { timings.phases.total = Date.now() - timings.start; } }; request.prependOnceListener('abort', onAbort); const onSocket = (socket) => { timings.socket = Date.now(); timings.phases.wait = timings.socket - timings.start; if (util_1.types.isProxy(socket)) { return; } const lookupListener = () => { timings.lookup = Date.now(); timings.phases.dns = timings.lookup - timings.socket; }; socket.prependOnceListener('lookup', lookupListener); defer_to_connect_1.default(socket, { connect: () => { timings.connect = Date.now(); if (timings.lookup === undefined) { socket.removeListener('lookup', lookupListener); timings.lookup = timings.connect; timings.phases.dns = timings.lookup - timings.socket; } timings.phases.tcp = timings.connect - timings.lookup; // This callback is called before flushing any data, // so we don't need to set `timings.phases.request` here. }, secureConnect: () => { timings.secureConnect = Date.now(); timings.phases.tls = timings.secureConnect - timings.connect; } }); }; if (request.socket) { onSocket(request.socket); } else { request.prependOnceListener('socket', onSocket); } const onUpload = () => { var _a; timings.upload = Date.now(); timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect); }; const writableFinished = () => { if (typeof request.writableFinished === 'boolean') { return request.writableFinished; } // Node.js doesn't have `request.writableFinished` property return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0); }; if (writableFinished()) { onUpload(); } else { request.prependOnceListener('finish', onUpload); } request.prependOnceListener('response', (response) => { timings.response = Date.now(); timings.phases.firstByte = timings.response - timings.upload; response.timings = timings; handleError(response); response.prependOnceListener('end', () => { timings.end = Date.now(); timings.phases.download = timings.end - timings.response; timings.phases.total = timings.end - timings.start; }); response.prependOnceListener('aborted', onAbort); }); return timings; }; exports.default = timer; // For CommonJS default export support module.exports = timer; module.exports.default = timer; /***/ }), /***/ 19552: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Cache = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const fslib_2 = __webpack_require__(91794); const libzip_1 = __webpack_require__(40364); const fs_1 = tslib_1.__importDefault(__webpack_require__(35747)); const MessageName_1 = __webpack_require__(62755); const Report_1 = __webpack_require__(50334); const hashUtils = tslib_1.__importStar(__webpack_require__(73279)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const CACHE_VERSION = 7; class Cache { constructor(cacheCwd, { configuration, immutable = configuration.get(`enableImmutableCache`), check = false }) { // Contains the list of cache files that got accessed since the last time // you cleared the variable. Useful to know which files aren't needed // anymore when used in conjunction with fetchEverything. this.markedFiles = new Set(); this.mutexes = new Map(); this.configuration = configuration; this.cwd = cacheCwd; this.immutable = immutable; this.check = check; const cacheKeyOverride = configuration.get(`cacheKeyOverride`); if (cacheKeyOverride !== null) { this.cacheKey = `${cacheKeyOverride}`; } else { const compressionLevel = configuration.get(`compressionLevel`); const compressionKey = compressionLevel !== fslib_2.DEFAULT_COMPRESSION_LEVEL ? `c${compressionLevel}` : ``; this.cacheKey = [ CACHE_VERSION, compressionKey, ].join(``); } } static async find(configuration, { immutable, check } = {}) { const cache = new Cache(configuration.get(`cacheFolder`), { configuration, immutable, check }); await cache.setup(); return cache; } get mirrorCwd() { if (!this.configuration.get(`enableMirror`)) return null; const mirrorCwd = `${this.configuration.get(`globalFolder`)}/cache`; return mirrorCwd !== this.cwd ? mirrorCwd : null; } getVersionFilename(locator) { return `${structUtils.slugifyLocator(locator)}-${this.cacheKey}.zip`; } getChecksumFilename(locator, checksum) { // We only want the actual checksum (not the cache version, since the whole // point is to avoid changing the filenames when the cache version changes) const contentChecksum = getHashComponent(checksum); // We only care about the first few characters. It doesn't matter if that // makes the hash easier to collide with, because we check the file hashes // during each install anyway. const significantChecksum = contentChecksum.slice(0, 10); return `${structUtils.slugifyLocator(locator)}-${significantChecksum}.zip`; } getLocatorPath(locator, expectedChecksum) { // If there is no mirror, then the local cache *is* the mirror, in which // case we use the versioned filename pattern. if (this.mirrorCwd === null) return fslib_2.ppath.resolve(this.cwd, this.getVersionFilename(locator)); // If we don't yet know the checksum, discard the path resolution for now // until the checksum can be obtained from somewhere (mirror or network). if (expectedChecksum === null) return null; // If the cache key changed then we assume that the content probably got // altered as well and thus the existing path won't be good enough anymore. const cacheKey = getCacheKeyComponent(expectedChecksum); if (cacheKey !== this.cacheKey) return null; return fslib_2.ppath.resolve(this.cwd, this.getChecksumFilename(locator, expectedChecksum)); } getLocatorMirrorPath(locator) { const mirrorCwd = this.mirrorCwd; return mirrorCwd !== null ? fslib_2.ppath.resolve(mirrorCwd, this.getVersionFilename(locator)) : null; } async setup() { if (!this.configuration.get(`enableGlobalCache`)) { await fslib_2.xfs.mkdirPromise(this.cwd, { recursive: true }); const gitignorePath = fslib_2.ppath.resolve(this.cwd, `.gitignore`); await fslib_2.xfs.changeFilePromise(gitignorePath, `/.gitignore\n*.flock\n`); } } async fetchPackageFromCache(locator, expectedChecksum, { onHit, onMiss, loader, skipIntegrityCheck }) { const mirrorPath = this.getLocatorMirrorPath(locator); const baseFs = new fslib_1.NodeFS(); const validateFile = async (path, refetchPath = null) => { const actualChecksum = (!skipIntegrityCheck || !expectedChecksum) ? `${this.cacheKey}/${await hashUtils.checksumFile(path)}` : expectedChecksum; if (refetchPath !== null) { const previousChecksum = (!skipIntegrityCheck || !expectedChecksum) ? `${this.cacheKey}/${await hashUtils.checksumFile(refetchPath)}` : expectedChecksum; if (actualChecksum !== previousChecksum) { throw new Report_1.ReportError(MessageName_1.MessageName.CACHE_CHECKSUM_MISMATCH, `The remote archive doesn't match the local checksum - has the local cache been corrupted?`); } } if (expectedChecksum !== null && actualChecksum !== expectedChecksum) { let checksumBehavior; // Using --check-cache overrides any preconfigured checksum behavior if (this.check) checksumBehavior = `throw`; // If the lockfile references an old cache format, we tolerate different checksums else if (getCacheKeyComponent(expectedChecksum) !== getCacheKeyComponent(actualChecksum)) checksumBehavior = `update`; else checksumBehavior = this.configuration.get(`checksumBehavior`); switch (checksumBehavior) { case `ignore`: return expectedChecksum; case `update`: return actualChecksum; default: case `throw`: { throw new Report_1.ReportError(MessageName_1.MessageName.CACHE_CHECKSUM_MISMATCH, `The remote archive doesn't match the expected checksum`); } } } return actualChecksum; }; const validateFileAgainstRemote = async (cachePath) => { if (!loader) throw new Error(`Cache check required but no loader configured for ${structUtils.prettyLocator(this.configuration, locator)}`); const zipFs = await loader(); const refetchPath = zipFs.getRealPath(); zipFs.saveAndClose(); await fslib_2.xfs.chmodPromise(refetchPath, 0o644); return await validateFile(cachePath, refetchPath); }; const loadPackageThroughMirror = async () => { if (mirrorPath === null || !(await fslib_2.xfs.existsPromise(mirrorPath))) { const zipFs = await loader(); const realPath = zipFs.getRealPath(); zipFs.saveAndClose(); return realPath; } const tempDir = await fslib_2.xfs.mktempPromise(); const tempPath = fslib_2.ppath.join(tempDir, this.getVersionFilename(locator)); await fslib_2.xfs.copyFilePromise(mirrorPath, tempPath, fs_1.default.constants.COPYFILE_FICLONE); return tempPath; }; const loadPackage = async () => { if (!loader) throw new Error(`Cache entry required but missing for ${structUtils.prettyLocator(this.configuration, locator)}`); if (this.immutable) throw new Report_1.ReportError(MessageName_1.MessageName.IMMUTABLE_CACHE, `Cache entry required but missing for ${structUtils.prettyLocator(this.configuration, locator)}`); const originalPath = await loadPackageThroughMirror(); await fslib_2.xfs.chmodPromise(originalPath, 0o644); // Do this before moving the file so that we don't pollute the cache with corrupted archives const checksum = await validateFile(originalPath); const cachePath = this.getLocatorPath(locator, checksum); if (!cachePath) throw new Error(`Assertion failed: Expected the cache path to be available`); return await this.writeFileWithLock(cachePath, async () => { return await this.writeFileWithLock(mirrorPath, async () => { // Doing a move is important to ensure atomic writes (todo: cross-drive?) await fslib_2.xfs.movePromise(originalPath, cachePath); if (mirrorPath !== null) await fslib_2.xfs.copyFilePromise(cachePath, mirrorPath, fs_1.default.constants.COPYFILE_FICLONE); return [cachePath, checksum]; }); }); }; const loadPackageThroughMutex = async () => { const mutexedLoad = async () => { // We don't yet know whether the cache path can be computed yet, since that // depends on whether the cache is actually the mirror or not, and whether // the checksum is known or not. const tentativeCachePath = this.getLocatorPath(locator, expectedChecksum); const cacheExists = tentativeCachePath !== null ? await baseFs.existsPromise(tentativeCachePath) : false; const action = cacheExists ? onHit : onMiss; if (action) action(); if (!cacheExists) { return loadPackage(); } else { let checksum = null; const cachePath = tentativeCachePath; if (this.check) checksum = await validateFileAgainstRemote(cachePath); else checksum = await validateFile(cachePath); return [cachePath, checksum]; } }; const mutex = mutexedLoad(); this.mutexes.set(locator.locatorHash, mutex); try { return await mutex; } finally { this.mutexes.delete(locator.locatorHash); } }; for (let mutex; (mutex = this.mutexes.get(locator.locatorHash));) await mutex; const [cachePath, checksum] = await loadPackageThroughMutex(); this.markedFiles.add(cachePath); let zipFs = null; const libzip = await libzip_1.getLibzipPromise(); const lazyFs = new fslib_1.LazyFS(() => miscUtils.prettifySyncErrors(() => { return zipFs = new fslib_1.ZipFS(cachePath, { baseFs, libzip, readOnly: true }); }, message => { return `Failed to open the cache entry for ${structUtils.prettyLocator(this.configuration, locator)}: ${message}`; }), fslib_2.ppath); // We use an AliasFS to speed up getRealPath calls (e.g. VirtualFetcher.ensureVirtualLink) // (there's no need to create the lazy baseFs instance to gather the already-known cachePath) const aliasFs = new fslib_1.AliasFS(cachePath, { baseFs: lazyFs, pathUtils: fslib_2.ppath }); const releaseFs = () => { if (zipFs !== null) { zipFs.discardAndClose(); } }; return [aliasFs, releaseFs, checksum]; } async writeFileWithLock(file, generator) { if (file === null) return await generator(); await fslib_2.xfs.mkdirPromise(fslib_2.ppath.dirname(file), { recursive: true }); return await fslib_2.xfs.lockPromise(file, async () => { return await generator(); }); } } exports.Cache = Cache; function getCacheKeyComponent(checksum) { const split = checksum.indexOf(`/`); return split !== -1 ? checksum.slice(0, split) : null; } function getHashComponent(checksum) { const split = checksum.indexOf(`/`); return split !== -1 ? checksum.slice(split + 1) : checksum; } /***/ }), /***/ 62889: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Configuration = exports.ProjectLookup = exports.coreDefinitions = exports.FormatType = exports.SettingsType = exports.SECRET = exports.DEFAULT_LOCK_FILENAME = exports.DEFAULT_RC_FILENAME = exports.ENVIRONMENT_PREFIX = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const fslib_2 = __webpack_require__(91794); const parsers_1 = __webpack_require__(21717); const camelcase_1 = tslib_1.__importDefault(__webpack_require__(35399)); const ci_info_1 = __webpack_require__(8288); const clipanion_1 = __webpack_require__(87730); const p_limit_1 = tslib_1.__importDefault(__webpack_require__(94498)); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const stream_1 = __webpack_require__(92413); const CorePlugin_1 = __webpack_require__(78101); const Manifest_1 = __webpack_require__(11658); const MultiFetcher_1 = __webpack_require__(74441); const MultiResolver_1 = __webpack_require__(54123); const ProtocolResolver_1 = __webpack_require__(6729); const VirtualFetcher_1 = __webpack_require__(7100); const VirtualResolver_1 = __webpack_require__(55605); const WorkspaceFetcher_1 = __webpack_require__(2925); const WorkspaceResolver_1 = __webpack_require__(83740); const folderUtils = tslib_1.__importStar(__webpack_require__(13061)); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const nodeUtils = tslib_1.__importStar(__webpack_require__(83825)); const semverUtils = tslib_1.__importStar(__webpack_require__(51201)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const types_1 = __webpack_require__(79588); const IGNORED_ENV_VARIABLES = new Set([ // "binFolder" is the magic location where the parent process stored the // current binaries; not an actual configuration settings `binFolder`, // "version" is set by Docker: // https://github.com/nodejs/docker-node/blob/5a6a5e91999358c5b04fddd6c22a9a4eb0bf3fbf/10/alpine/Dockerfile#L51 `version`, // "flags" is set by Netlify; they use it to specify the flags to send to the // CLI when running the automatic `yarn install` `flags`, // "gpg" and "profile" are used by the install.sh script: // https://classic.yarnpkg.com/install.sh `profile`, `gpg`, // "ignoreNode" is used to disable the Node version check `ignoreNode`, // "wrapOutput" was a variable used to indicate nested "yarn run" processes // back in Yarn 1. `wrapOutput`, ]); exports.ENVIRONMENT_PREFIX = `yarn_`; exports.DEFAULT_RC_FILENAME = `.yarnrc.yml`; exports.DEFAULT_LOCK_FILENAME = `yarn.lock`; exports.SECRET = `********`; var SettingsType; (function (SettingsType) { SettingsType["ANY"] = "ANY"; SettingsType["BOOLEAN"] = "BOOLEAN"; SettingsType["ABSOLUTE_PATH"] = "ABSOLUTE_PATH"; SettingsType["LOCATOR"] = "LOCATOR"; SettingsType["LOCATOR_LOOSE"] = "LOCATOR_LOOSE"; SettingsType["NUMBER"] = "NUMBER"; SettingsType["STRING"] = "STRING"; SettingsType["SECRET"] = "SECRET"; SettingsType["SHAPE"] = "SHAPE"; SettingsType["MAP"] = "MAP"; })(SettingsType = exports.SettingsType || (exports.SettingsType = {})); exports.FormatType = formatUtils.Type; // General rules: // // - filenames that don't accept actual paths must end with the "Filename" suffix // prefer to use absolute paths instead, since they are automatically resolved // ex: lockfileFilename // // - folders must end with the "Folder" suffix // ex: cacheFolder, pnpVirtualFolder // // - actual paths to a file must end with the "Path" suffix // ex: pnpPath // // - options that tweaks the strictness must begin with the "allow" prefix // ex: allowInvalidChecksums // // - options that enable a feature must begin with the "enable" prefix // ex: enableEmojis, enableColors exports.coreDefinitions = { // Not implemented for now, but since it's part of all Yarn installs we want to declare it in order to improve drop-in compatibility lastUpdateCheck: { description: `Last timestamp we checked whether new Yarn versions were available`, type: SettingsType.STRING, default: null, }, // Settings related to proxying all Yarn calls to a specific executable yarnPath: { description: `Path to the local executable that must be used over the global one`, type: SettingsType.ABSOLUTE_PATH, default: null, }, ignorePath: { description: `If true, the local executable will be ignored when using the global one`, type: SettingsType.BOOLEAN, default: false, }, ignoreCwd: { description: `If true, the \`--cwd\` flag will be ignored`, type: SettingsType.BOOLEAN, default: false, }, // Settings related to the package manager internal names cacheKeyOverride: { description: `A global cache key override; used only for test purposes`, type: SettingsType.STRING, default: null, }, globalFolder: { description: `Folder where are stored the system-wide settings`, type: SettingsType.ABSOLUTE_PATH, default: folderUtils.getDefaultGlobalFolder(), }, cacheFolder: { description: `Folder where the cache files must be written`, type: SettingsType.ABSOLUTE_PATH, default: `./.yarn/cache`, }, compressionLevel: { description: `Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)`, type: SettingsType.NUMBER, values: [`mixed`, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], default: fslib_2.DEFAULT_COMPRESSION_LEVEL, }, virtualFolder: { description: `Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)`, type: SettingsType.ABSOLUTE_PATH, default: `./.yarn/$$virtual`, }, bstatePath: { description: `Path of the file where the current state of the built packages must be stored`, type: SettingsType.ABSOLUTE_PATH, default: `./.yarn/build-state.yml`, }, lockfileFilename: { description: `Name of the files where the Yarn dependency tree entries must be stored`, type: SettingsType.STRING, default: exports.DEFAULT_LOCK_FILENAME, }, installStatePath: { description: `Path of the file where the install state will be persisted`, type: SettingsType.ABSOLUTE_PATH, default: `./.yarn/install-state.gz`, }, immutablePatterns: { description: `Array of glob patterns; files matching them won't be allowed to change during immutable installs`, type: SettingsType.STRING, default: [], isArray: true, }, rcFilename: { description: `Name of the files where the configuration can be found`, type: SettingsType.STRING, default: getRcFilename(), }, enableGlobalCache: { description: `If true, the system-wide cache folder will be used regardless of \`cache-folder\``, type: SettingsType.BOOLEAN, default: false, }, enableAbsoluteVirtuals: { description: `If true, the virtual symlinks will use absolute paths if required [non portable!!]`, type: SettingsType.BOOLEAN, default: false, }, // Settings related to the output style enableColors: { description: `If true, the CLI is allowed to use colors in its output`, type: SettingsType.BOOLEAN, default: formatUtils.supportsColor, defaultText: ``, }, enableHyperlinks: { description: `If true, the CLI is allowed to use hyperlinks in its output`, type: SettingsType.BOOLEAN, default: formatUtils.supportsHyperlinks, defaultText: ``, }, enableInlineBuilds: { description: `If true, the CLI will print the build output on the command line`, type: SettingsType.BOOLEAN, default: ci_info_1.isCI, defaultText: ``, }, enableProgressBars: { description: `If true, the CLI is allowed to show a progress bar for long-running events`, type: SettingsType.BOOLEAN, default: !ci_info_1.isCI && process.stdout.isTTY && process.stdout.columns > 22, defaultText: ``, }, enableTimers: { description: `If true, the CLI is allowed to print the time spent executing commands`, type: SettingsType.BOOLEAN, default: true, }, preferAggregateCacheInfo: { description: `If true, the CLI will only print a one-line report of any cache changes`, type: SettingsType.BOOLEAN, default: ci_info_1.isCI, }, preferInteractive: { description: `If true, the CLI will automatically use the interactive mode when called from a TTY`, type: SettingsType.BOOLEAN, default: false, }, preferTruncatedLines: { description: `If true, the CLI will truncate lines that would go beyond the size of the terminal`, type: SettingsType.BOOLEAN, default: false, }, progressBarStyle: { description: `Which style of progress bar should be used (only when progress bars are enabled)`, type: SettingsType.STRING, default: undefined, defaultText: ``, }, // Settings related to how packages are interpreted by default defaultLanguageName: { description: `Default language mode that should be used when a package doesn't offer any insight`, type: SettingsType.STRING, default: `node`, }, defaultProtocol: { description: `Default resolution protocol used when resolving pure semver and tag ranges`, type: SettingsType.STRING, default: `npm:`, }, enableTransparentWorkspaces: { description: `If false, Yarn won't automatically resolve workspace dependencies unless they use the \`workspace:\` protocol`, type: SettingsType.BOOLEAN, default: true, }, // Settings related to network access enableMirror: { description: `If true, the downloaded packages will be retrieved and stored in both the local and global folders`, type: SettingsType.BOOLEAN, default: true, }, enableNetwork: { description: `If false, the package manager will refuse to use the network if required to`, type: SettingsType.BOOLEAN, default: true, }, httpProxy: { description: `URL of the http proxy that must be used for outgoing http requests`, type: SettingsType.STRING, default: null, }, httpsProxy: { description: `URL of the http proxy that must be used for outgoing https requests`, type: SettingsType.STRING, default: null, }, unsafeHttpWhitelist: { description: `List of the hostnames for which http queries are allowed (glob patterns are supported)`, type: SettingsType.STRING, default: [], isArray: true, }, httpTimeout: { description: `Timeout of each http request in milliseconds`, type: SettingsType.NUMBER, default: 60000, }, httpRetry: { description: `Retry times on http failure`, type: SettingsType.NUMBER, default: 3, }, networkConcurrency: { description: `Maximal number of concurrent requests`, type: SettingsType.NUMBER, default: Infinity, }, networkSettings: { description: `Network settings per hostname (glob patterns are supported)`, type: SettingsType.MAP, valueDefinition: { description: ``, type: SettingsType.SHAPE, properties: { caFilePath: { description: `Path to file containing one or multiple Certificate Authority signing certificates`, type: SettingsType.ABSOLUTE_PATH, default: null, }, enableNetwork: { description: `If false, the package manager will refuse to use the network if required to`, type: SettingsType.BOOLEAN, default: null, }, httpProxy: { description: `URL of the http proxy that must be used for outgoing http requests`, type: SettingsType.STRING, default: null, }, httpsProxy: { description: `URL of the http proxy that must be used for outgoing https requests`, type: SettingsType.STRING, default: null, }, }, }, }, caFilePath: { description: `A path to a file containing one or multiple Certificate Authority signing certificates`, type: SettingsType.ABSOLUTE_PATH, default: null, }, enableStrictSsl: { description: `If false, SSL certificate errors will be ignored`, type: SettingsType.BOOLEAN, default: true, }, logFilters: { description: `Overrides for log levels`, type: SettingsType.SHAPE, isArray: true, concatenateValues: true, properties: { code: { description: `Code of the messages covered by this override`, type: SettingsType.STRING, default: undefined, }, text: { description: `Code of the texts covered by this override`, type: SettingsType.STRING, default: undefined, }, level: { description: `Log level override, set to null to remove override`, type: SettingsType.STRING, values: Object.values(formatUtils.LogLevel), isNullable: true, default: undefined, }, }, }, // Settings related to telemetry enableTelemetry: { description: `If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry`, type: SettingsType.BOOLEAN, default: true, }, telemetryInterval: { description: `Minimal amount of time between two telemetry uploads, in days`, type: SettingsType.NUMBER, default: 7, }, telemetryUserId: { description: `If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.`, type: SettingsType.STRING, default: null, }, // Settings related to security enableScripts: { description: `If true, packages are allowed to have install scripts by default`, type: SettingsType.BOOLEAN, default: true, }, enableImmutableCache: { description: `If true, the cache is reputed immutable and actions that would modify it will throw`, type: SettingsType.BOOLEAN, default: false, }, checksumBehavior: { description: `Enumeration defining what to do when a checksum doesn't match expectations`, type: SettingsType.STRING, default: `throw`, }, // Package patching - to fix incorrect definitions packageExtensions: { description: `Map of package corrections to apply on the dependency tree`, type: SettingsType.MAP, valueDefinition: { description: `The extension that will be applied to any package whose version matches the specified range`, type: SettingsType.SHAPE, properties: { dependencies: { description: `The set of dependencies that must be made available to the current package in order for it to work properly`, type: SettingsType.MAP, valueDefinition: { description: `A range`, type: SettingsType.STRING, }, }, peerDependencies: { description: `Inherited dependencies - the consumer of the package will be tasked to provide them`, type: SettingsType.MAP, valueDefinition: { description: `A semver range`, type: SettingsType.STRING, }, }, peerDependenciesMeta: { description: `Extra information related to the dependencies listed in the peerDependencies field`, type: SettingsType.MAP, valueDefinition: { description: `The peerDependency meta`, type: SettingsType.SHAPE, properties: { optional: { description: `If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error`, type: SettingsType.BOOLEAN, default: false, }, }, }, }, }, }, }, }; function parseValue(configuration, path, value, definition, folder) { if (definition.isArray) { if (!Array.isArray(value)) { return String(value).split(/,/).map(segment => { return parseSingleValue(configuration, path, segment, definition, folder); }); } else { return value.map((sub, i) => parseSingleValue(configuration, `${path}[${i}]`, sub, definition, folder)); } } else { if (Array.isArray(value)) { throw new Error(`Non-array configuration settings "${path}" cannot be an array`); } else { return parseSingleValue(configuration, path, value, definition, folder); } } } function parseSingleValue(configuration, path, value, definition, folder) { var _a; switch (definition.type) { case SettingsType.ANY: return value; case SettingsType.SHAPE: return parseShape(configuration, path, value, definition, folder); case SettingsType.MAP: return parseMap(configuration, path, value, definition, folder); } if (value === null && !definition.isNullable && definition.default !== null) throw new Error(`Non-nullable configuration settings "${path}" cannot be set to null`); if ((_a = definition.values) === null || _a === void 0 ? void 0 : _a.includes(value)) return value; const interpretValue = () => { if (definition.type === SettingsType.BOOLEAN) return miscUtils.parseBoolean(value); if (typeof value !== `string`) throw new Error(`Expected value (${value}) to be a string`); const valueWithReplacedVariables = miscUtils.replaceEnvVariables(value, { env: process.env, }); switch (definition.type) { case SettingsType.ABSOLUTE_PATH: return fslib_1.ppath.resolve(folder, fslib_1.npath.toPortablePath(valueWithReplacedVariables)); case SettingsType.LOCATOR_LOOSE: return structUtils.parseLocator(valueWithReplacedVariables, false); case SettingsType.NUMBER: return parseInt(valueWithReplacedVariables); case SettingsType.LOCATOR: return structUtils.parseLocator(valueWithReplacedVariables); default: return valueWithReplacedVariables; } }; const interpreted = interpretValue(); if (definition.values && !definition.values.includes(interpreted)) throw new Error(`Invalid value, expected one of ${definition.values.join(`, `)}`); return interpreted; } function parseShape(configuration, path, value, definition, folder) { if (typeof value !== `object` || Array.isArray(value)) throw new clipanion_1.UsageError(`Object configuration settings "${path}" must be an object`); const result = getDefaultValue(configuration, definition, { ignoreArrays: true, }); if (value === null) return result; for (const [propKey, propValue] of Object.entries(value)) { const subPath = `${path}.${propKey}`; const subDefinition = definition.properties[propKey]; if (!subDefinition) throw new clipanion_1.UsageError(`Unrecognized configuration settings found: ${path}.${propKey} - run "yarn config -v" to see the list of settings supported in Yarn`); result.set(propKey, parseValue(configuration, subPath, propValue, definition.properties[propKey], folder)); } return result; } function parseMap(configuration, path, value, definition, folder) { const result = new Map(); if (typeof value !== `object` || Array.isArray(value)) throw new clipanion_1.UsageError(`Map configuration settings "${path}" must be an object`); if (value === null) return result; for (const [propKey, propValue] of Object.entries(value)) { const normalizedKey = definition.normalizeKeys ? definition.normalizeKeys(propKey) : propKey; const subPath = `${path}['${normalizedKey}']`; // @ts-expect-error: SettingsDefinitionNoDefault has ... no default ... but // that's fine because we're guaranteed it's not undefined. const valueDefinition = definition.valueDefinition; result.set(normalizedKey, parseValue(configuration, subPath, propValue, valueDefinition, folder)); } return result; } function getDefaultValue(configuration, definition, { ignoreArrays = false } = {}) { switch (definition.type) { case SettingsType.SHAPE: { if (definition.isArray && !ignoreArrays) return []; const result = new Map(); for (const [propKey, propDefinition] of Object.entries(definition.properties)) result.set(propKey, getDefaultValue(configuration, propDefinition)); return result; } break; case SettingsType.MAP: { if (definition.isArray && !ignoreArrays) return []; return new Map(); } break; case SettingsType.ABSOLUTE_PATH: { if (definition.default === null) return null; if (configuration.projectCwd === null) { if (fslib_1.ppath.isAbsolute(definition.default)) { return fslib_1.ppath.normalize(definition.default); } else if (definition.isNullable) { return null; } else { // Reached when a relative path is the default but the current // context is evaluated outside of a Yarn project return undefined; } } else { if (Array.isArray(definition.default)) { return definition.default.map((entry) => fslib_1.ppath.resolve(configuration.projectCwd, entry)); } else { return fslib_1.ppath.resolve(configuration.projectCwd, definition.default); } } } break; default: { return definition.default; } break; } } function transformConfiguration(rawValue, definition, transforms) { if (definition.type === SettingsType.SECRET && typeof rawValue === `string` && transforms.hideSecrets) return exports.SECRET; if (definition.type === SettingsType.ABSOLUTE_PATH && typeof rawValue === `string` && transforms.getNativePaths) return fslib_1.npath.fromPortablePath(rawValue); if (definition.isArray && Array.isArray(rawValue)) { const newValue = []; for (const value of rawValue) newValue.push(transformConfiguration(value, definition, transforms)); return newValue; } if (definition.type === SettingsType.MAP && rawValue instanceof Map) { const newValue = new Map(); for (const [key, value] of rawValue.entries()) newValue.set(key, transformConfiguration(value, definition.valueDefinition, transforms)); return newValue; } if (definition.type === SettingsType.SHAPE && rawValue instanceof Map) { const newValue = new Map(); for (const [key, value] of rawValue.entries()) { const propertyDefinition = definition.properties[key]; newValue.set(key, transformConfiguration(value, propertyDefinition, transforms)); } return newValue; } return rawValue; } function getEnvironmentSettings() { const environmentSettings = {}; for (let [key, value] of Object.entries(process.env)) { key = key.toLowerCase(); if (!key.startsWith(exports.ENVIRONMENT_PREFIX)) continue; key = camelcase_1.default(key.slice(exports.ENVIRONMENT_PREFIX.length)); environmentSettings[key] = value; } return environmentSettings; } function getRcFilename() { const rcKey = `${exports.ENVIRONMENT_PREFIX}rc_filename`; for (const [key, value] of Object.entries(process.env)) if (key.toLowerCase() === rcKey && typeof value === `string`) return value; return exports.DEFAULT_RC_FILENAME; } var ProjectLookup; (function (ProjectLookup) { ProjectLookup[ProjectLookup["LOCKFILE"] = 0] = "LOCKFILE"; ProjectLookup[ProjectLookup["MANIFEST"] = 1] = "MANIFEST"; ProjectLookup[ProjectLookup["NONE"] = 2] = "NONE"; })(ProjectLookup = exports.ProjectLookup || (exports.ProjectLookup = {})); class Configuration { constructor(startingCwd) { this.projectCwd = null; this.plugins = new Map(); this.settings = new Map(); this.values = new Map(); this.sources = new Map(); this.invalid = new Map(); this.packageExtensions = new Map(); this.limits = new Map(); this.startingCwd = startingCwd; } static create(startingCwd, projectCwdOrPlugins, maybePlugins) { const configuration = new Configuration(startingCwd); if (typeof projectCwdOrPlugins !== `undefined` && !(projectCwdOrPlugins instanceof Map)) configuration.projectCwd = projectCwdOrPlugins; configuration.importSettings(exports.coreDefinitions); const plugins = typeof maybePlugins !== `undefined` ? maybePlugins : projectCwdOrPlugins instanceof Map ? projectCwdOrPlugins : new Map(); for (const [name, plugin] of plugins) configuration.activatePlugin(name, plugin); return configuration; } /** * Instantiate a new configuration object exposing the configuration obtained * from reading the various rc files and the environment settings. * * The `pluginConfiguration` parameter is expected to indicate: * * 1. which modules should be made available to plugins when they require a * package (this is the dynamic linking part - for example we want all the * plugins to use the exact same version of @yarnpkg/core, which also is the * version used by the running Yarn instance). * * 2. which of those modules are actually plugins that need to be injected * within the configuration. * * Note that some extra plugins will be automatically added based on the * content of the rc files - with the rc plugins taking precedence over * the other ones. * * One particularity: the plugin initialization order is quite strict, with * plugins listed in /foo/bar/.yarnrc.yml taking precedence over plugins * listed in /foo/.yarnrc.yml and /.yarnrc.yml. Additionally, while plugins * can depend on one another, they can only depend on plugins that have been * instantiated before them (so a plugin listed in /foo/.yarnrc.yml can * depend on another one listed on /foo/bar/.yarnrc.yml, but not the other * way around). */ static async find(startingCwd, pluginConfiguration, { lookup = ProjectLookup.LOCKFILE, strict = true, usePath = false, useRc = true } = {}) { const environmentSettings = getEnvironmentSettings(); delete environmentSettings.rcFilename; const rcFiles = await Configuration.findRcFiles(startingCwd); const homeRcFile = await Configuration.findHomeRcFile(); const pickCoreFields = ({ ignoreCwd, yarnPath, ignorePath, lockfileFilename }) => ({ ignoreCwd, yarnPath, ignorePath, lockfileFilename }); const excludeCoreFields = ({ ignoreCwd, yarnPath, ignorePath, lockfileFilename, ...rest }) => rest; const configuration = new Configuration(startingCwd); configuration.importSettings(pickCoreFields(exports.coreDefinitions)); configuration.useWithSource(``, pickCoreFields(environmentSettings), startingCwd, { strict: false }); for (const { path, cwd, data } of rcFiles) configuration.useWithSource(path, pickCoreFields(data), cwd, { strict: false }); if (homeRcFile) configuration.useWithSource(homeRcFile.path, pickCoreFields(homeRcFile.data), homeRcFile.cwd, { strict: false }); if (usePath) { const yarnPath = configuration.get(`yarnPath`); const ignorePath = configuration.get(`ignorePath`); if (yarnPath !== null && !ignorePath) { return configuration; } } // We need to know the project root before being able to truly instantiate // our configuration, and to know that we need to know the lockfile name const lockfileFilename = configuration.get(`lockfileFilename`); let projectCwd; switch (lookup) { case ProjectLookup.LOCKFILE: { projectCwd = await Configuration.findProjectCwd(startingCwd, lockfileFilename); } break; case ProjectLookup.MANIFEST: { projectCwd = await Configuration.findProjectCwd(startingCwd, null); } break; case ProjectLookup.NONE: { if (fslib_1.xfs.existsSync(fslib_1.ppath.join(startingCwd, `package.json`))) { projectCwd = fslib_1.ppath.resolve(startingCwd); } else { projectCwd = null; } } break; } // Great! We now have enough information to really start to setup the // core configuration object. configuration.startingCwd = startingCwd; configuration.projectCwd = projectCwd; configuration.importSettings(excludeCoreFields(exports.coreDefinitions)); // Now that the configuration object is almost ready, we need to load all // the configured plugins const plugins = new Map([ [`@@core`, CorePlugin_1.CorePlugin], ]); const interop = (obj) => obj.__esModule ? obj.default : obj; if (pluginConfiguration !== null) { for (const request of pluginConfiguration.plugins.keys()) plugins.set(request, interop(pluginConfiguration.modules.get(request))); const requireEntries = new Map(); for (const request of nodeUtils.builtinModules()) requireEntries.set(request, () => nodeUtils.dynamicRequire(request)); for (const [request, embedModule] of pluginConfiguration.modules) requireEntries.set(request, () => embedModule); const dynamicPlugins = new Set(); const getDefault = (object) => { return object.default || object; }; const importPlugin = (pluginPath, source) => { const { factory, name } = nodeUtils.dynamicRequire(fslib_1.npath.fromPortablePath(pluginPath)); // Prevent plugin redefinition so that the ones declared deeper in the // filesystem always have precedence over the ones below. if (dynamicPlugins.has(name)) return; const pluginRequireEntries = new Map(requireEntries); const pluginRequire = (request) => { if (pluginRequireEntries.has(request)) { return pluginRequireEntries.get(request)(); } else { throw new clipanion_1.UsageError(`This plugin cannot access the package referenced via ${request} which is neither a builtin, nor an exposed entry`); } }; const plugin = miscUtils.prettifySyncErrors(() => { return getDefault(factory(pluginRequire)); }, message => { return `${message} (when initializing ${name}, defined in ${source})`; }); requireEntries.set(name, () => plugin); dynamicPlugins.add(name); plugins.set(name, plugin); }; if (environmentSettings.plugins) { for (const userProvidedPath of environmentSettings.plugins.split(`;`)) { const pluginPath = fslib_1.ppath.resolve(startingCwd, fslib_1.npath.toPortablePath(userProvidedPath)); importPlugin(pluginPath, ``); } } for (const { path, cwd, data } of rcFiles) { if (!useRc) continue; if (!Array.isArray(data.plugins)) continue; for (const userPluginEntry of data.plugins) { const userProvidedPath = typeof userPluginEntry !== `string` ? userPluginEntry.path : userPluginEntry; const pluginPath = fslib_1.ppath.resolve(cwd, fslib_1.npath.toPortablePath(userProvidedPath)); importPlugin(pluginPath, path); } } } for (const [name, plugin] of plugins) configuration.activatePlugin(name, plugin); configuration.useWithSource(``, excludeCoreFields(environmentSettings), startingCwd, { strict }); for (const { path, cwd, data } of rcFiles) configuration.useWithSource(path, excludeCoreFields(data), cwd, { strict }); // The home configuration is never strict because it improves support for // multiple projects using different Yarn versions on the same machine if (homeRcFile) configuration.useWithSource(homeRcFile.path, excludeCoreFields(homeRcFile.data), homeRcFile.cwd, { strict: false }); if (configuration.get(`enableGlobalCache`)) { configuration.values.set(`cacheFolder`, `${configuration.get(`globalFolder`)}/cache`); configuration.sources.set(`cacheFolder`, ``); } await configuration.refreshPackageExtensions(); return configuration; } static async findRcFiles(startingCwd) { const rcFilename = getRcFilename(); const rcFiles = []; let nextCwd = startingCwd; let currentCwd = null; while (nextCwd !== currentCwd) { currentCwd = nextCwd; const rcPath = fslib_1.ppath.join(currentCwd, rcFilename); if (fslib_1.xfs.existsSync(rcPath)) { const content = await fslib_1.xfs.readFilePromise(rcPath, `utf8`); let data; try { data = parsers_1.parseSyml(content); } catch (error) { let tip = ``; if (content.match(/^\s+(?!-)[^:]+\s+\S+/m)) tip = ` (in particular, make sure you list the colons after each key name)`; throw new clipanion_1.UsageError(`Parse error when loading ${rcPath}; please check it's proper Yaml${tip}`); } rcFiles.push({ path: rcPath, cwd: currentCwd, data }); } nextCwd = fslib_1.ppath.dirname(currentCwd); } return rcFiles; } static async findHomeRcFile() { const rcFilename = getRcFilename(); const homeFolder = folderUtils.getHomeFolder(); const homeRcFilePath = fslib_1.ppath.join(homeFolder, rcFilename); if (fslib_1.xfs.existsSync(homeRcFilePath)) { const content = await fslib_1.xfs.readFilePromise(homeRcFilePath, `utf8`); const data = parsers_1.parseSyml(content); return { path: homeRcFilePath, cwd: homeFolder, data }; } return null; } static async findProjectCwd(startingCwd, lockfileFilename) { let projectCwd = null; let nextCwd = startingCwd; let currentCwd = null; while (nextCwd !== currentCwd) { currentCwd = nextCwd; if (fslib_1.xfs.existsSync(fslib_1.ppath.join(currentCwd, `package.json`))) projectCwd = currentCwd; if (lockfileFilename !== null) { if (fslib_1.xfs.existsSync(fslib_1.ppath.join(currentCwd, lockfileFilename))) { projectCwd = currentCwd; break; } } else { if (projectCwd !== null) { break; } } nextCwd = fslib_1.ppath.dirname(currentCwd); } return projectCwd; } static async updateConfiguration(cwd, patch) { const rcFilename = getRcFilename(); const configurationPath = fslib_1.ppath.join(cwd, rcFilename); const current = fslib_1.xfs.existsSync(configurationPath) ? parsers_1.parseSyml(await fslib_1.xfs.readFilePromise(configurationPath, `utf8`)) : {}; let patched = false; let replacement; if (typeof patch === `function`) { try { replacement = patch(current); } catch (_a) { replacement = patch({}); } if (replacement === current) { return; } } else { replacement = current; for (const key of Object.keys(patch)) { const currentValue = current[key]; const patchField = patch[key]; let nextValue; if (typeof patchField === `function`) { try { nextValue = patchField(currentValue); } catch (_b) { nextValue = patchField(undefined); } } else { nextValue = patchField; } if (currentValue === nextValue) continue; replacement[key] = nextValue; patched = true; } if (!patched) { return; } } await fslib_1.xfs.changeFilePromise(configurationPath, parsers_1.stringifySyml(replacement), { automaticNewlines: true, }); } static async updateHomeConfiguration(patch) { const homeFolder = folderUtils.getHomeFolder(); return await Configuration.updateConfiguration(homeFolder, patch); } activatePlugin(name, plugin) { this.plugins.set(name, plugin); if (typeof plugin.configuration !== `undefined`) { this.importSettings(plugin.configuration); } } importSettings(definitions) { for (const [name, definition] of Object.entries(definitions)) { if (definition == null) continue; if (this.settings.has(name)) throw new Error(`Cannot redefine settings "${name}"`); this.settings.set(name, definition); this.values.set(name, getDefaultValue(this, definition)); } } useWithSource(source, data, folder, opts) { try { this.use(source, data, folder, opts); } catch (error) { error.message += ` (in ${formatUtils.pretty(this, source, formatUtils.Type.PATH)})`; throw error; } } use(source, data, folder, { strict = true, overwrite = false } = {}) { for (const key of Object.keys(data)) { const value = data[key]; if (typeof value === `undefined`) continue; // The plugins have already been loaded at this point if (key === `plugins`) continue; // Some environment variables should be ignored when applying the configuration if (source === `` && IGNORED_ENV_VARIABLES.has(key)) continue; // It wouldn't make much sense, would it? if (key === `rcFilename`) throw new clipanion_1.UsageError(`The rcFilename settings can only be set via ${`${exports.ENVIRONMENT_PREFIX}RC_FILENAME`.toUpperCase()}, not via a rc file`); const definition = this.settings.get(key); if (!definition) { if (strict) { throw new clipanion_1.UsageError(`Unrecognized or legacy configuration settings found: ${key} - run "yarn config -v" to see the list of settings supported in Yarn`); } else { this.invalid.set(key, source); continue; } } if (this.sources.has(key) && !(overwrite || definition.type === SettingsType.MAP || definition.isArray && definition.concatenateValues)) continue; let parsed; try { parsed = parseValue(this, key, data[key], definition, folder); } catch (error) { error.message += ` in ${formatUtils.pretty(this, source, formatUtils.Type.PATH)}`; throw error; } if (definition.type === SettingsType.MAP) { const previousValue = this.values.get(key); this.values.set(key, new Map(overwrite ? [...previousValue, ...parsed] : [...parsed, ...previousValue])); this.sources.set(key, `${this.sources.get(key)}, ${source}`); } else if (definition.isArray && definition.concatenateValues) { const previousValue = this.values.get(key); this.values.set(key, overwrite ? [...previousValue, ...parsed] : [...parsed, ...previousValue]); this.sources.set(key, `${this.sources.get(key)}, ${source}`); } else { this.values.set(key, parsed); this.sources.set(key, source); } } } get(key) { if (!this.values.has(key)) throw new Error(`Invalid configuration key "${key}"`); return this.values.get(key); } getSpecial(key, { hideSecrets = false, getNativePaths = false }) { const rawValue = this.get(key); const definition = this.settings.get(key); if (typeof definition === `undefined`) throw new clipanion_1.UsageError(`Couldn't find a configuration settings named "${key}"`); return transformConfiguration(rawValue, definition, { hideSecrets, getNativePaths, }); } getSubprocessStreams(logFile, { header, prefix, report }) { let stdout; let stderr; const logStream = fslib_1.xfs.createWriteStream(logFile); if (this.get(`enableInlineBuilds`)) { const stdoutLineReporter = report.createStreamReporter(`${prefix} ${formatUtils.pretty(this, `STDOUT`, `green`)}`); const stderrLineReporter = report.createStreamReporter(`${prefix} ${formatUtils.pretty(this, `STDERR`, `red`)}`); stdout = new stream_1.PassThrough(); stdout.pipe(stdoutLineReporter); stdout.pipe(logStream); stderr = new stream_1.PassThrough(); stderr.pipe(stderrLineReporter); stderr.pipe(logStream); } else { stdout = logStream; stderr = logStream; if (typeof header !== `undefined`) { stdout.write(`${header}\n`); } } return { stdout, stderr }; } makeResolver() { const pluginResolvers = []; for (const plugin of this.plugins.values()) for (const resolver of plugin.resolvers || []) pluginResolvers.push(new resolver()); return new MultiResolver_1.MultiResolver([ new VirtualResolver_1.VirtualResolver(), new WorkspaceResolver_1.WorkspaceResolver(), new ProtocolResolver_1.ProtocolResolver(), ...pluginResolvers, ]); } makeFetcher() { const pluginFetchers = []; for (const plugin of this.plugins.values()) for (const fetcher of plugin.fetchers || []) pluginFetchers.push(new fetcher()); return new MultiFetcher_1.MultiFetcher([ new VirtualFetcher_1.VirtualFetcher(), new WorkspaceFetcher_1.WorkspaceFetcher(), ...pluginFetchers, ]); } getLinkers() { const linkers = []; for (const plugin of this.plugins.values()) for (const linker of plugin.linkers || []) linkers.push(new linker()); return linkers; } async refreshPackageExtensions() { this.packageExtensions = new Map(); const packageExtensions = this.packageExtensions; const registerPackageExtension = (descriptor, extensionData, { userProvided = false } = {}) => { if (!semver_1.default.validRange(descriptor.range)) throw new Error(`Only semver ranges are allowed as keys for the lockfileExtensions setting`); const extension = new Manifest_1.Manifest(); extension.load(extensionData, { yamlCompatibilityMode: true }); const extensionsPerIdent = miscUtils.getArrayWithDefault(packageExtensions, descriptor.identHash); const extensionsPerRange = []; extensionsPerIdent.push([descriptor.range, extensionsPerRange]); const baseExtension = { status: types_1.PackageExtensionStatus.Inactive, userProvided, parentDescriptor: descriptor, }; for (const dependency of extension.dependencies.values()) extensionsPerRange.push({ ...baseExtension, type: types_1.PackageExtensionType.Dependency, descriptor: dependency, description: `${structUtils.stringifyIdent(descriptor)} > ${structUtils.stringifyIdent(dependency)}` }); for (const peerDependency of extension.peerDependencies.values()) extensionsPerRange.push({ ...baseExtension, type: types_1.PackageExtensionType.PeerDependency, descriptor: peerDependency, description: `${structUtils.stringifyIdent(descriptor)} >> ${structUtils.stringifyIdent(peerDependency)}` }); for (const [selector, meta] of extension.peerDependenciesMeta) { for (const [key, value] of Object.entries(meta)) { extensionsPerRange.push({ ...baseExtension, type: types_1.PackageExtensionType.PeerDependencyMeta, selector, key: key, value, description: `${structUtils.stringifyIdent(descriptor)} >> ${selector} / ${key}` }); } } }; await this.triggerHook(hooks => { return hooks.registerPackageExtensions; }, this, registerPackageExtension); for (const [descriptorString, extensionData] of this.get(`packageExtensions`)) { registerPackageExtension(structUtils.parseDescriptor(descriptorString, true), miscUtils.convertMapsToIndexableObjects(extensionData), { userProvided: true }); } } normalizePackage(original) { const pkg = structUtils.copyPackage(original); // We use the extensions to define additional dependencies that weren't // properly listed in the original package definition if (this.packageExtensions == null) throw new Error(`refreshPackageExtensions has to be called before normalizing packages`); const extensionsPerIdent = this.packageExtensions.get(original.identHash); if (typeof extensionsPerIdent !== `undefined`) { const version = original.version; if (version !== null) { for (const [range, extensionsPerRange] of extensionsPerIdent) { if (!semverUtils.satisfiesWithPrereleases(version, range)) continue; for (const extension of extensionsPerRange) { // If an extension is active for a package but redundant // for another one, it should be considered active if (extension.status === types_1.PackageExtensionStatus.Inactive) extension.status = types_1.PackageExtensionStatus.Redundant; switch (extension.type) { case types_1.PackageExtensionType.Dependency: { const currentDependency = pkg.dependencies.get(extension.descriptor.identHash); if (typeof currentDependency === `undefined`) { extension.status = types_1.PackageExtensionStatus.Active; pkg.dependencies.set(extension.descriptor.identHash, extension.descriptor); } } break; case types_1.PackageExtensionType.PeerDependency: { const currentPeerDependency = pkg.peerDependencies.get(extension.descriptor.identHash); if (typeof currentPeerDependency === `undefined`) { extension.status = types_1.PackageExtensionStatus.Active; pkg.peerDependencies.set(extension.descriptor.identHash, extension.descriptor); } } break; case types_1.PackageExtensionType.PeerDependencyMeta: { const currentPeerDependencyMeta = pkg.peerDependenciesMeta.get(extension.selector); if (typeof currentPeerDependencyMeta === `undefined` || !Object.prototype.hasOwnProperty.call(currentPeerDependencyMeta, extension.key) || currentPeerDependencyMeta[extension.key] !== extension.value) { extension.status = types_1.PackageExtensionStatus.Active; miscUtils.getFactoryWithDefault(pkg.peerDependenciesMeta, extension.selector, () => ({}))[extension.key] = extension.value; } } break; default: { miscUtils.assertNever(extension); } break; } } } } } // We also add implicit optional @types peer dependencies for each peer // dependency. This is for compatibility reason, as many existing packages // forget to define their @types/react optional peer dependency when they // peer-depend on react. const getTypesName = (descriptor) => { return descriptor.scope ? `${descriptor.scope}__${descriptor.name}` : `${descriptor.name}`; }; for (const descriptor of pkg.peerDependencies.values()) { if (descriptor.scope === `@types`) continue; const typesName = getTypesName(descriptor); const typesIdent = structUtils.makeIdent(`types`, typesName); if (pkg.peerDependencies.has(typesIdent.identHash) || pkg.peerDependenciesMeta.has(typesIdent.identHash)) continue; pkg.peerDependenciesMeta.set(structUtils.stringifyIdent(typesIdent), { optional: true, }); } // I don't like implicit dependencies, but package authors are reluctant to // use optional peer dependencies because they would print warnings in older // npm releases. for (const identString of pkg.peerDependenciesMeta.keys()) { const ident = structUtils.parseIdent(identString); if (!pkg.peerDependencies.has(ident.identHash)) { pkg.peerDependencies.set(ident.identHash, structUtils.makeDescriptor(ident, `*`)); } } // We sort the dependencies so that further iterations always occur in the // same order, regardless how the various registries formatted their output pkg.dependencies = new Map(miscUtils.sortMap(pkg.dependencies, ([, descriptor]) => structUtils.stringifyDescriptor(descriptor))); pkg.peerDependencies = new Map(miscUtils.sortMap(pkg.peerDependencies, ([, descriptor]) => structUtils.stringifyDescriptor(descriptor))); return pkg; } getLimit(key) { return miscUtils.getFactoryWithDefault(this.limits, key, () => { return p_limit_1.default(this.get(key)); }); } async triggerHook(get, ...args) { for (const plugin of this.plugins.values()) { const hooks = plugin.hooks; if (!hooks) continue; const hook = get(hooks); if (!hook) continue; await hook(...args); } } async triggerMultipleHooks(get, argsList) { for (const args of argsList) { await this.triggerHook(get, ...args); } } async reduceHook(get, initialValue, ...args) { let value = initialValue; for (const plugin of this.plugins.values()) { const hooks = plugin.hooks; if (!hooks) continue; const hook = get(hooks); if (!hook) continue; value = await hook(value, ...args); } return value; } async firstHook(get, ...args) { for (const plugin of this.plugins.values()) { const hooks = plugin.hooks; if (!hooks) continue; const hook = get(hooks); if (!hook) continue; const ret = await hook(...args); if (typeof ret !== `undefined`) { // @ts-expect-error return ret; } } return null; } /** * @deprecated Prefer using formatUtils.pretty instead, which is type-safe */ format(value, formatType) { return formatUtils.pretty(this, value, formatType); } } exports.Configuration = Configuration; Configuration.telemetry = null; /***/ }), /***/ 78101: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CorePlugin = void 0; const tslib_1 = __webpack_require__(70655); const MessageName_1 = __webpack_require__(62755); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); exports.CorePlugin = { hooks: { reduceDependency: (dependency, project, locator, initialDependency, { resolver, resolveOptions }) => { for (const { pattern, reference } of project.topLevelWorkspace.manifest.resolutions) { if (pattern.from && pattern.from.fullName !== structUtils.requirableIdent(locator)) continue; if (pattern.from && pattern.from.description && pattern.from.description !== locator.reference) continue; if (pattern.descriptor.fullName !== structUtils.requirableIdent(dependency)) continue; if (pattern.descriptor.description && pattern.descriptor.description !== dependency.range) continue; const alias = resolver.bindDescriptor(structUtils.makeDescriptor(dependency, reference), project.topLevelWorkspace.anchoredLocator, resolveOptions); return alias; } return dependency; }, validateProject: async (project, report) => { for (const workspace of project.workspaces) { const workspaceName = structUtils.prettyWorkspace(project.configuration, workspace); await project.configuration.triggerHook(hooks => { return hooks.validateWorkspace; }, workspace, { reportWarning: (name, text) => report.reportWarning(name, `${workspaceName}: ${text}`), reportError: (name, text) => report.reportError(name, `${workspaceName}: ${text}`), }); } }, validateWorkspace: async (workspace, report) => { // Validate manifest const { manifest } = workspace; if (manifest.resolutions.length && workspace.cwd !== workspace.project.cwd) manifest.errors.push(new Error(`Resolutions field will be ignored`)); for (const manifestError of manifest.errors) { report.reportWarning(MessageName_1.MessageName.INVALID_MANIFEST, manifestError.message); } }, }, }; /***/ }), /***/ 45006: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BuildType = void 0; var BuildType; (function (BuildType) { BuildType[BuildType["SCRIPT"] = 0] = "SCRIPT"; BuildType[BuildType["SHELLCODE"] = 1] = "SHELLCODE"; })(BuildType = exports.BuildType || (exports.BuildType = {})); /***/ }), /***/ 48900: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LegacyMigrationResolver = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const parsers_1 = __webpack_require__(21717); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const MessageName_1 = __webpack_require__(62755); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const IMPORTED_PATTERNS = [ // These ones come from Git urls [/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/, (version, $0, $1, $2) => `${$1}#commit=${$2}`], // These ones come from the GitHub HTTP endpoints [/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/, (version, $0, $1 = ``, $2, $3) => `https://${$1}github.com/${$2}.git#commit=${$3}`], [/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/, (version, $0, $1 = ``, $2, $3) => `https://${$1}github.com/${$2}.git#commit=${$3}`], // These ones come from the npm registry // Note: /download/ is used by custom registries like Taobao [/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/, version => `npm:${version}`], // The GitHub package registry uses a different style of URLs [/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/, version => `npm:${version}`], // FontAwesome too; what is it with these registries that made them think using a different url pattern was a good idea? [/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/, version => `npm:${version}`], // These ones come from the old Yarn offline mirror - we assume they came from npm [/^[^/]+\.tgz#[0-9a-f]+$/, version => `npm:${version}`], ]; class LegacyMigrationResolver { constructor() { this.resolutions = null; } async setup(project, { report }) { const lockfilePath = fslib_1.ppath.join(project.cwd, project.configuration.get(`lockfileFilename`)); // No need to enable it if the lockfile doesn't exist if (!fslib_1.xfs.existsSync(lockfilePath)) return; const content = await fslib_1.xfs.readFilePromise(lockfilePath, `utf8`); const parsed = parsers_1.parseSyml(content); // No need to enable it either if the lockfile is modern if (Object.prototype.hasOwnProperty.call(parsed, `__metadata`)) return; const resolutions = this.resolutions = new Map(); for (const key of Object.keys(parsed)) { let descriptor = structUtils.tryParseDescriptor(key); if (!descriptor) { report.reportWarning(MessageName_1.MessageName.YARN_IMPORT_FAILED, `Failed to parse the string "${key}" into a proper descriptor`); continue; } if (semver_1.default.validRange(descriptor.range)) descriptor = structUtils.makeDescriptor(descriptor, `npm:${descriptor.range}`); const { version, resolved } = parsed[key]; // Workspaces don't have the "resolved" key; we can skip them, as their // resolution will be recomputed when needed anyway if (!resolved) continue; let reference; for (const [pattern, matcher] of IMPORTED_PATTERNS) { const match = resolved.match(pattern); if (match) { reference = matcher(version, ...match); break; } } if (!reference) { report.reportWarning(MessageName_1.MessageName.YARN_IMPORT_FAILED, `${structUtils.prettyDescriptor(project.configuration, descriptor)}: Only some patterns can be imported from legacy lockfiles (not "${resolved}")`); continue; } const resolution = structUtils.makeLocator(descriptor, reference); resolutions.set(descriptor.descriptorHash, resolution); } } supportsDescriptor(descriptor, opts) { if (!this.resolutions) return false; return this.resolutions.has(descriptor.descriptorHash); } supportsLocator(locator, opts) { // This resolver only supports the descriptor -> locator part of the // resolution, not the locator -> package one. return false; } shouldPersistResolution(locator, opts) { throw new Error(`Assertion failed: This resolver doesn't support resolving locators to packages`); } bindDescriptor(descriptor, fromLocator, opts) { return descriptor; } getResolutionDependencies(descriptor, opts) { return []; } async getCandidates(descriptor, dependencies, opts) { if (!this.resolutions) throw new Error(`Assertion failed: The resolution store should have been setup`); const resolution = this.resolutions.get(descriptor.descriptorHash); if (!resolution) throw new Error(`Assertion failed: The resolution should have been registered`); return [resolution]; } async getSatisfying(descriptor, references, opts) { return null; } async resolve(locator, opts) { throw new Error(`Assertion failed: This resolver doesn't support resolving locators to packages`); } } exports.LegacyMigrationResolver = LegacyMigrationResolver; /***/ }), /***/ 60613: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LightReport = void 0; const tslib_1 = __webpack_require__(70655); const Report_1 = __webpack_require__(50334); const StreamReport_1 = __webpack_require__(73759); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); class LightReport extends Report_1.Report { constructor({ configuration, stdout, suggestInstall = true }) { super(); this.errorCount = 0; formatUtils.addLogFilterSupport(this, { configuration }); this.configuration = configuration; this.stdout = stdout; this.suggestInstall = suggestInstall; } static async start(opts, cb) { const report = new this(opts); try { await cb(report); } catch (error) { report.reportExceptionOnce(error); } finally { await report.finalize(); } return report; } hasErrors() { return this.errorCount > 0; } exitCode() { return this.hasErrors() ? 1 : 0; } reportCacheHit(locator) { } reportCacheMiss(locator) { } startTimerSync(what, opts, cb) { const realCb = typeof opts === `function` ? opts : cb; return realCb(); } async startTimerPromise(what, opts, cb) { const realCb = typeof opts === `function` ? opts : cb; return await realCb(); } async startCacheReport(cb) { return await cb(); } reportSeparator() { } reportInfo(name, text) { } reportWarning(name, text) { } reportError(name, text) { this.errorCount += 1; this.stdout.write(`${formatUtils.pretty(this.configuration, `➤`, `redBright`)} ${this.formatNameWithHyperlink(name)}: ${text}\n`); } reportProgress(progress) { const promise = Promise.resolve().then(async () => { // eslint-disable-next-line no-empty-pattern for await (const {} of progress) { // No need to do anything; we just want to consume the progress events } }); const stop = () => { // Nothing to stop }; return { ...promise, stop }; } reportJson(data) { // Just ignore the json output } async finalize() { if (this.errorCount > 0) { this.stdout.write(`${formatUtils.pretty(this.configuration, `➤`, `redBright`)} Errors happened when preparing the environment required to run this command.\n`); if (this.suggestInstall) { this.stdout.write(`${formatUtils.pretty(this.configuration, `➤`, `redBright`)} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n`); } } } formatNameWithHyperlink(name) { return StreamReport_1.formatNameWithHyperlink(name, { configuration: this.configuration, json: false, }); } } exports.LightReport = LightReport; /***/ }), /***/ 59909: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LockfileResolver = void 0; const tslib_1 = __webpack_require__(70655); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class LockfileResolver { supportsDescriptor(descriptor, opts) { const resolution = opts.project.storedResolutions.get(descriptor.descriptorHash); if (resolution) return true; // If the descriptor matches a package that's already been used, we can just use it even if we never resolved the range before // Ex: foo depends on bar@^1.0.0 that we resolved to foo@1.1.0, then we add a package qux that depends on foo@1.1.0 (without the caret) if (opts.project.originalPackages.has(structUtils.convertDescriptorToLocator(descriptor).locatorHash)) return true; return false; } supportsLocator(locator, opts) { if (opts.project.originalPackages.has(locator.locatorHash)) return true; return false; } shouldPersistResolution(locator, opts) { throw new Error(`The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes`); } bindDescriptor(descriptor, fromLocator, opts) { return descriptor; } getResolutionDependencies(descriptor, opts) { return []; } async getCandidates(descriptor, dependencies, opts) { let pkg = opts.project.originalPackages.get(structUtils.convertDescriptorToLocator(descriptor).locatorHash); if (pkg) return [pkg]; const resolution = opts.project.storedResolutions.get(descriptor.descriptorHash); if (!resolution) throw new Error(`Expected the resolution to have been successful - resolution not found`); pkg = opts.project.originalPackages.get(resolution); if (!pkg) throw new Error(`Expected the resolution to have been successful - package not found`); return [pkg]; } async getSatisfying(descriptor, references, opts) { return null; } async resolve(locator, opts) { const pkg = opts.project.originalPackages.get(locator.locatorHash); if (!pkg) throw new Error(`The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache`); return pkg; } } exports.LockfileResolver = LockfileResolver; /***/ }), /***/ 11658: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Manifest = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const parsers_1 = __webpack_require__(21717); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const semverUtils = tslib_1.__importStar(__webpack_require__(51201)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class Manifest { constructor() { this.indent = ` `; this.name = null; this.version = null; this.os = null; this.cpu = null; this.type = null; this["private"] = false; this.license = null; this.main = null; this.module = null; this.browser = null; this.languageName = null; this.bin = new Map(); this.scripts = new Map(); this.dependencies = new Map(); this.devDependencies = new Map(); this.peerDependencies = new Map(); this.workspaceDefinitions = []; this.dependenciesMeta = new Map(); this.peerDependenciesMeta = new Map(); this.resolutions = []; this.files = null; this.publishConfig = null; this.installConfig = null; this.preferUnplugged = null; this.raw = {}; /** * errors found in the raw manifest while loading */ this.errors = []; } static async tryFind(path, { baseFs = new fslib_1.NodeFS() } = {}) { const manifestPath = fslib_1.ppath.join(path, `package.json`); if (!await baseFs.existsPromise(manifestPath)) return null; return await Manifest.fromFile(manifestPath, { baseFs }); } static async find(path, { baseFs } = {}) { const manifest = await Manifest.tryFind(path, { baseFs }); if (manifest === null) throw new Error(`Manifest not found`); return manifest; } static async fromFile(path, { baseFs = new fslib_1.NodeFS() } = {}) { const manifest = new Manifest(); await manifest.loadFile(path, { baseFs }); return manifest; } static fromText(text) { const manifest = new Manifest(); manifest.loadFromText(text); return manifest; } static isManifestFieldCompatible(rules, actual) { if (rules === null) return true; let isNotOnAllowlist = true; let isOnDenylist = false; for (const rule of rules) { if (rule[0] === `!`) { isOnDenylist = true; if (actual === rule.slice(1)) { return false; } } else { isNotOnAllowlist = false; if (rule === actual) { return true; } } } // Denylists with allowlisted items should be treated as allowlists for `os` and `cpu` in `package.json` return isOnDenylist && isNotOnAllowlist; } loadFromText(text) { let data; try { data = JSON.parse(stripBOM(text) || `{}`); } catch (error) { error.message += ` (when parsing ${text})`; throw error; } this.load(data); this.indent = getIndent(text); } async loadFile(path, { baseFs = new fslib_1.NodeFS() }) { const content = await baseFs.readFilePromise(path, `utf8`); let data; try { data = JSON.parse(stripBOM(content) || `{}`); } catch (error) { error.message += ` (when parsing ${path})`; throw error; } this.load(data); this.indent = getIndent(content); } load(data, { yamlCompatibilityMode = false } = {}) { if (typeof data !== `object` || data === null) throw new Error(`Utterly invalid manifest data (${data})`); this.raw = data; const errors = []; if (typeof data.name === `string`) { try { this.name = structUtils.parseIdent(data.name); } catch (error) { errors.push(new Error(`Parsing failed for the 'name' field`)); } } if (typeof data.version === `string`) this.version = data.version; if (Array.isArray(data.os)) { const os = []; this.os = os; for (const item of data.os) { if (typeof item !== `string`) { errors.push(new Error(`Parsing failed for the 'os' field`)); } else { os.push(item); } } } if (Array.isArray(data.cpu)) { const cpu = []; this.cpu = cpu; for (const item of data.cpu) { if (typeof item !== `string`) { errors.push(new Error(`Parsing failed for the 'cpu' field`)); } else { cpu.push(item); } } } if (typeof data.type === `string`) this.type = data.type; if (typeof data.private === `boolean`) this.private = data.private; if (typeof data.license === `string`) this.license = data.license; if (typeof data.languageName === `string`) this.languageName = data.languageName; if (typeof data.main === `string`) this.main = normalizeSlashes(data.main); if (typeof data.module === `string`) this.module = normalizeSlashes(data.module); if (data.browser != null) { if (typeof data.browser === `string`) { this.browser = normalizeSlashes(data.browser); } else { this.browser = new Map(); for (const [key, value] of Object.entries(data.browser)) { this.browser.set(normalizeSlashes(key), typeof value === `string` ? normalizeSlashes(value) : value); } } } if (typeof data.bin === `string`) { if (this.name !== null) { this.bin = new Map([[this.name.name, normalizeSlashes(data.bin)]]); } else { errors.push(new Error(`String bin field, but no attached package name`)); } } else if (typeof data.bin === `object` && data.bin !== null) { for (const [key, value] of Object.entries(data.bin)) { if (typeof value !== `string`) { errors.push(new Error(`Invalid bin definition for '${key}'`)); continue; } this.bin.set(key, normalizeSlashes(value)); } } if (typeof data.scripts === `object` && data.scripts !== null) { for (const [key, value] of Object.entries(data.scripts)) { if (typeof value !== `string`) { errors.push(new Error(`Invalid script definition for '${key}'`)); continue; } this.scripts.set(key, value); } } if (typeof data.dependencies === `object` && data.dependencies !== null) { for (const [name, range] of Object.entries(data.dependencies)) { if (typeof range !== `string`) { errors.push(new Error(`Invalid dependency range for '${name}'`)); continue; } let ident; try { ident = structUtils.parseIdent(name); } catch (error) { errors.push(new Error(`Parsing failed for the dependency name '${name}'`)); continue; } const descriptor = structUtils.makeDescriptor(ident, range); this.dependencies.set(descriptor.identHash, descriptor); } } if (typeof data.devDependencies === `object` && data.devDependencies !== null) { for (const [name, range] of Object.entries(data.devDependencies)) { if (typeof range !== `string`) { errors.push(new Error(`Invalid dependency range for '${name}'`)); continue; } let ident; try { ident = structUtils.parseIdent(name); } catch (error) { errors.push(new Error(`Parsing failed for the dependency name '${name}'`)); continue; } const descriptor = structUtils.makeDescriptor(ident, range); this.devDependencies.set(descriptor.identHash, descriptor); } } if (typeof data.peerDependencies === `object` && data.peerDependencies !== null) { for (let [name, range] of Object.entries(data.peerDependencies)) { let ident; try { ident = structUtils.parseIdent(name); } catch (error) { errors.push(new Error(`Parsing failed for the dependency name '${name}'`)); continue; } if (typeof range !== `string` || !semverUtils.validRange(range)) { errors.push(new Error(`Invalid dependency range for '${name}'`)); range = `*`; } const descriptor = structUtils.makeDescriptor(ident, range); this.peerDependencies.set(descriptor.identHash, descriptor); } } if (typeof data.workspaces === `object` && data.workspaces.nohoist) errors.push(new Error(`'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead`)); const workspaces = Array.isArray(data.workspaces) ? data.workspaces : typeof data.workspaces === `object` && data.workspaces !== null && Array.isArray(data.workspaces.packages) ? data.workspaces.packages : []; for (const entry of workspaces) { if (typeof entry !== `string`) { errors.push(new Error(`Invalid workspace definition for '${entry}'`)); continue; } this.workspaceDefinitions.push({ pattern: entry, }); } if (typeof data.dependenciesMeta === `object` && data.dependenciesMeta !== null) { for (const [pattern, meta] of Object.entries(data.dependenciesMeta)) { if (typeof meta !== `object` || meta === null) { errors.push(new Error(`Invalid meta field for '${pattern}`)); continue; } const descriptor = structUtils.parseDescriptor(pattern); const dependencyMeta = this.ensureDependencyMeta(descriptor); const built = tryParseOptionalBoolean(meta.built, { yamlCompatibilityMode }); if (built === null) { errors.push(new Error(`Invalid built meta field for '${pattern}'`)); continue; } const optional = tryParseOptionalBoolean(meta.optional, { yamlCompatibilityMode }); if (optional === null) { errors.push(new Error(`Invalid optional meta field for '${pattern}'`)); continue; } const unplugged = tryParseOptionalBoolean(meta.unplugged, { yamlCompatibilityMode }); if (unplugged === null) { errors.push(new Error(`Invalid unplugged meta field for '${pattern}'`)); continue; } Object.assign(dependencyMeta, { built, optional, unplugged }); } } if (typeof data.peerDependenciesMeta === `object` && data.peerDependenciesMeta !== null) { for (const [pattern, meta] of Object.entries(data.peerDependenciesMeta)) { if (typeof meta !== `object` || meta === null) { errors.push(new Error(`Invalid meta field for '${pattern}'`)); continue; } const descriptor = structUtils.parseDescriptor(pattern); const peerDependencyMeta = this.ensurePeerDependencyMeta(descriptor); const optional = tryParseOptionalBoolean(meta.optional, { yamlCompatibilityMode }); if (optional === null) { errors.push(new Error(`Invalid optional meta field for '${pattern}'`)); continue; } Object.assign(peerDependencyMeta, { optional }); } } if (typeof data.resolutions === `object` && data.resolutions !== null) { for (const [pattern, reference] of Object.entries(data.resolutions)) { if (typeof reference !== `string`) { errors.push(new Error(`Invalid resolution entry for '${pattern}'`)); continue; } try { this.resolutions.push({ pattern: parsers_1.parseResolution(pattern), reference }); } catch (error) { errors.push(error); continue; } } } if (Array.isArray(data.files)) { this.files = new Set(); for (const filename of data.files) { if (typeof filename !== `string`) { errors.push(new Error(`Invalid files entry for '${filename}'`)); continue; } this.files.add(filename); } } if (typeof data.publishConfig === `object` && data.publishConfig !== null) { this.publishConfig = {}; if (typeof data.publishConfig.access === `string`) this.publishConfig.access = data.publishConfig.access; if (typeof data.publishConfig.main === `string`) this.publishConfig.main = normalizeSlashes(data.publishConfig.main); if (typeof data.publishConfig.module === `string`) this.publishConfig.module = normalizeSlashes(data.publishConfig.module); if (data.publishConfig.browser != null) { if (typeof data.publishConfig.browser === `string`) { this.publishConfig.browser = normalizeSlashes(data.publishConfig.browser); } else { this.publishConfig.browser = new Map(); for (const [key, value] of Object.entries(data.publishConfig.browser)) { this.publishConfig.browser.set(normalizeSlashes(key), typeof value === `string` ? normalizeSlashes(value) : value); } } } if (typeof data.publishConfig.registry === `string`) this.publishConfig.registry = data.publishConfig.registry; if (typeof data.publishConfig.bin === `string`) { if (this.name !== null) { this.publishConfig.bin = new Map([[this.name.name, normalizeSlashes(data.publishConfig.bin)]]); } else { errors.push(new Error(`String bin field, but no attached package name`)); } } else if (typeof data.publishConfig.bin === `object` && data.publishConfig.bin !== null) { this.publishConfig.bin = new Map(); for (const [key, value] of Object.entries(data.publishConfig.bin)) { if (typeof value !== `string`) { errors.push(new Error(`Invalid bin definition for '${key}'`)); continue; } this.publishConfig.bin.set(key, normalizeSlashes(value)); } } if (Array.isArray(data.publishConfig.executableFiles)) { this.publishConfig.executableFiles = new Set(); for (const value of data.publishConfig.executableFiles) { if (typeof value !== `string`) { errors.push(new Error(`Invalid executable file definition`)); continue; } this.publishConfig.executableFiles.add(normalizeSlashes(value)); } } } if (typeof data.installConfig === `object` && data.installConfig !== null) { this.installConfig = {}; for (const key of Object.keys(data.installConfig)) { if (key === `hoistingLimits`) { if (typeof data.installConfig.hoistingLimits === `string`) { this.installConfig.hoistingLimits = data.installConfig.hoistingLimits; } else { errors.push(new Error(`Invalid hoisting limits definition`)); } } else { errors.push(new Error(`Unrecognized installConfig key: ${key}`)); } } } // We treat optional dependencies after both the regular dependency field // and the dependenciesMeta field have been generated (because we will // override them) if (typeof data.optionalDependencies === `object` && data.optionalDependencies !== null) { for (const [name, range] of Object.entries(data.optionalDependencies)) { if (typeof range !== `string`) { errors.push(new Error(`Invalid dependency range for '${name}'`)); continue; } let ident; try { ident = structUtils.parseIdent(name); } catch (error) { errors.push(new Error(`Parsing failed for the dependency name '${name}'`)); continue; } // Note that we store the optional dependencies in the same store as // the one that keep the regular dependencies, because they're // effectively the same (the only difference is that optional // dependencies have an extra field set in dependenciesMeta). const realDescriptor = structUtils.makeDescriptor(ident, range); this.dependencies.set(realDescriptor.identHash, realDescriptor); const identDescriptor = structUtils.makeDescriptor(ident, `unknown`); const dependencyMeta = this.ensureDependencyMeta(identDescriptor); Object.assign(dependencyMeta, { optional: true }); } } if (typeof data.preferUnplugged === `boolean`) this.preferUnplugged = data.preferUnplugged; this.errors = errors; } getForScope(type) { switch (type) { case `dependencies`: return this.dependencies; case `devDependencies`: return this.devDependencies; case `peerDependencies`: return this.peerDependencies; default: { throw new Error(`Unsupported value ("${type}")`); } } } hasConsumerDependency(ident) { if (this.dependencies.has(ident.identHash)) return true; if (this.peerDependencies.has(ident.identHash)) return true; return false; } hasHardDependency(ident) { if (this.dependencies.has(ident.identHash)) return true; if (this.devDependencies.has(ident.identHash)) return true; return false; } hasSoftDependency(ident) { if (this.peerDependencies.has(ident.identHash)) return true; return false; } hasDependency(ident) { if (this.hasHardDependency(ident)) return true; if (this.hasSoftDependency(ident)) return true; return false; } isCompatibleWithOS(os) { return Manifest.isManifestFieldCompatible(this.os, os); } isCompatibleWithCPU(cpu) { return Manifest.isManifestFieldCompatible(this.cpu, cpu); } ensureDependencyMeta(descriptor) { if (descriptor.range !== `unknown` && !semver_1.default.valid(descriptor.range)) throw new Error(`Invalid meta field range for '${structUtils.stringifyDescriptor(descriptor)}'`); const identString = structUtils.stringifyIdent(descriptor); const range = descriptor.range !== `unknown` ? descriptor.range : null; let dependencyMetaSet = this.dependenciesMeta.get(identString); if (!dependencyMetaSet) this.dependenciesMeta.set(identString, dependencyMetaSet = new Map()); let dependencyMeta = dependencyMetaSet.get(range); if (!dependencyMeta) dependencyMetaSet.set(range, dependencyMeta = {}); return dependencyMeta; } ensurePeerDependencyMeta(descriptor) { if (descriptor.range !== `unknown`) throw new Error(`Invalid meta field range for '${structUtils.stringifyDescriptor(descriptor)}'`); const identString = structUtils.stringifyIdent(descriptor); let peerDependencyMeta = this.peerDependenciesMeta.get(identString); if (!peerDependencyMeta) this.peerDependenciesMeta.set(identString, peerDependencyMeta = {}); return peerDependencyMeta; } setRawField(name, value, { after = [] } = {}) { const afterSet = new Set(after.filter(key => { return Object.prototype.hasOwnProperty.call(this.raw, key); })); if (afterSet.size === 0 || Object.prototype.hasOwnProperty.call(this.raw, name)) { this.raw[name] = value; } else { const oldRaw = this.raw; const newRaw = this.raw = {}; let inserted = false; for (const key of Object.keys(oldRaw)) { newRaw[key] = oldRaw[key]; if (!inserted) { afterSet.delete(key); if (afterSet.size === 0) { newRaw[name] = value; inserted = true; } } } } } exportTo(data, { compatibilityMode = true } = {}) { // Note that we even set the fields that we re-set later; it // allows us to preserve the key ordering Object.assign(data, this.raw); if (this.name !== null) data.name = structUtils.stringifyIdent(this.name); else delete data.name; if (this.version !== null) data.version = this.version; else delete data.version; if (this.os !== null) data.os = this.os; else delete data.os; if (this.cpu !== null) data.cpu = this.cpu; else delete data.cpu; if (this.type !== null) data.type = this.type; else delete data.type; if (this.private) data.private = true; else delete data.private; if (this.license !== null) data.license = this.license; else delete data.license; if (this.languageName !== null) data.languageName = this.languageName; else delete data.languageName; if (this.main !== null) data.main = this.main; else delete data.main; if (this.module !== null) data.module = this.module; else delete data.module; if (this.browser !== null) { const browser = this.browser; if (typeof browser === `string`) { data.browser = browser; } else if (browser instanceof Map) { data.browser = Object.assign({}, ...Array.from(browser.keys()).sort().map(name => { return { [name]: browser.get(name) }; })); } } else { delete data.browser; } if (this.bin.size === 1 && this.name !== null && this.bin.has(this.name.name)) { data.bin = this.bin.get(this.name.name); } else if (this.bin.size > 0) { data.bin = Object.assign({}, ...Array.from(this.bin.keys()).sort().map(name => { return { [name]: this.bin.get(name) }; })); } else { delete data.bin; } if (this.workspaceDefinitions.length > 0) { if (this.raw.workspaces && !Array.isArray(this.raw.workspaces)) { data.workspaces = { ...this.raw.workspaces, packages: this.workspaceDefinitions.map(({ pattern }) => pattern) }; } else { data.workspaces = this.workspaceDefinitions.map(({ pattern }) => pattern); } } else if (this.raw.workspaces && !Array.isArray(this.raw.workspaces) && Object.keys(this.raw.workspaces).length > 0) { data.workspaces = this.raw.workspaces; } else { delete data.workspaces; } const regularDependencies = []; const optionalDependencies = []; for (const dependency of this.dependencies.values()) { const dependencyMetaSet = this.dependenciesMeta.get(structUtils.stringifyIdent(dependency)); let isOptionallyBuilt = false; if (compatibilityMode) { if (dependencyMetaSet) { const meta = dependencyMetaSet.get(null); if (meta && meta.optional) { isOptionallyBuilt = true; } } } if (isOptionallyBuilt) { optionalDependencies.push(dependency); } else { regularDependencies.push(dependency); } } if (regularDependencies.length > 0) { data.dependencies = Object.assign({}, ...structUtils.sortDescriptors(regularDependencies).map(dependency => { return { [structUtils.stringifyIdent(dependency)]: dependency.range }; })); } else { delete data.dependencies; } if (optionalDependencies.length > 0) { data.optionalDependencies = Object.assign({}, ...structUtils.sortDescriptors(optionalDependencies).map(dependency => { return { [structUtils.stringifyIdent(dependency)]: dependency.range }; })); } else { delete data.optionalDependencies; } if (this.devDependencies.size > 0) { data.devDependencies = Object.assign({}, ...structUtils.sortDescriptors(this.devDependencies.values()).map(dependency => { return { [structUtils.stringifyIdent(dependency)]: dependency.range }; })); } else { delete data.devDependencies; } if (this.peerDependencies.size > 0) { data.peerDependencies = Object.assign({}, ...structUtils.sortDescriptors(this.peerDependencies.values()).map(dependency => { return { [structUtils.stringifyIdent(dependency)]: dependency.range }; })); } else { delete data.peerDependencies; } data.dependenciesMeta = {}; for (const [identString, dependencyMetaSet] of miscUtils.sortMap(this.dependenciesMeta.entries(), ([identString, dependencyMetaSet]) => identString)) { for (const [range, meta] of miscUtils.sortMap(dependencyMetaSet.entries(), ([range, meta]) => range !== null ? `0${range}` : `1`)) { const key = range !== null ? structUtils.stringifyDescriptor(structUtils.makeDescriptor(structUtils.parseIdent(identString), range)) : identString; const metaCopy = { ...meta }; if (compatibilityMode && range === null) delete metaCopy.optional; if (Object.keys(metaCopy).length === 0) continue; data.dependenciesMeta[key] = metaCopy; } } if (Object.keys(data.dependenciesMeta).length === 0) delete data.dependenciesMeta; if (this.peerDependenciesMeta.size > 0) { data.peerDependenciesMeta = Object.assign({}, ...miscUtils.sortMap(this.peerDependenciesMeta.entries(), ([identString, meta]) => identString).map(([identString, meta]) => { return { [identString]: meta }; })); } else { delete data.peerDependenciesMeta; } if (this.resolutions.length > 0) { data.resolutions = Object.assign({}, ...this.resolutions.map(({ pattern, reference }) => { return { [parsers_1.stringifyResolution(pattern)]: reference }; })); } else { delete data.resolutions; } if (this.files !== null) data.files = Array.from(this.files); else delete data.files; if (this.preferUnplugged !== null) data.preferUnplugged = this.preferUnplugged; else delete data.preferUnplugged; return data; } } exports.Manifest = Manifest; Manifest.fileName = `package.json`; Manifest.allDependencies = [`dependencies`, `devDependencies`, `peerDependencies`]; Manifest.hardDependencies = [`dependencies`, `devDependencies`]; function getIndent(content) { const indentMatch = content.match(/^[ \t]+/m); if (indentMatch) { return indentMatch[0]; } else { return ` `; } } function stripBOM(content) { if (content.charCodeAt(0) === 0xFEFF) { return content.slice(1); } else { return content; } } function normalizeSlashes(str) { return str.replace(/\\/g, `/`); } function tryParseOptionalBoolean(value, { yamlCompatibilityMode }) { if (yamlCompatibilityMode) return miscUtils.tryParseOptionalBoolean(value); if (typeof value === `undefined` || typeof value === `boolean`) return value; return null; } /***/ }), /***/ 62755: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringifyMessageName = exports.MessageName = void 0; // The values in this enum should never be reassigned, even if some are removed // over time (it would mess up the search results, which are the whole point of // having this system) var MessageName; (function (MessageName) { MessageName[MessageName["UNNAMED"] = 0] = "UNNAMED"; MessageName[MessageName["EXCEPTION"] = 1] = "EXCEPTION"; MessageName[MessageName["MISSING_PEER_DEPENDENCY"] = 2] = "MISSING_PEER_DEPENDENCY"; MessageName[MessageName["CYCLIC_DEPENDENCIES"] = 3] = "CYCLIC_DEPENDENCIES"; MessageName[MessageName["DISABLED_BUILD_SCRIPTS"] = 4] = "DISABLED_BUILD_SCRIPTS"; MessageName[MessageName["BUILD_DISABLED"] = 5] = "BUILD_DISABLED"; MessageName[MessageName["SOFT_LINK_BUILD"] = 6] = "SOFT_LINK_BUILD"; MessageName[MessageName["MUST_BUILD"] = 7] = "MUST_BUILD"; MessageName[MessageName["MUST_REBUILD"] = 8] = "MUST_REBUILD"; MessageName[MessageName["BUILD_FAILED"] = 9] = "BUILD_FAILED"; MessageName[MessageName["RESOLVER_NOT_FOUND"] = 10] = "RESOLVER_NOT_FOUND"; MessageName[MessageName["FETCHER_NOT_FOUND"] = 11] = "FETCHER_NOT_FOUND"; MessageName[MessageName["LINKER_NOT_FOUND"] = 12] = "LINKER_NOT_FOUND"; MessageName[MessageName["FETCH_NOT_CACHED"] = 13] = "FETCH_NOT_CACHED"; MessageName[MessageName["YARN_IMPORT_FAILED"] = 14] = "YARN_IMPORT_FAILED"; MessageName[MessageName["REMOTE_INVALID"] = 15] = "REMOTE_INVALID"; MessageName[MessageName["REMOTE_NOT_FOUND"] = 16] = "REMOTE_NOT_FOUND"; MessageName[MessageName["RESOLUTION_PACK"] = 17] = "RESOLUTION_PACK"; MessageName[MessageName["CACHE_CHECKSUM_MISMATCH"] = 18] = "CACHE_CHECKSUM_MISMATCH"; MessageName[MessageName["UNUSED_CACHE_ENTRY"] = 19] = "UNUSED_CACHE_ENTRY"; MessageName[MessageName["MISSING_LOCKFILE_ENTRY"] = 20] = "MISSING_LOCKFILE_ENTRY"; MessageName[MessageName["WORKSPACE_NOT_FOUND"] = 21] = "WORKSPACE_NOT_FOUND"; MessageName[MessageName["TOO_MANY_MATCHING_WORKSPACES"] = 22] = "TOO_MANY_MATCHING_WORKSPACES"; MessageName[MessageName["CONSTRAINTS_MISSING_DEPENDENCY"] = 23] = "CONSTRAINTS_MISSING_DEPENDENCY"; MessageName[MessageName["CONSTRAINTS_INCOMPATIBLE_DEPENDENCY"] = 24] = "CONSTRAINTS_INCOMPATIBLE_DEPENDENCY"; MessageName[MessageName["CONSTRAINTS_EXTRANEOUS_DEPENDENCY"] = 25] = "CONSTRAINTS_EXTRANEOUS_DEPENDENCY"; MessageName[MessageName["CONSTRAINTS_INVALID_DEPENDENCY"] = 26] = "CONSTRAINTS_INVALID_DEPENDENCY"; MessageName[MessageName["CANT_SUGGEST_RESOLUTIONS"] = 27] = "CANT_SUGGEST_RESOLUTIONS"; MessageName[MessageName["FROZEN_LOCKFILE_EXCEPTION"] = 28] = "FROZEN_LOCKFILE_EXCEPTION"; MessageName[MessageName["CROSS_DRIVE_VIRTUAL_LOCAL"] = 29] = "CROSS_DRIVE_VIRTUAL_LOCAL"; MessageName[MessageName["FETCH_FAILED"] = 30] = "FETCH_FAILED"; MessageName[MessageName["DANGEROUS_NODE_MODULES"] = 31] = "DANGEROUS_NODE_MODULES"; MessageName[MessageName["NODE_GYP_INJECTED"] = 32] = "NODE_GYP_INJECTED"; MessageName[MessageName["AUTHENTICATION_NOT_FOUND"] = 33] = "AUTHENTICATION_NOT_FOUND"; MessageName[MessageName["INVALID_CONFIGURATION_KEY"] = 34] = "INVALID_CONFIGURATION_KEY"; MessageName[MessageName["NETWORK_ERROR"] = 35] = "NETWORK_ERROR"; MessageName[MessageName["LIFECYCLE_SCRIPT"] = 36] = "LIFECYCLE_SCRIPT"; MessageName[MessageName["CONSTRAINTS_MISSING_FIELD"] = 37] = "CONSTRAINTS_MISSING_FIELD"; MessageName[MessageName["CONSTRAINTS_INCOMPATIBLE_FIELD"] = 38] = "CONSTRAINTS_INCOMPATIBLE_FIELD"; MessageName[MessageName["CONSTRAINTS_EXTRANEOUS_FIELD"] = 39] = "CONSTRAINTS_EXTRANEOUS_FIELD"; MessageName[MessageName["CONSTRAINTS_INVALID_FIELD"] = 40] = "CONSTRAINTS_INVALID_FIELD"; MessageName[MessageName["AUTHENTICATION_INVALID"] = 41] = "AUTHENTICATION_INVALID"; MessageName[MessageName["PROLOG_UNKNOWN_ERROR"] = 42] = "PROLOG_UNKNOWN_ERROR"; MessageName[MessageName["PROLOG_SYNTAX_ERROR"] = 43] = "PROLOG_SYNTAX_ERROR"; MessageName[MessageName["PROLOG_EXISTENCE_ERROR"] = 44] = "PROLOG_EXISTENCE_ERROR"; MessageName[MessageName["STACK_OVERFLOW_RESOLUTION"] = 45] = "STACK_OVERFLOW_RESOLUTION"; MessageName[MessageName["AUTOMERGE_FAILED_TO_PARSE"] = 46] = "AUTOMERGE_FAILED_TO_PARSE"; MessageName[MessageName["AUTOMERGE_IMMUTABLE"] = 47] = "AUTOMERGE_IMMUTABLE"; MessageName[MessageName["AUTOMERGE_SUCCESS"] = 48] = "AUTOMERGE_SUCCESS"; MessageName[MessageName["AUTOMERGE_REQUIRED"] = 49] = "AUTOMERGE_REQUIRED"; MessageName[MessageName["DEPRECATED_CLI_SETTINGS"] = 50] = "DEPRECATED_CLI_SETTINGS"; MessageName[MessageName["PLUGIN_NAME_NOT_FOUND"] = 51] = "PLUGIN_NAME_NOT_FOUND"; MessageName[MessageName["INVALID_PLUGIN_REFERENCE"] = 52] = "INVALID_PLUGIN_REFERENCE"; MessageName[MessageName["CONSTRAINTS_AMBIGUITY"] = 53] = "CONSTRAINTS_AMBIGUITY"; MessageName[MessageName["CACHE_OUTSIDE_PROJECT"] = 54] = "CACHE_OUTSIDE_PROJECT"; MessageName[MessageName["IMMUTABLE_INSTALL"] = 55] = "IMMUTABLE_INSTALL"; MessageName[MessageName["IMMUTABLE_CACHE"] = 56] = "IMMUTABLE_CACHE"; MessageName[MessageName["INVALID_MANIFEST"] = 57] = "INVALID_MANIFEST"; MessageName[MessageName["PACKAGE_PREPARATION_FAILED"] = 58] = "PACKAGE_PREPARATION_FAILED"; MessageName[MessageName["INVALID_RANGE_PEER_DEPENDENCY"] = 59] = "INVALID_RANGE_PEER_DEPENDENCY"; MessageName[MessageName["INCOMPATIBLE_PEER_DEPENDENCY"] = 60] = "INCOMPATIBLE_PEER_DEPENDENCY"; MessageName[MessageName["DEPRECATED_PACKAGE"] = 61] = "DEPRECATED_PACKAGE"; MessageName[MessageName["INCOMPATIBLE_OS"] = 62] = "INCOMPATIBLE_OS"; MessageName[MessageName["INCOMPATIBLE_CPU"] = 63] = "INCOMPATIBLE_CPU"; MessageName[MessageName["FROZEN_ARTIFACT_EXCEPTION"] = 64] = "FROZEN_ARTIFACT_EXCEPTION"; MessageName[MessageName["TELEMETRY_NOTICE"] = 65] = "TELEMETRY_NOTICE"; MessageName[MessageName["PATCH_HUNK_FAILED"] = 66] = "PATCH_HUNK_FAILED"; MessageName[MessageName["INVALID_CONFIGURATION_VALUE"] = 67] = "INVALID_CONFIGURATION_VALUE"; MessageName[MessageName["UNUSED_PACKAGE_EXTENSION"] = 68] = "UNUSED_PACKAGE_EXTENSION"; MessageName[MessageName["REDUNDANT_PACKAGE_EXTENSION"] = 69] = "REDUNDANT_PACKAGE_EXTENSION"; })(MessageName = exports.MessageName || (exports.MessageName = {})); function stringifyMessageName(name) { return `YN${name.toString(10).padStart(4, `0`)}`; } exports.stringifyMessageName = stringifyMessageName; /***/ }), /***/ 74441: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MultiFetcher = void 0; const tslib_1 = __webpack_require__(70655); const MessageName_1 = __webpack_require__(62755); const Report_1 = __webpack_require__(50334); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class MultiFetcher { constructor(fetchers) { this.fetchers = fetchers; } supports(locator, opts) { if (!this.tryFetcher(locator, opts)) return false; return true; } getLocalPath(locator, opts) { const fetcher = this.getFetcher(locator, opts); return fetcher.getLocalPath(locator, opts); } async fetch(locator, opts) { const fetcher = this.getFetcher(locator, opts); return await fetcher.fetch(locator, opts); } tryFetcher(locator, opts) { const fetcher = this.fetchers.find(fetcher => fetcher.supports(locator, opts)); if (!fetcher) return null; return fetcher; } getFetcher(locator, opts) { const fetcher = this.fetchers.find(fetcher => fetcher.supports(locator, opts)); if (!fetcher) throw new Report_1.ReportError(MessageName_1.MessageName.FETCHER_NOT_FOUND, `${structUtils.prettyLocator(opts.project.configuration, locator)} isn't supported by any available fetcher`); return fetcher; } } exports.MultiFetcher = MultiFetcher; /***/ }), /***/ 54123: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MultiResolver = void 0; const tslib_1 = __webpack_require__(70655); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class MultiResolver { constructor(resolvers) { this.resolvers = resolvers.filter(resolver => resolver); } supportsDescriptor(descriptor, opts) { const resolver = this.tryResolverByDescriptor(descriptor, opts); return !!resolver; } supportsLocator(locator, opts) { const resolver = this.tryResolverByLocator(locator, opts); return !!resolver; } shouldPersistResolution(locator, opts) { const resolver = this.getResolverByLocator(locator, opts); return resolver.shouldPersistResolution(locator, opts); } bindDescriptor(descriptor, fromLocator, opts) { const resolver = this.getResolverByDescriptor(descriptor, opts); return resolver.bindDescriptor(descriptor, fromLocator, opts); } getResolutionDependencies(descriptor, opts) { const resolver = this.getResolverByDescriptor(descriptor, opts); return resolver.getResolutionDependencies(descriptor, opts); } async getCandidates(descriptor, dependencies, opts) { const resolver = this.getResolverByDescriptor(descriptor, opts); return await resolver.getCandidates(descriptor, dependencies, opts); } async getSatisfying(descriptor, references, opts) { const resolver = this.getResolverByDescriptor(descriptor, opts); return resolver.getSatisfying(descriptor, references, opts); } async resolve(locator, opts) { const resolver = this.getResolverByLocator(locator, opts); return await resolver.resolve(locator, opts); } tryResolverByDescriptor(descriptor, opts) { const resolver = this.resolvers.find(resolver => resolver.supportsDescriptor(descriptor, opts)); if (!resolver) return null; return resolver; } getResolverByDescriptor(descriptor, opts) { const resolver = this.resolvers.find(resolver => resolver.supportsDescriptor(descriptor, opts)); if (!resolver) throw new Error(`${structUtils.prettyDescriptor(opts.project.configuration, descriptor)} isn't supported by any available resolver`); return resolver; } tryResolverByLocator(locator, opts) { const resolver = this.resolvers.find(resolver => resolver.supportsLocator(locator, opts)); if (!resolver) return null; return resolver; } getResolverByLocator(locator, opts) { const resolver = this.resolvers.find(resolver => resolver.supportsLocator(locator, opts)); if (!resolver) throw new Error(`${structUtils.prettyLocator(opts.project.configuration, locator)} isn't supported by any available resolver`); return resolver; } } exports.MultiResolver = MultiResolver; /***/ }), /***/ 49015: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Project = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const parsers_1 = __webpack_require__(21717); const clipanion_1 = __webpack_require__(87730); const crypto_1 = __webpack_require__(76417); const diff_1 = __webpack_require__(88507); const pick_1 = tslib_1.__importDefault(__webpack_require__(78718)); const p_limit_1 = tslib_1.__importDefault(__webpack_require__(94498)); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const util_1 = __webpack_require__(31669); const v8_1 = tslib_1.__importDefault(__webpack_require__(68987)); const zlib_1 = tslib_1.__importDefault(__webpack_require__(78761)); const Configuration_1 = __webpack_require__(62889); const Installer_1 = __webpack_require__(45006); const LegacyMigrationResolver_1 = __webpack_require__(48900); const LockfileResolver_1 = __webpack_require__(59909); const Manifest_1 = __webpack_require__(11658); const MessageName_1 = __webpack_require__(62755); const MultiResolver_1 = __webpack_require__(54123); const Report_1 = __webpack_require__(50334); const RunInstallPleaseResolver_1 = __webpack_require__(30460); const ThrowReport_1 = __webpack_require__(6059); const Workspace_1 = __webpack_require__(2234); const folderUtils_1 = __webpack_require__(13061); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); const hashUtils = tslib_1.__importStar(__webpack_require__(73279)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const scriptUtils = tslib_1.__importStar(__webpack_require__(50888)); const semverUtils = tslib_1.__importStar(__webpack_require__(51201)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const types_1 = __webpack_require__(79588); const types_2 = __webpack_require__(79588); // When upgraded, the lockfile entries have to be resolved again (but the specific // versions are still pinned, no worry). Bump it when you change the fields within // the Package type; no more no less. const LOCKFILE_VERSION = 4; // Same thing but must be bumped when the members of the Project class changes (we // don't recommend our users to check-in this file, so it's fine to bump it even // between patch or minor releases). const INSTALL_STATE_VERSION = 1; const MULTIPLE_KEYS_REGEXP = / *, */g; const TRAILING_SLASH_REGEXP = /\/$/; const FETCHER_CONCURRENCY = 32; const gzip = util_1.promisify(zlib_1.default.gzip); const gunzip = util_1.promisify(zlib_1.default.gunzip); const INSTALL_STATE_FIELDS = { restoreInstallersCustomData: [ `installersCustomData`, ], restoreResolutions: [ `accessibleLocators`, `optionalBuilds`, `storedDescriptors`, `storedResolutions`, `storedPackages`, `lockFileChecksum`, ], }; class Project { constructor(projectCwd, { configuration }) { /** * Is meant to be populated by the consumer. Should the descriptor referenced * by the key be requested, the descriptor referenced in the value will be * resolved instead. The resolved data will then be used as final resolution * for the initial descriptor. * * Note that the lockfile will contain the second descriptor but not the * first one (meaning that if you remove the alias during a subsequent * install, it'll be lost and the real package will be resolved / installed). */ this.resolutionAliases = new Map(); this.workspaces = []; this.workspacesByCwd = new Map(); this.workspacesByIdent = new Map(); this.storedResolutions = new Map(); this.storedDescriptors = new Map(); this.storedPackages = new Map(); this.storedChecksums = new Map(); this.accessibleLocators = new Set(); this.originalPackages = new Map(); this.optionalBuilds = new Set(); /** * Populated by the `resolveEverything` method. * *Not* stored inside the install state. * * The map keys are 6 hexadecimal characters except the first one, always `p`. */ this.peerRequirements = new Map(); this.installersCustomData = new Map(); this.lockFileChecksum = null; this.configuration = configuration; this.cwd = projectCwd; } static async find(configuration, startingCwd) { var _a, _b, _c; if (!configuration.projectCwd) throw new clipanion_1.UsageError(`No project found in ${startingCwd}`); let packageCwd = configuration.projectCwd; let nextCwd = startingCwd; let currentCwd = null; while (currentCwd !== configuration.projectCwd) { currentCwd = nextCwd; if (fslib_1.xfs.existsSync(fslib_1.ppath.join(currentCwd, fslib_1.Filename.manifest))) { packageCwd = currentCwd; break; } nextCwd = fslib_1.ppath.dirname(currentCwd); } const project = new Project(configuration.projectCwd, { configuration }); (_a = Configuration_1.Configuration.telemetry) === null || _a === void 0 ? void 0 : _a.reportProject(project.cwd); await project.setupResolutions(); await project.setupWorkspaces(); (_b = Configuration_1.Configuration.telemetry) === null || _b === void 0 ? void 0 : _b.reportWorkspaceCount(project.workspaces.length); (_c = Configuration_1.Configuration.telemetry) === null || _c === void 0 ? void 0 : _c.reportDependencyCount(project.workspaces.reduce((sum, workspace) => sum + workspace.manifest.dependencies.size + workspace.manifest.devDependencies.size, 0)); // If we're in a workspace, no need to go any further to find which package we're in const workspace = project.tryWorkspaceByCwd(packageCwd); if (workspace) return { project, workspace, locator: workspace.anchoredLocator }; // Otherwise, we need to ask the project (which will in turn ask the linkers for help) // Note: the trailing slash is caused by a quirk in the PnP implementation that requires folders to end with a trailing slash to disambiguate them from regular files const locator = await project.findLocatorForLocation(`${packageCwd}/`, { strict: true }); if (locator) return { project, locator, workspace: null }; throw new clipanion_1.UsageError(`The nearest package directory (${formatUtils.pretty(configuration, packageCwd, formatUtils.Type.PATH)}) doesn't seem to be part of the project declared in ${formatUtils.pretty(configuration, project.cwd, formatUtils.Type.PATH)}.\n\n- If the project directory is right, it might be that you forgot to list ${formatUtils.pretty(configuration, fslib_1.ppath.relative(project.cwd, packageCwd), formatUtils.Type.PATH)} as a workspace.\n- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`); } static generateBuildStateFile(buildState, locatorStore) { let bstateFile = `# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n`; const bstateData = [...buildState].map(([locatorHash, hash]) => { const locator = locatorStore.get(locatorHash); if (typeof locator === `undefined`) throw new Error(`Assertion failed: The locator should have been registered`); return [structUtils.stringifyLocator(locator), locator.locatorHash, hash]; }); for (const [locatorString, locatorHash, buildHash] of miscUtils.sortMap(bstateData, [d => d[0], d => d[1]])) { bstateFile += `\n`; bstateFile += `# ${locatorString}\n`; bstateFile += `${JSON.stringify(locatorHash)}:\n`; bstateFile += ` ${buildHash}\n`; } return bstateFile; } async setupResolutions() { this.storedResolutions = new Map(); this.storedDescriptors = new Map(); this.storedPackages = new Map(); this.lockFileChecksum = null; const lockfilePath = fslib_1.ppath.join(this.cwd, this.configuration.get(`lockfileFilename`)); const defaultLanguageName = this.configuration.get(`defaultLanguageName`); if (fslib_1.xfs.existsSync(lockfilePath)) { const content = await fslib_1.xfs.readFilePromise(lockfilePath, `utf8`); // We store the salted checksum of the lockfile in order to invalidate the install state when needed this.lockFileChecksum = hashUtils.makeHash(`${INSTALL_STATE_VERSION}`, content); const parsed = parsers_1.parseSyml(content); // Protects against v1 lockfiles if (parsed.__metadata) { const lockfileVersion = parsed.__metadata.version; const cacheKey = parsed.__metadata.cacheKey; for (const key of Object.keys(parsed)) { if (key === `__metadata`) continue; const data = parsed[key]; if (typeof data.resolution === `undefined`) throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${key})`); const locator = structUtils.parseLocator(data.resolution, true); const manifest = new Manifest_1.Manifest(); manifest.load(data, { yamlCompatibilityMode: true }); const version = manifest.version; const languageName = manifest.languageName || defaultLanguageName; const linkType = data.linkType.toUpperCase(); const dependencies = manifest.dependencies; const peerDependencies = manifest.peerDependencies; const dependenciesMeta = manifest.dependenciesMeta; const peerDependenciesMeta = manifest.peerDependenciesMeta; const bin = manifest.bin; if (data.checksum != null) { const checksum = typeof cacheKey !== `undefined` && !data.checksum.includes(`/`) ? `${cacheKey}/${data.checksum}` : data.checksum; this.storedChecksums.set(locator.locatorHash, checksum); } if (lockfileVersion >= LOCKFILE_VERSION) { const pkg = { ...locator, version, languageName, linkType, dependencies, peerDependencies, dependenciesMeta, peerDependenciesMeta, bin }; this.originalPackages.set(pkg.locatorHash, pkg); } for (const entry of key.split(MULTIPLE_KEYS_REGEXP)) { const descriptor = structUtils.parseDescriptor(entry); this.storedDescriptors.set(descriptor.descriptorHash, descriptor); if (lockfileVersion >= LOCKFILE_VERSION) { // If the lockfile is up-to-date, we can simply register the // resolution as a done deal. this.storedResolutions.set(descriptor.descriptorHash, locator.locatorHash); } else { // But if it isn't, then we instead setup an alias so that the // descriptor will be re-resolved (so that we get to retrieve the // new fields) while still resolving to the same locators. const resolutionDescriptor = structUtils.convertLocatorToDescriptor(locator); if (resolutionDescriptor.descriptorHash !== descriptor.descriptorHash) { this.storedDescriptors.set(resolutionDescriptor.descriptorHash, resolutionDescriptor); this.resolutionAliases.set(descriptor.descriptorHash, resolutionDescriptor.descriptorHash); } } } } } } } async setupWorkspaces() { this.workspaces = []; this.workspacesByCwd = new Map(); this.workspacesByIdent = new Map(); let workspaceCwds = [this.cwd]; while (workspaceCwds.length > 0) { const passCwds = workspaceCwds; workspaceCwds = []; for (const workspaceCwd of passCwds) { if (this.workspacesByCwd.has(workspaceCwd)) continue; const workspace = await this.addWorkspace(workspaceCwd); const workspacePkg = this.storedPackages.get(workspace.anchoredLocator.locatorHash); if (workspacePkg) workspace.dependencies = workspacePkg.dependencies; for (const workspaceCwd of workspace.workspacesCwds) { workspaceCwds.push(workspaceCwd); } } } } async addWorkspace(workspaceCwd) { const workspace = new Workspace_1.Workspace(workspaceCwd, { project: this }); await workspace.setup(); const dup = this.workspacesByIdent.get(workspace.locator.identHash); if (typeof dup !== `undefined`) throw new Error(`Duplicate workspace name ${structUtils.prettyIdent(this.configuration, workspace.locator)}: ${workspaceCwd} conflicts with ${dup.cwd}`); this.workspaces.push(workspace); this.workspacesByCwd.set(workspaceCwd, workspace); this.workspacesByIdent.set(workspace.locator.identHash, workspace); return workspace; } get topLevelWorkspace() { return this.getWorkspaceByCwd(this.cwd); } tryWorkspaceByCwd(workspaceCwd) { if (!fslib_1.ppath.isAbsolute(workspaceCwd)) workspaceCwd = fslib_1.ppath.resolve(this.cwd, workspaceCwd); workspaceCwd = fslib_1.ppath.normalize(workspaceCwd) .replace(/\/+$/, ``); const workspace = this.workspacesByCwd.get(workspaceCwd); if (!workspace) return null; return workspace; } getWorkspaceByCwd(workspaceCwd) { const workspace = this.tryWorkspaceByCwd(workspaceCwd); if (!workspace) throw new Error(`Workspace not found (${workspaceCwd})`); return workspace; } tryWorkspaceByFilePath(filePath) { let bestWorkspace = null; for (const workspace of this.workspaces) { const rel = fslib_1.ppath.relative(workspace.cwd, filePath); if (rel.startsWith(`../`)) continue; if (bestWorkspace && bestWorkspace.cwd.length >= workspace.cwd.length) continue; bestWorkspace = workspace; } if (!bestWorkspace) return null; return bestWorkspace; } getWorkspaceByFilePath(filePath) { const workspace = this.tryWorkspaceByFilePath(filePath); if (!workspace) throw new Error(`Workspace not found (${filePath})`); return workspace; } tryWorkspaceByIdent(ident) { const workspace = this.workspacesByIdent.get(ident.identHash); if (typeof workspace === `undefined`) return null; return workspace; } getWorkspaceByIdent(ident) { const workspace = this.tryWorkspaceByIdent(ident); if (!workspace) throw new Error(`Workspace not found (${structUtils.prettyIdent(this.configuration, ident)})`); return workspace; } tryWorkspaceByDescriptor(descriptor) { const workspace = this.tryWorkspaceByIdent(descriptor); if (workspace === null || !workspace.accepts(descriptor.range)) return null; return workspace; } getWorkspaceByDescriptor(descriptor) { const workspace = this.tryWorkspaceByDescriptor(descriptor); if (workspace === null) throw new Error(`Workspace not found (${structUtils.prettyDescriptor(this.configuration, descriptor)})`); return workspace; } tryWorkspaceByLocator(locator) { if (structUtils.isVirtualLocator(locator)) locator = structUtils.devirtualizeLocator(locator); const workspace = this.tryWorkspaceByIdent(locator); if (workspace === null || (workspace.locator.locatorHash !== locator.locatorHash && workspace.anchoredLocator.locatorHash !== locator.locatorHash)) return null; return workspace; } getWorkspaceByLocator(locator) { const workspace = this.tryWorkspaceByLocator(locator); if (!workspace) throw new Error(`Workspace not found (${structUtils.prettyLocator(this.configuration, locator)})`); return workspace; } /** * Import the dependencies of each resolved workspace into their own * `Workspace` instance. */ refreshWorkspaceDependencies() { for (const workspace of this.workspaces) { const pkg = this.storedPackages.get(workspace.anchoredLocator.locatorHash); if (!pkg) throw new Error(`Assertion failed: Expected workspace to have been resolved`); workspace.dependencies = new Map(pkg.dependencies); } } forgetResolution(dataStructure) { const deleteDescriptor = (descriptorHash) => { this.storedResolutions.delete(descriptorHash); this.storedDescriptors.delete(descriptorHash); }; const deleteLocator = (locatorHash) => { this.originalPackages.delete(locatorHash); this.storedPackages.delete(locatorHash); this.accessibleLocators.delete(locatorHash); }; if (`descriptorHash` in dataStructure) { const locatorHash = this.storedResolutions.get(dataStructure.descriptorHash); deleteDescriptor(dataStructure.descriptorHash); // We delete unused locators const remainingResolutions = new Set(this.storedResolutions.values()); if (typeof locatorHash !== `undefined` && !remainingResolutions.has(locatorHash)) { deleteLocator(locatorHash); } } if (`locatorHash` in dataStructure) { deleteLocator(dataStructure.locatorHash); // We delete all of the descriptors that have been resolved to the locator for (const [descriptorHash, locatorHash] of this.storedResolutions) { if (locatorHash === dataStructure.locatorHash) { deleteDescriptor(descriptorHash); } } } } forgetTransientResolutions() { const resolver = this.configuration.makeResolver(); for (const pkg of this.originalPackages.values()) { let shouldPersistResolution; try { shouldPersistResolution = resolver.shouldPersistResolution(pkg, { project: this, resolver }); } catch (_a) { shouldPersistResolution = false; } if (!shouldPersistResolution) { this.forgetResolution(pkg); } } } forgetVirtualResolutions() { for (const pkg of this.storedPackages.values()) { for (const [dependencyHash, dependency] of pkg.dependencies) { if (structUtils.isVirtualDescriptor(dependency)) { pkg.dependencies.set(dependencyHash, structUtils.devirtualizeDescriptor(dependency)); } } } } getDependencyMeta(ident, version) { const dependencyMeta = {}; const dependenciesMeta = this.topLevelWorkspace.manifest.dependenciesMeta; const dependencyMetaSet = dependenciesMeta.get(structUtils.stringifyIdent(ident)); if (!dependencyMetaSet) return dependencyMeta; const defaultMeta = dependencyMetaSet.get(null); if (defaultMeta) Object.assign(dependencyMeta, defaultMeta); if (version === null || !semver_1.default.valid(version)) return dependencyMeta; for (const [range, meta] of dependencyMetaSet) if (range !== null && range === version) Object.assign(dependencyMeta, meta); return dependencyMeta; } async findLocatorForLocation(cwd, { strict = false } = {}) { const report = new ThrowReport_1.ThrowReport(); const linkers = this.configuration.getLinkers(); const linkerOptions = { project: this, report }; for (const linker of linkers) { const locator = await linker.findPackageLocator(cwd, linkerOptions); if (locator) { // If strict mode, the specified cwd must be a package, // not merely contained in a package. if (strict) { const location = await linker.findPackageLocation(locator, linkerOptions); if (location.replace(TRAILING_SLASH_REGEXP, ``) !== cwd.replace(TRAILING_SLASH_REGEXP, ``)) { continue; } } return locator; } } return null; } async resolveEverything(opts) { if (!this.workspacesByCwd || !this.workspacesByIdent) throw new Error(`Workspaces must have been setup before calling this function`); // Reverts the changes that have been applied to the tree because of any previous virtual resolution pass this.forgetVirtualResolutions(); // Ensures that we notice it when dependencies are added / removed from all sources coming from the filesystem if (!opts.lockfileOnly) this.forgetTransientResolutions(); // Note that the resolution process is "offline" until everything has been // successfully resolved; all the processing is expected to have zero side // effects until we're ready to set all the variables at once (the one // exception being when a resolver needs to fetch a package, in which case // we might need to populate the cache). // // This makes it possible to use the same Project instance for multiple // purposes at the same time (since `resolveEverything` is async, it might // happen that we want to do something while waiting for it to end; if we // were to mutate the project then it would end up in a partial state that // could lead to hard-to-debug issues). const realResolver = opts.resolver || this.configuration.makeResolver(); const legacyMigrationResolver = new LegacyMigrationResolver_1.LegacyMigrationResolver(); await legacyMigrationResolver.setup(this, { report: opts.report }); const resolver = opts.lockfileOnly ? new MultiResolver_1.MultiResolver([new LockfileResolver_1.LockfileResolver(), new RunInstallPleaseResolver_1.RunInstallPleaseResolver(realResolver)]) : new MultiResolver_1.MultiResolver([new LockfileResolver_1.LockfileResolver(), legacyMigrationResolver, realResolver]); const fetcher = this.configuration.makeFetcher(); const resolveOptions = opts.lockfileOnly ? { project: this, report: opts.report, resolver } : { project: this, report: opts.report, resolver, fetchOptions: { project: this, cache: opts.cache, checksums: this.storedChecksums, report: opts.report, fetcher } }; const allDescriptors = new Map(); const allPackages = new Map(); const allResolutions = new Map(); const originalPackages = new Map(); const packageResolutionPromises = new Map(); const descriptorResolutionPromises = new Map(); const resolutionQueue = []; const startPackageResolution = async (locator) => { const originalPkg = await miscUtils.prettifyAsyncErrors(async () => { return await resolver.resolve(locator, resolveOptions); }, message => { return `${structUtils.prettyLocator(this.configuration, locator)}: ${message}`; }); if (!structUtils.areLocatorsEqual(locator, originalPkg)) throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${structUtils.prettyLocator(this.configuration, locator)} to ${structUtils.prettyLocator(this.configuration, originalPkg)})`); originalPackages.set(originalPkg.locatorHash, originalPkg); const pkg = this.configuration.normalizePackage(originalPkg); for (const [identHash, descriptor] of pkg.dependencies) { const dependency = await this.configuration.reduceHook(hooks => { return hooks.reduceDependency; }, descriptor, this, pkg, descriptor, { resolver, resolveOptions, }); if (!structUtils.areIdentsEqual(descriptor, dependency)) throw new Error(`Assertion failed: The descriptor ident cannot be changed through aliases`); const bound = resolver.bindDescriptor(dependency, locator, resolveOptions); pkg.dependencies.set(identHash, bound); } resolutionQueue.push(Promise.all([...pkg.dependencies.values()].map(descriptor => { return scheduleDescriptorResolution(descriptor); }))); allPackages.set(pkg.locatorHash, pkg); return pkg; }; const schedulePackageResolution = async (locator) => { const promise = packageResolutionPromises.get(locator.locatorHash); if (typeof promise !== `undefined`) return promise; const newPromise = Promise.resolve().then(() => startPackageResolution(locator)); packageResolutionPromises.set(locator.locatorHash, newPromise); return newPromise; }; const startDescriptorAliasing = async (descriptor, alias) => { const resolution = await scheduleDescriptorResolution(alias); allDescriptors.set(descriptor.descriptorHash, descriptor); allResolutions.set(descriptor.descriptorHash, resolution.locatorHash); return resolution; }; const startDescriptorResolution = async (descriptor) => { const alias = this.resolutionAliases.get(descriptor.descriptorHash); if (typeof alias !== `undefined`) return startDescriptorAliasing(descriptor, this.storedDescriptors.get(alias)); const resolutionDependencies = resolver.getResolutionDependencies(descriptor, resolveOptions); const resolvedDependencies = new Map(await Promise.all(resolutionDependencies.map(async (dependency) => { return [dependency.descriptorHash, await scheduleDescriptorResolution(dependency)]; }))); const candidateResolutions = await miscUtils.prettifyAsyncErrors(async () => { return await resolver.getCandidates(descriptor, resolvedDependencies, resolveOptions); }, message => { return `${structUtils.prettyDescriptor(this.configuration, descriptor)}: ${message}`; }); const finalResolution = candidateResolutions[0]; if (typeof finalResolution === `undefined`) throw new Error(`${structUtils.prettyDescriptor(this.configuration, descriptor)}: No candidates found`); allDescriptors.set(descriptor.descriptorHash, descriptor); allResolutions.set(descriptor.descriptorHash, finalResolution.locatorHash); return schedulePackageResolution(finalResolution); }; const scheduleDescriptorResolution = (descriptor) => { const promise = descriptorResolutionPromises.get(descriptor.descriptorHash); if (typeof promise !== `undefined`) return promise; allDescriptors.set(descriptor.descriptorHash, descriptor); const newPromise = Promise.resolve().then(() => startDescriptorResolution(descriptor)); descriptorResolutionPromises.set(descriptor.descriptorHash, newPromise); return newPromise; }; for (const workspace of this.workspaces) { const workspaceDescriptor = workspace.anchoredDescriptor; resolutionQueue.push(scheduleDescriptorResolution(workspaceDescriptor)); } while (resolutionQueue.length > 0) { const copy = [...resolutionQueue]; resolutionQueue.length = 0; await Promise.all(copy); } // In this step we now create virtual packages for each package with at // least one peer dependency. We also use it to search for the alias // descriptors that aren't depended upon by anything and can be safely // pruned. const volatileDescriptors = new Set(this.resolutionAliases.values()); const optionalBuilds = new Set(allPackages.keys()); const accessibleLocators = new Set(); const peerRequirements = new Map(); applyVirtualResolutionMutations({ project: this, report: opts.report, accessibleLocators, volatileDescriptors, optionalBuilds, peerRequirements, allDescriptors, allResolutions, allPackages, }); // All descriptors still referenced within the volatileDescriptors set are // descriptors that aren't depended upon by anything in the dependency tree. for (const descriptorHash of volatileDescriptors) { allDescriptors.delete(descriptorHash); allResolutions.delete(descriptorHash); } // Everything is done, we can now update our internal resolutions to // reference the new ones this.storedResolutions = allResolutions; this.storedDescriptors = allDescriptors; this.storedPackages = allPackages; this.accessibleLocators = accessibleLocators; this.originalPackages = originalPackages; this.optionalBuilds = optionalBuilds; this.peerRequirements = peerRequirements; // Now that the internal resolutions have been updated, we can refresh the // dependencies of each resolved workspace's `Workspace` instance. this.refreshWorkspaceDependencies(); } async fetchEverything({ cache, report, fetcher: userFetcher }) { const fetcher = userFetcher || this.configuration.makeFetcher(); const fetcherOptions = { checksums: this.storedChecksums, project: this, cache, fetcher, report }; const locatorHashes = Array.from(new Set(miscUtils.sortMap(this.storedResolutions.values(), [ (locatorHash) => { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The locator should have been registered`); return structUtils.stringifyLocator(pkg); }, ]))); let firstError = false; const progress = Report_1.Report.progressViaCounter(locatorHashes.length); report.reportProgress(progress); const limit = p_limit_1.default(FETCHER_CONCURRENCY); await report.startCacheReport(async () => { await Promise.all(locatorHashes.map(locatorHash => limit(async () => { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The locator should have been registered`); if (structUtils.isVirtualLocator(pkg)) return; let fetchResult; try { fetchResult = await fetcher.fetch(pkg, fetcherOptions); } catch (error) { error.message = `${structUtils.prettyLocator(this.configuration, pkg)}: ${error.message}`; report.reportExceptionOnce(error); firstError = error; return; } if (fetchResult.checksum) this.storedChecksums.set(pkg.locatorHash, fetchResult.checksum); else this.storedChecksums.delete(pkg.locatorHash); if (fetchResult.releaseFs) { fetchResult.releaseFs(); } }).finally(() => { progress.tick(); }))); }); if (firstError) { throw firstError; } } async linkEverything({ cache, report, fetcher: optFetcher, skipBuild }) { var _a; const fetcher = optFetcher || this.configuration.makeFetcher(); const fetcherOptions = { checksums: this.storedChecksums, project: this, cache, fetcher, report, skipIntegrityCheck: true }; const linkers = this.configuration.getLinkers(); const linkerOptions = { project: this, report }; const installers = new Map(linkers.map(linker => { const installer = linker.makeInstaller(linkerOptions); const customDataKey = installer.getCustomDataKey(); const customData = this.installersCustomData.get(customDataKey); if (typeof customData !== `undefined`) installer.attachCustomData(customData); return [linker, installer]; })); const packageLinkers = new Map(); const packageLocations = new Map(); const packageBuildDirectives = new Map(); const fetchResultsPerPackage = new Map(await Promise.all([...this.accessibleLocators].map(async (locatorHash) => { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The locator should have been registered`); return [locatorHash, await fetcher.fetch(pkg, fetcherOptions)]; }))); // Step 1: Installing the packages on the disk for (const locatorHash of this.accessibleLocators) { const pkg = this.storedPackages.get(locatorHash); if (typeof pkg === `undefined`) throw new Error(`Assertion failed: The locator should have been registered`); const fetchResult = fetchResultsPerPackage.get(pkg.locatorHash); if (typeof fetchResult === `undefined`) throw new Error(`Assertion failed: The fetch result should have been registered`); const workspace = this.tryWorkspaceByLocator(pkg); if (workspace !== null) { const buildScripts = []; const { scripts } = workspace.manifest; for (const scriptName of [`preinstall`, `install`, `postinstall`]) if (scripts.has(scriptName)) buildScripts.push([Installer_1.BuildType.SCRIPT, scriptName]); try { for (const installer of installers.values()) { const result = await installer.installPackage(pkg, fetchResult); if (result.buildDirective !== null) { throw new Error(`Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core`); } } } finally { if (fetchResult.releaseFs) { fetchResult.releaseFs(); } } const location = fslib_1.ppath.join(fetchResult.packageFs.getRealPath(), fetchResult.prefixPath); packageLocations.set(pkg.locatorHash, location); if (buildScripts.length > 0) { packageBuildDirectives.set(pkg.locatorHash, { directives: buildScripts, buildLocations: [location], }); } } else { const linker = linkers.find(linker => linker.supportsPackage(pkg, linkerOptions)); if (!linker) throw new Report_1.ReportError(MessageName_1.MessageName.LINKER_NOT_FOUND, `${structUtils.prettyLocator(this.configuration, pkg)} isn't supported by any available linker`); const installer = installers.get(linker); if (!installer) throw new Error(`Assertion failed: The installer should have been registered`); let installStatus; try { installStatus = await installer.installPackage(pkg, fetchResult); } finally { if (fetchResult.releaseFs) { fetchResult.releaseFs(); } } packageLinkers.set(pkg.locatorHash, linker); packageLocations.set(pkg.locatorHash, installStatus.packageLocation); if (installStatus.buildDirective && installStatus.packageLocation) { packageBuildDirectives.set(pkg.locatorHash, { directives: installStatus.buildDirective, buildLocations: [installStatus.packageLocation], }); } } } // Step 2: Link packages together const externalDependents = new Map(); for (const locatorHash of this.accessibleLocators) { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The locator should have been registered`); const isWorkspace = this.tryWorkspaceByLocator(pkg) !== null; const linkPackage = async (packageLinker, installer) => { const packageLocation = packageLocations.get(pkg.locatorHash); if (typeof packageLocation === `undefined`) throw new Error(`Assertion failed: The package (${structUtils.prettyLocator(this.configuration, pkg)}) should have been registered`); const internalDependencies = []; for (const descriptor of pkg.dependencies.values()) { const resolution = this.storedResolutions.get(descriptor.descriptorHash); if (typeof resolution === `undefined`) throw new Error(`Assertion failed: The resolution (${structUtils.prettyDescriptor(this.configuration, descriptor)}, from ${structUtils.prettyLocator(this.configuration, pkg)})should have been registered`); const dependency = this.storedPackages.get(resolution); if (typeof dependency === `undefined`) throw new Error(`Assertion failed: The package (${resolution}, resolved from ${structUtils.prettyDescriptor(this.configuration, descriptor)}) should have been registered`); const dependencyLinker = this.tryWorkspaceByLocator(dependency) === null ? packageLinkers.get(resolution) : null; if (typeof dependencyLinker === `undefined`) throw new Error(`Assertion failed: The package (${resolution}, resolved from ${structUtils.prettyDescriptor(this.configuration, descriptor)}) should have been registered`); const isWorkspaceDependency = dependencyLinker === null; if (dependencyLinker === packageLinker || isWorkspace || isWorkspaceDependency) { if (packageLocations.get(dependency.locatorHash) !== null) { internalDependencies.push([descriptor, dependency]); } } else if (packageLocation !== null) { const externalEntry = miscUtils.getArrayWithDefault(externalDependents, resolution); externalEntry.push(packageLocation); } } if (packageLocation !== null) { await installer.attachInternalDependencies(pkg, internalDependencies); } }; if (isWorkspace) { for (const [packageLinker, installer] of installers) { await linkPackage(packageLinker, installer); } } else { const packageLinker = packageLinkers.get(pkg.locatorHash); if (!packageLinker) throw new Error(`Assertion failed: The linker should have been found`); const installer = installers.get(packageLinker); if (!installer) throw new Error(`Assertion failed: The installer should have been registered`); await linkPackage(packageLinker, installer); } } for (const [locatorHash, dependentPaths] of externalDependents) { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The package should have been registered`); const packageLinker = packageLinkers.get(pkg.locatorHash); if (!packageLinker) throw new Error(`Assertion failed: The linker should have been found`); const installer = installers.get(packageLinker); if (!installer) throw new Error(`Assertion failed: The installer should have been registered`); await installer.attachExternalDependents(pkg, dependentPaths); } // Step 3: Inform our linkers that they should have all the info needed const installersCustomData = new Map(); for (const installer of installers.values()) { const finalizeInstallData = await installer.finalizeInstall(); for (const installStatus of (_a = finalizeInstallData === null || finalizeInstallData === void 0 ? void 0 : finalizeInstallData.records) !== null && _a !== void 0 ? _a : []) { packageBuildDirectives.set(installStatus.locatorHash, { directives: installStatus.buildDirective, buildLocations: installStatus.buildLocations, }); } if (typeof (finalizeInstallData === null || finalizeInstallData === void 0 ? void 0 : finalizeInstallData.customData) !== `undefined`) { installersCustomData.set(installer.getCustomDataKey(), finalizeInstallData.customData); } } this.installersCustomData = installersCustomData; await this.persistInstallStateFile(); // Step 4: Build the packages in multiple steps if (skipBuild) return; const readyPackages = new Set(this.storedPackages.keys()); const buildablePackages = new Set(packageBuildDirectives.keys()); for (const locatorHash of buildablePackages) readyPackages.delete(locatorHash); const globalHashGenerator = crypto_1.createHash(`sha512`); globalHashGenerator.update(process.versions.node); this.configuration.triggerHook(hooks => { return hooks.globalHashGeneration; }, this, (data) => { globalHashGenerator.update(`\0`); globalHashGenerator.update(data); }); const globalHash = globalHashGenerator.digest(`hex`); const packageHashMap = new Map(); // We'll use this function is order to compute a hash for each package // that exposes a build directive. If the hash changes compared to the // previous run, the package is rebuilt. This has the advantage of making // the rebuilds much more predictable than before, and to give us the tools // later to improve this further by explaining *why* a rebuild happened. const getBaseHash = (locator) => { let hash = packageHashMap.get(locator.locatorHash); if (typeof hash !== `undefined`) return hash; const pkg = this.storedPackages.get(locator.locatorHash); if (typeof pkg === `undefined`) throw new Error(`Assertion failed: The package should have been registered`); const builder = crypto_1.createHash(`sha512`); builder.update(locator.locatorHash); // To avoid the case where one dependency depends on itself somehow packageHashMap.set(locator.locatorHash, ``); for (const descriptor of pkg.dependencies.values()) { const resolution = this.storedResolutions.get(descriptor.descriptorHash); if (typeof resolution === `undefined`) throw new Error(`Assertion failed: The resolution (${structUtils.prettyDescriptor(this.configuration, descriptor)}) should have been registered`); const dependency = this.storedPackages.get(resolution); if (typeof dependency === `undefined`) throw new Error(`Assertion failed: The package should have been registered`); builder.update(getBaseHash(dependency)); } hash = builder.digest(`hex`); packageHashMap.set(locator.locatorHash, hash); return hash; }; const getBuildHash = (locator, buildLocations) => { const builder = crypto_1.createHash(`sha512`); builder.update(globalHash); builder.update(getBaseHash(locator)); for (const location of buildLocations) builder.update(location); return builder.digest(`hex`); }; const bstatePath = this.configuration.get(`bstatePath`); const bstate = fslib_1.xfs.existsSync(bstatePath) ? parsers_1.parseSyml(await fslib_1.xfs.readFilePromise(bstatePath, `utf8`)) : {}; // We reconstruct the build state from an empty object because we want to // remove the state from packages that got removed const nextBState = new Map(); while (buildablePackages.size > 0) { const savedSize = buildablePackages.size; const buildPromises = []; for (const locatorHash of buildablePackages) { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The package should have been registered`); let isBuildable = true; for (const dependency of pkg.dependencies.values()) { const resolution = this.storedResolutions.get(dependency.descriptorHash); if (!resolution) throw new Error(`Assertion failed: The resolution (${structUtils.prettyDescriptor(this.configuration, dependency)}) should have been registered`); if (buildablePackages.has(resolution)) { isBuildable = false; break; } } // Wait until all dependencies of the current package have been built // before trying to build it (since it might need them to build itself) if (!isBuildable) continue; buildablePackages.delete(locatorHash); const buildInfo = packageBuildDirectives.get(pkg.locatorHash); if (!buildInfo) throw new Error(`Assertion failed: The build directive should have been registered`); const buildHash = getBuildHash(pkg, buildInfo.buildLocations); // No need to rebuild the package if its hash didn't change if (Object.prototype.hasOwnProperty.call(bstate, pkg.locatorHash) && bstate[pkg.locatorHash] === buildHash) { nextBState.set(pkg.locatorHash, buildHash); continue; } if (Object.prototype.hasOwnProperty.call(bstate, pkg.locatorHash)) report.reportInfo(MessageName_1.MessageName.MUST_REBUILD, `${structUtils.prettyLocator(this.configuration, pkg)} must be rebuilt because its dependency tree changed`); else report.reportInfo(MessageName_1.MessageName.MUST_BUILD, `${structUtils.prettyLocator(this.configuration, pkg)} must be built because it never did before or the last one failed`); for (const location of buildInfo.buildLocations) { if (!fslib_1.ppath.isAbsolute(location)) throw new Error(`Assertion failed: Expected the build location to be absolute (not ${location})`); buildPromises.push((async () => { for (const [buildType, scriptName] of buildInfo.directives) { let header = `# This file contains the result of Yarn building a package (${structUtils.stringifyLocator(pkg)})\n`; switch (buildType) { case Installer_1.BuildType.SCRIPT: { header += `# Script name: ${scriptName}\n`; } break; case Installer_1.BuildType.SHELLCODE: { header += `# Script code: ${scriptName}\n`; } break; } const stdin = null; await fslib_1.xfs.mktempPromise(async (logDir) => { const logFile = fslib_1.ppath.join(logDir, `build.log`); const { stdout, stderr } = this.configuration.getSubprocessStreams(logFile, { header, prefix: structUtils.prettyLocator(this.configuration, pkg), report, }); let exitCode; try { switch (buildType) { case Installer_1.BuildType.SCRIPT: { exitCode = await scriptUtils.executePackageScript(pkg, scriptName, [], { cwd: location, project: this, stdin, stdout, stderr }); } break; case Installer_1.BuildType.SHELLCODE: { exitCode = await scriptUtils.executePackageShellcode(pkg, scriptName, [], { cwd: location, project: this, stdin, stdout, stderr }); } break; } } catch (error) { stderr.write(error.stack); exitCode = 1; } stdout.end(); stderr.end(); if (exitCode === 0) { nextBState.set(pkg.locatorHash, buildHash); return true; } fslib_1.xfs.detachTemp(logDir); const buildMessage = `${structUtils.prettyLocator(this.configuration, pkg)} couldn't be built successfully (exit code ${formatUtils.pretty(this.configuration, exitCode, formatUtils.Type.NUMBER)}, logs can be found here: ${formatUtils.pretty(this.configuration, logFile, formatUtils.Type.PATH)})`; report.reportInfo(MessageName_1.MessageName.BUILD_FAILED, buildMessage); if (this.optionalBuilds.has(pkg.locatorHash)) { nextBState.set(pkg.locatorHash, buildHash); return true; } report.reportError(MessageName_1.MessageName.BUILD_FAILED, buildMessage); return false; }); } })()); } } await Promise.all(buildPromises); // If we reach this code, it means that we have circular dependencies // somewhere. Worst, it means that the circular dependencies both have // build scripts, making them unsatisfiable. if (savedSize === buildablePackages.size) { const prettyLocators = Array.from(buildablePackages).map(locatorHash => { const pkg = this.storedPackages.get(locatorHash); if (!pkg) throw new Error(`Assertion failed: The package should have been registered`); return structUtils.prettyLocator(this.configuration, pkg); }).join(`, `); report.reportError(MessageName_1.MessageName.CYCLIC_DEPENDENCIES, `Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${prettyLocators})`); break; } } // We can now generate the bstate file, which will allow us to "remember" // what's the dependency tree subset that we used to build a specific // package (and avoid rebuilding it later if it didn't change). if (nextBState.size > 0) { const bstatePath = this.configuration.get(`bstatePath`); const bstateFile = Project.generateBuildStateFile(nextBState, this.storedPackages); await fslib_1.xfs.mkdirPromise(fslib_1.ppath.dirname(bstatePath), { recursive: true }); await fslib_1.xfs.changeFilePromise(bstatePath, bstateFile, { automaticNewlines: true, }); } else { await fslib_1.xfs.removePromise(bstatePath); } } async install(opts) { var _a, _b; const nodeLinker = this.configuration.get(`nodeLinker`); (_a = Configuration_1.Configuration.telemetry) === null || _a === void 0 ? void 0 : _a.reportInstall(nodeLinker); await opts.report.startTimerPromise(`Project validation`, { skipIfEmpty: true, }, async () => { await this.configuration.triggerHook(hooks => { return hooks.validateProject; }, this, { reportWarning: opts.report.reportWarning.bind(opts.report), reportError: opts.report.reportError.bind(opts.report), }); }); for (const extensionsByIdent of this.configuration.packageExtensions.values()) for (const [, extensionsByRange] of extensionsByIdent) for (const extension of extensionsByRange) extension.status = types_1.PackageExtensionStatus.Inactive; const lockfilePath = fslib_1.ppath.join(this.cwd, this.configuration.get(`lockfileFilename`)); // If we operate with a frozen lockfile, we take a snapshot of it to later make sure it didn't change let initialLockfile = null; if (opts.immutable) { try { initialLockfile = await fslib_1.xfs.readFilePromise(lockfilePath, `utf8`); } catch (error) { if (error.code === `ENOENT`) { throw new Report_1.ReportError(MessageName_1.MessageName.FROZEN_LOCKFILE_EXCEPTION, `The lockfile would have been created by this install, which is explicitly forbidden.`); } else { throw error; } } } await opts.report.startTimerPromise(`Resolution step`, async () => { await this.resolveEverything(opts); }); await opts.report.startTimerPromise(`Post-resolution validation`, { skipIfEmpty: true, }, async () => { for (const [, extensionsPerRange] of this.configuration.packageExtensions) { for (const [, extensions] of extensionsPerRange) { for (const extension of extensions) { if (extension.userProvided) { const prettyPackageExtension = formatUtils.pretty(this.configuration, extension, formatUtils.Type.PACKAGE_EXTENSION); switch (extension.status) { case types_1.PackageExtensionStatus.Inactive: { opts.report.reportWarning(MessageName_1.MessageName.UNUSED_PACKAGE_EXTENSION, `${prettyPackageExtension}: No matching package in the dependency tree; you may not need this rule anymore.`); } break; case types_1.PackageExtensionStatus.Redundant: { opts.report.reportWarning(MessageName_1.MessageName.REDUNDANT_PACKAGE_EXTENSION, `${prettyPackageExtension}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`); } break; } } } } } if (initialLockfile !== null) { const newLockfile = fslib_1.normalizeLineEndings(initialLockfile, this.generateLockfile()); if (newLockfile !== initialLockfile) { const diff = diff_1.structuredPatch(lockfilePath, lockfilePath, initialLockfile, newLockfile); opts.report.reportSeparator(); for (const hunk of diff.hunks) { opts.report.reportInfo(null, `@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`); for (const line of hunk.lines) { if (line.startsWith(`+`)) { opts.report.reportError(MessageName_1.MessageName.FROZEN_LOCKFILE_EXCEPTION, formatUtils.pretty(this.configuration, line, formatUtils.Type.ADDED)); } else if (line.startsWith(`-`)) { opts.report.reportError(MessageName_1.MessageName.FROZEN_LOCKFILE_EXCEPTION, formatUtils.pretty(this.configuration, line, formatUtils.Type.REMOVED)); } else { opts.report.reportInfo(null, formatUtils.pretty(this.configuration, line, `grey`)); } } } opts.report.reportSeparator(); throw new Report_1.ReportError(MessageName_1.MessageName.FROZEN_LOCKFILE_EXCEPTION, `The lockfile would have been modified by this install, which is explicitly forbidden.`); } } }); for (const extensionsByIdent of this.configuration.packageExtensions.values()) for (const [, extensionsByRange] of extensionsByIdent) for (const extension of extensionsByRange) if (extension.userProvided && extension.status === types_1.PackageExtensionStatus.Active) (_b = Configuration_1.Configuration.telemetry) === null || _b === void 0 ? void 0 : _b.reportPackageExtension(formatUtils.json(extension, formatUtils.Type.PACKAGE_EXTENSION)); await opts.report.startTimerPromise(`Fetch step`, async () => { await this.fetchEverything(opts); if (typeof opts.persistProject === `undefined` || opts.persistProject) { await this.cacheCleanup(opts); } }); if (typeof opts.persistProject === `undefined` || opts.persistProject) await this.persist(); await opts.report.startTimerPromise(`Link step`, async () => { const immutablePatterns = opts.immutable ? [...new Set(this.configuration.get(`immutablePatterns`))].sort() : []; const before = await Promise.all(immutablePatterns.map(async (pattern) => { return hashUtils.checksumPattern(pattern, { cwd: this.cwd }); })); await this.linkEverything(opts); const after = await Promise.all(immutablePatterns.map(async (pattern) => { return hashUtils.checksumPattern(pattern, { cwd: this.cwd }); })); for (let t = 0; t < immutablePatterns.length; ++t) { if (before[t] !== after[t]) { opts.report.reportError(MessageName_1.MessageName.FROZEN_ARTIFACT_EXCEPTION, `The checksum for ${immutablePatterns[t]} has been modified by this install, which is explicitly forbidden.`); } } }); await this.persistInstallStateFile(); await this.configuration.triggerHook(hooks => { return hooks.afterAllInstalled; }, this, opts); } generateLockfile() { // We generate the data structure that will represent our lockfile. To do this, we create a // reverse lookup table, where the key will be the resolved locator and the value will be a set // of all the descriptors that resolved to it. Then we use it to construct an optimized version // if the final object. const reverseLookup = new Map(); for (const [descriptorHash, locatorHash] of this.storedResolutions.entries()) { let descriptorHashes = reverseLookup.get(locatorHash); if (!descriptorHashes) reverseLookup.set(locatorHash, descriptorHashes = new Set()); descriptorHashes.add(descriptorHash); } const optimizedLockfile = {}; optimizedLockfile.__metadata = { version: LOCKFILE_VERSION, }; for (const [locatorHash, descriptorHashes] of reverseLookup.entries()) { const pkg = this.originalPackages.get(locatorHash); // A resolution that isn't in `originalPackages` is a virtual packages. // Since virtual packages can be derived from the information stored in // the rest of the lockfile we don't want to bother storing them. if (!pkg) continue; const descriptors = []; for (const descriptorHash of descriptorHashes) { const descriptor = this.storedDescriptors.get(descriptorHash); if (!descriptor) throw new Error(`Assertion failed: The descriptor should have been registered`); descriptors.push(descriptor); } const key = descriptors.map(descriptor => { return structUtils.stringifyDescriptor(descriptor); }).sort().join(`, `); const manifest = new Manifest_1.Manifest(); manifest.version = pkg.linkType === types_2.LinkType.HARD ? pkg.version : `0.0.0-use.local`; manifest.languageName = pkg.languageName; manifest.dependencies = new Map(pkg.dependencies); manifest.peerDependencies = new Map(pkg.peerDependencies); manifest.dependenciesMeta = new Map(pkg.dependenciesMeta); manifest.peerDependenciesMeta = new Map(pkg.peerDependenciesMeta); manifest.bin = new Map(pkg.bin); let entryChecksum; const checksum = this.storedChecksums.get(pkg.locatorHash); if (typeof checksum !== `undefined`) { const cacheKeyIndex = checksum.indexOf(`/`); if (cacheKeyIndex === -1) throw new Error(`Assertion failed: Expecte the checksum to reference its cache key`); const cacheKey = checksum.slice(0, cacheKeyIndex); const hash = checksum.slice(cacheKeyIndex + 1); if (typeof optimizedLockfile.__metadata.cacheKey === `undefined`) optimizedLockfile.__metadata.cacheKey = cacheKey; if (cacheKey === optimizedLockfile.__metadata.cacheKey) { entryChecksum = hash; } else { entryChecksum = checksum; } } optimizedLockfile[key] = { ...manifest.exportTo({}, { compatibilityMode: false, }), linkType: pkg.linkType.toLowerCase(), resolution: structUtils.stringifyLocator(pkg), checksum: entryChecksum, }; } const header = `${[ `# This file is generated by running "yarn install" inside your project.\n`, `# Manual changes might be lost - proceed with caution!\n`, ].join(``)}\n`; return header + parsers_1.stringifySyml(optimizedLockfile); } async persistLockfile() { const lockfilePath = fslib_1.ppath.join(this.cwd, this.configuration.get(`lockfileFilename`)); const lockfileContent = this.generateLockfile(); await fslib_1.xfs.changeFilePromise(lockfilePath, lockfileContent, { automaticNewlines: true, }); } async persistInstallStateFile() { const fields = []; for (const category of Object.values(INSTALL_STATE_FIELDS)) fields.push(...category); const installState = pick_1.default(this, fields); const serializedState = await gzip(v8_1.default.serialize(installState)); const installStatePath = this.configuration.get(`installStatePath`); await fslib_1.xfs.mkdirPromise(fslib_1.ppath.dirname(installStatePath), { recursive: true }); await fslib_1.xfs.changeFilePromise(installStatePath, serializedState); } async restoreInstallState({ restoreInstallersCustomData = true, restoreResolutions = true } = {}) { const installStatePath = this.configuration.get(`installStatePath`); if (!fslib_1.xfs.existsSync(installStatePath)) { if (restoreResolutions) await this.applyLightResolution(); return; } const serializedState = await fslib_1.xfs.readFilePromise(installStatePath); const installState = v8_1.default.deserialize(await gunzip(serializedState)); if (restoreInstallersCustomData) if (typeof installState.installersCustomData !== `undefined`) this.installersCustomData = installState.installersCustomData; if (restoreResolutions) { if (installState.lockFileChecksum === this.lockFileChecksum) { Object.assign(this, pick_1.default(installState, INSTALL_STATE_FIELDS.restoreResolutions)); this.refreshWorkspaceDependencies(); } else { await this.applyLightResolution(); } } } async applyLightResolution() { await this.resolveEverything({ lockfileOnly: true, report: new ThrowReport_1.ThrowReport(), }); await this.persistInstallStateFile(); } async persist() { await this.persistLockfile(); for (const workspace of this.workspacesByCwd.values()) { await workspace.persistManifest(); } } async cacheCleanup({ cache, report }) { const PRESERVED_FILES = new Set([ `.gitignore`, ]); if (!fslib_1.xfs.existsSync(cache.cwd)) return; if (!folderUtils_1.isFolderInside(cache.cwd, this.cwd)) return; for (const entry of await fslib_1.xfs.readdirPromise(cache.cwd)) { if (PRESERVED_FILES.has(entry)) continue; const entryPath = fslib_1.ppath.resolve(cache.cwd, entry); if (cache.markedFiles.has(entryPath)) continue; if (cache.immutable) { report.reportError(MessageName_1.MessageName.IMMUTABLE_CACHE, `${formatUtils.pretty(this.configuration, fslib_1.ppath.basename(entryPath), `magenta`)} appears to be unused and would marked for deletion, but the cache is immutable`); } else { report.reportInfo(MessageName_1.MessageName.UNUSED_CACHE_ENTRY, `${formatUtils.pretty(this.configuration, fslib_1.ppath.basename(entryPath), `magenta`)} appears to be unused - removing`); await fslib_1.xfs.removePromise(entryPath); } } cache.markedFiles.clear(); } } exports.Project = Project; /** * This function is worth some documentation. It takes a set of packages, * traverses them all, and generates virtual packages for each package that * lists peer dependencies. * * We also take advantage of the tree traversal to detect which packages are * actually used and which have disappeared, and to know which packages truly * have an optional build (since a package may be optional in one part of the * tree but not another). */ function applyVirtualResolutionMutations({ project, allDescriptors, allResolutions, allPackages, accessibleLocators = new Set(), optionalBuilds = new Set(), volatileDescriptors = new Set(), peerRequirements = new Map(), report, tolerateMissingPackages = false, }) { var _a; const virtualStack = new Map(); const resolutionStack = []; const allIdents = new Map(); // We'll be keeping track of all virtual descriptors; once they have all // been generated we'll check whether they can be consolidated into one. const allVirtualInstances = new Map(); const allVirtualDependents = new Map(); // First key is the first package that requests the peer dependency. Second // key is the name of the package in the peer dependency. Value is the list // of all packages that extend the original peer requirement. const peerDependencyLinks = new Map(); // We keep track on which package depend on which other package with peer // dependencies; this way we can emit warnings for them later on. const peerDependencyDependents = new Map(); // We must keep a copy of the workspaces original dependencies, because they // may be overriden during the virtual package resolution - cf Dragon Test #5 const originalWorkspaceDefinitions = new Map(project.workspaces.map(workspace => { const locatorHash = workspace.anchoredLocator.locatorHash; const pkg = allPackages.get(locatorHash); if (typeof pkg === `undefined`) { if (tolerateMissingPackages) { return [locatorHash, null]; } else { throw new Error(`Assertion failed: The workspace should have an associated package`); } } return [locatorHash, structUtils.copyPackage(pkg)]; })); const reportStackOverflow = () => { const logDir = fslib_1.xfs.mktempSync(); const logFile = fslib_1.ppath.join(logDir, `stacktrace.log`); const maxSize = String(resolutionStack.length + 1).length; const content = resolutionStack.map((locator, index) => { const prefix = `${index + 1}.`.padStart(maxSize, ` `); return `${prefix} ${structUtils.stringifyLocator(locator)}\n`; }).join(``); fslib_1.xfs.writeFileSync(logFile, content); throw new Report_1.ReportError(MessageName_1.MessageName.STACK_OVERFLOW_RESOLUTION, `Encountered a stack overflow when resolving peer dependencies; cf ${logFile}`); }; const getPackageFromDescriptor = (descriptor) => { const resolution = allResolutions.get(descriptor.descriptorHash); if (typeof resolution === `undefined`) throw new Error(`Assertion failed: The resolution should have been registered`); const pkg = allPackages.get(resolution); if (!pkg) throw new Error(`Assertion failed: The package could not be found`); return pkg; }; const resolvePeerDependencies = (parentLocator, peerSlots, { first, optional }) => { if (resolutionStack.length > 1000) reportStackOverflow(); resolutionStack.push(parentLocator); const result = resolvePeerDependenciesImpl(parentLocator, peerSlots, { first, optional }); resolutionStack.pop(); return result; }; const resolvePeerDependenciesImpl = (parentLocator, peerSlots, { first, optional }) => { if (accessibleLocators.has(parentLocator.locatorHash)) return; accessibleLocators.add(parentLocator.locatorHash); if (!optional) optionalBuilds.delete(parentLocator.locatorHash); const parentPackage = allPackages.get(parentLocator.locatorHash); if (!parentPackage) { if (tolerateMissingPackages) { return; } else { throw new Error(`Assertion failed: The package (${structUtils.prettyLocator(project.configuration, parentLocator)}) should have been registered`); } } const newVirtualInstances = []; const firstPass = []; const secondPass = []; const thirdPass = []; const fourthPass = []; // During this first pass we virtualize the descriptors. This allows us // to reference them from their sibling without being order-dependent, // which is required to solve cases where packages with peer dependencies // have peer dependencies themselves. for (const descriptor of Array.from(parentPackage.dependencies.values())) { // We shouldn't virtualize the package if it was obtained through a peer // dependency (which can't be the case for workspaces when resolved // through their top-level) if (parentPackage.peerDependencies.has(descriptor.identHash) && !first) continue; // We had some issues where virtual packages were incorrectly set inside // workspaces, causing leaks. Check the Dragon Test #5 for more details. if (structUtils.isVirtualDescriptor(descriptor)) throw new Error(`Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch`); // Mark this package as being used (won't be removed from the lockfile) volatileDescriptors.delete(descriptor.descriptorHash); // Detect whether this package is being required let isOptional = optional; if (!isOptional) { const dependencyMetaSet = parentPackage.dependenciesMeta.get(structUtils.stringifyIdent(descriptor)); if (typeof dependencyMetaSet !== `undefined`) { const dependencyMeta = dependencyMetaSet.get(null); if (typeof dependencyMeta !== `undefined` && dependencyMeta.optional) { isOptional = true; } } } const resolution = allResolutions.get(descriptor.descriptorHash); if (!resolution) { // Note that we can't use `getPackageFromDescriptor` (defined below, // because when doing the initial tree building right after loading the // project it's possible that we get some entries that haven't been // registered into the lockfile yet - for example when the user has // manually changed the package.json dependencies) if (tolerateMissingPackages) { continue; } else { throw new Error(`Assertion failed: The resolution (${structUtils.prettyDescriptor(project.configuration, descriptor)}) should have been registered`); } } const pkg = originalWorkspaceDefinitions.get(resolution) || allPackages.get(resolution); if (!pkg) throw new Error(`Assertion failed: The package (${resolution}, resolved from ${structUtils.prettyDescriptor(project.configuration, descriptor)}) should have been registered`); if (pkg.peerDependencies.size === 0) { resolvePeerDependencies(pkg, new Map(), { first: false, optional: isOptional }); continue; } // The stack overflow is checked against two level because a workspace // may have a dev dependency on another workspace that lists the first // one as a regular dependency. In this case the loop will break so we // don't need to throw an exception. const stackDepth = virtualStack.get(pkg.locatorHash); if (typeof stackDepth === `number` && stackDepth >= 2) reportStackOverflow(); let virtualizedDescriptor; let virtualizedPackage; const missingPeerDependencies = new Set(); let nextPeerSlots; firstPass.push(() => { virtualizedDescriptor = structUtils.virtualizeDescriptor(descriptor, parentLocator.locatorHash); virtualizedPackage = structUtils.virtualizePackage(pkg, parentLocator.locatorHash); parentPackage.dependencies.delete(descriptor.identHash); parentPackage.dependencies.set(virtualizedDescriptor.identHash, virtualizedDescriptor); allResolutions.set(virtualizedDescriptor.descriptorHash, virtualizedPackage.locatorHash); allDescriptors.set(virtualizedDescriptor.descriptorHash, virtualizedDescriptor); allPackages.set(virtualizedPackage.locatorHash, virtualizedPackage); // Keep track of all new virtual packages since we'll want to dedupe them newVirtualInstances.push([pkg, virtualizedDescriptor, virtualizedPackage]); }); secondPass.push(() => { var _a; nextPeerSlots = new Map(); for (const peerRequest of virtualizedPackage.peerDependencies.values()) { let peerDescriptor = parentPackage.dependencies.get(peerRequest.identHash); if (!peerDescriptor && structUtils.areIdentsEqual(parentLocator, peerRequest)) { peerDescriptor = structUtils.convertLocatorToDescriptor(parentLocator); allDescriptors.set(peerDescriptor.descriptorHash, peerDescriptor); allResolutions.set(peerDescriptor.descriptorHash, parentLocator.locatorHash); volatileDescriptors.delete(peerDescriptor.descriptorHash); } if (!peerDescriptor && virtualizedPackage.dependencies.has(peerRequest.identHash)) { virtualizedPackage.peerDependencies.delete(peerRequest.identHash); continue; } if (!peerDescriptor) peerDescriptor = structUtils.makeDescriptor(peerRequest, `missing:`); virtualizedPackage.dependencies.set(peerDescriptor.identHash, peerDescriptor); // Need to track when a virtual descriptor is set as a dependency in case // the descriptor will be consolidated. if (structUtils.isVirtualDescriptor(peerDescriptor)) { const dependents = miscUtils.getSetWithDefault(allVirtualDependents, peerDescriptor.descriptorHash); dependents.add(virtualizedPackage.locatorHash); } allIdents.set(peerDescriptor.identHash, peerDescriptor); if (peerDescriptor.range === `missing:`) missingPeerDependencies.add(peerDescriptor.identHash); nextPeerSlots.set(peerRequest.identHash, (_a = peerSlots.get(peerRequest.identHash)) !== null && _a !== void 0 ? _a : virtualizedPackage.locatorHash); } // Since we've had to add new dependencies we need to sort them all over again virtualizedPackage.dependencies = new Map(miscUtils.sortMap(virtualizedPackage.dependencies, ([identHash, descriptor]) => { return structUtils.stringifyIdent(descriptor); })); }); thirdPass.push(() => { if (!allPackages.has(virtualizedPackage.locatorHash)) return; const current = virtualStack.get(pkg.locatorHash); const next = typeof current !== `undefined` ? current + 1 : 1; virtualStack.set(pkg.locatorHash, next); resolvePeerDependencies(virtualizedPackage, nextPeerSlots, { first: false, optional: isOptional }); virtualStack.set(pkg.locatorHash, next - 1); }); fourthPass.push(() => { // Regardless of whether the initial virtualized package got deduped // or not, we now register that *this* package is now a dependent on // whatever its peer dependencies have been resolved to. We'll later // use this information to generate warnings. const finalDescriptor = parentPackage.dependencies.get(descriptor.identHash); if (typeof finalDescriptor === `undefined`) throw new Error(`Assertion failed: Expected the peer dependency to have been turned into a dependency`); const finalResolution = allResolutions.get(finalDescriptor.descriptorHash); if (typeof finalResolution === `undefined`) throw new Error(`Assertion failed: Expected the descriptor to be registered`); miscUtils.getSetWithDefault(peerDependencyDependents, finalResolution).add(parentLocator.locatorHash); if (!allPackages.has(virtualizedPackage.locatorHash)) return; for (const descriptor of virtualizedPackage.peerDependencies.values()) { const root = nextPeerSlots.get(descriptor.identHash); if (typeof root === `undefined`) throw new Error(`Assertion failed: Expected the peer dependency ident to be registered`); miscUtils.getArrayWithDefault(miscUtils.getMapWithDefault(peerDependencyLinks, root), structUtils.stringifyIdent(descriptor)).push(virtualizedPackage.locatorHash); } for (const missingPeerDependency of missingPeerDependencies) { virtualizedPackage.dependencies.delete(missingPeerDependency); } }); } for (const fn of [...firstPass, ...secondPass]) fn(); let stable; do { stable = true; for (const [physicalLocator, virtualDescriptor, virtualPackage] of newVirtualInstances) { if (!allPackages.has(virtualPackage.locatorHash)) continue; const otherVirtualInstances = miscUtils.getMapWithDefault(allVirtualInstances, physicalLocator.locatorHash); // We take all the dependencies from the new virtual instance and // generate a hash from it. By checking if this hash is already // registered, we know whether we can trim the new version. const dependencyHash = hashUtils.makeHash(...[...virtualPackage.dependencies.values()].map(descriptor => { const resolution = descriptor.range !== `missing:` ? allResolutions.get(descriptor.descriptorHash) : `missing:`; if (typeof resolution === `undefined`) throw new Error(`Assertion failed: Expected the resolution for ${structUtils.prettyDescriptor(project.configuration, descriptor)} to have been registered`); return resolution; }), // We use the identHash to disambiguate between virtual descriptors // with different base idents being resolved to the same virtual package. // Note: We don't use the descriptorHash because the whole point of duplicate // virtual descriptors is that they have different `virtual:` ranges. // This causes the virtual descriptors with different base idents // to be preserved, while the virtual package they resolve to gets deduped. virtualDescriptor.identHash); const masterDescriptor = otherVirtualInstances.get(dependencyHash); if (typeof masterDescriptor === `undefined`) { otherVirtualInstances.set(dependencyHash, virtualDescriptor); continue; } // Since we're applying multiple pass, we might have already registered // ourselves as the "master" descriptor in the previous pass. if (masterDescriptor === virtualDescriptor) continue; stable = false; allPackages.delete(virtualPackage.locatorHash); allDescriptors.delete(virtualDescriptor.descriptorHash); allResolutions.delete(virtualDescriptor.descriptorHash); accessibleLocators.delete(virtualPackage.locatorHash); const dependents = allVirtualDependents.get(virtualDescriptor.descriptorHash) || []; const allDependents = [parentPackage.locatorHash, ...dependents]; allVirtualDependents.delete(virtualDescriptor.descriptorHash); for (const dependent of allDependents) { const pkg = allPackages.get(dependent); if (typeof pkg === `undefined`) continue; pkg.dependencies.set(virtualDescriptor.identHash, masterDescriptor); } } } while (!stable); for (const fn of [...thirdPass, ...fourthPass]) { fn(); } }; for (const workspace of project.workspaces) { volatileDescriptors.delete(workspace.anchoredDescriptor.descriptorHash); resolvePeerDependencies(workspace.anchoredLocator, new Map(), { first: true, optional: false }); } let WarningType; (function (WarningType) { WarningType[WarningType["NotProvided"] = 0] = "NotProvided"; WarningType[WarningType["NotCompatible"] = 1] = "NotCompatible"; })(WarningType || (WarningType = {})); const warnings = []; for (const [rootHash, dependents] of peerDependencyDependents) { const root = allPackages.get(rootHash); if (typeof root === `undefined`) throw new Error(`Assertion failed: Expected the root to be registered`); // We retrieve the set of packages that provide complementary peer // dependencies to the one already offered by our root package, and to // whom other package. // // We simply skip if the record doesn't exist because a package may not // have any records if it didn't contribute any new peer (it only exists // if the package has at least one peer that isn't listed by its parent // packages). // const rootLinks = peerDependencyLinks.get(rootHash); if (typeof rootLinks === `undefined`) continue; for (const dependentHash of dependents) { const dependent = allPackages.get(dependentHash); // The package may have been pruned during a deduplication if (typeof dependent === `undefined`) continue; for (const [identStr, linkHashes] of rootLinks) { const ident = structUtils.parseIdent(identStr); // This dependent may have a peer dep itself, in which case it's not // the true root, and we can ignore it if (dependent.peerDependencies.has(ident.identHash)) continue; const hash = `p${hashUtils.makeHash(dependentHash, identStr, rootHash).slice(0, 5)}`; peerRequirements.set(hash, { subject: dependentHash, requested: ident, rootRequester: rootHash, allRequesters: linkHashes, }); // Note: this can be undefined when the peer dependency isn't provided at all const resolvedDescriptor = root.dependencies.get(ident.identHash); if (typeof resolvedDescriptor !== `undefined`) { const peerResolution = getPackageFromDescriptor(resolvedDescriptor); const peerVersion = (_a = peerResolution.version) !== null && _a !== void 0 ? _a : `0.0.0`; const ranges = new Set(); for (const linkHash of linkHashes) { const link = allPackages.get(linkHash); if (typeof link === `undefined`) throw new Error(`Assertion failed: Expected the link to be registered`); const peerDependency = link.peerDependencies.get(ident.identHash); if (typeof peerDependency === `undefined`) throw new Error(`Assertion failed: Expected the ident to be registered`); ranges.add(peerDependency.range); } const satisfiesAll = [...ranges].every(range => { return semverUtils.satisfiesWithPrereleases(peerVersion, range); }); if (!satisfiesAll) { warnings.push({ type: WarningType.NotCompatible, subject: dependent, requested: ident, requester: root, version: peerVersion, hash, requirementCount: linkHashes.length, }); } } else { const peerDependencyMeta = root.peerDependenciesMeta.get(identStr); if (!(peerDependencyMeta === null || peerDependencyMeta === void 0 ? void 0 : peerDependencyMeta.optional)) { warnings.push({ type: WarningType.NotProvided, subject: dependent, requested: ident, requester: root, hash, }); } } } } } const warningSortCriterias = [ warning => structUtils.prettyLocatorNoColors(warning.subject), warning => structUtils.stringifyIdent(warning.requested), warning => `${warning.type}`, ]; for (const warning of miscUtils.sortMap(warnings, warningSortCriterias)) { switch (warning.type) { case WarningType.NotProvided: { report === null || report === void 0 ? void 0 : report.reportWarning(MessageName_1.MessageName.MISSING_PEER_DEPENDENCY, `${structUtils.prettyLocator(project.configuration, warning.subject)} doesn't provide ${structUtils.prettyIdent(project.configuration, warning.requested)} (${formatUtils.pretty(project.configuration, warning.hash, formatUtils.Type.CODE)}), requested by ${structUtils.prettyIdent(project.configuration, warning.requester)}`); } break; case WarningType.NotCompatible: { const andDescendants = warning.requirementCount > 1 ? `and some of its descendants request` : `requests`; report === null || report === void 0 ? void 0 : report.reportWarning(MessageName_1.MessageName.INCOMPATIBLE_PEER_DEPENDENCY, `${structUtils.prettyLocator(project.configuration, warning.subject)} provides ${structUtils.prettyIdent(project.configuration, warning.requested)} (${formatUtils.pretty(project.configuration, warning.hash, formatUtils.Type.CODE)}) with version ${structUtils.prettyReference(project.configuration, warning.version)}, which doesn't satisfy what ${structUtils.prettyIdent(project.configuration, warning.requester)} ${andDescendants}`); } break; } } if (warnings.length > 0) { report === null || report === void 0 ? void 0 : report.reportWarning(MessageName_1.MessageName.UNNAMED, `Some peer dependencies are incorrectly met; run ${formatUtils.pretty(project.configuration, `yarn explain peer-requirements `, formatUtils.Type.CODE)} for details, where ${formatUtils.pretty(project.configuration, ``, formatUtils.Type.CODE)} is the six-letter p-prefixed code`); } } /***/ }), /***/ 6729: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ProtocolResolver = exports.TAG_REGEXP = void 0; const tslib_1 = __webpack_require__(70655); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const semverUtils = tslib_1.__importStar(__webpack_require__(51201)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); exports.TAG_REGEXP = /^(?!v)[a-z0-9-.]+$/i; class ProtocolResolver { supportsDescriptor(descriptor, opts) { if (semverUtils.validRange(descriptor.range)) return true; if (exports.TAG_REGEXP.test(descriptor.range)) return true; return false; } supportsLocator(locator, opts) { if (semver_1.default.valid(locator.reference)) return true; if (exports.TAG_REGEXP.test(locator.reference)) return true; return false; } shouldPersistResolution(locator, opts) { return opts.resolver.shouldPersistResolution(this.forwardLocator(locator, opts), opts); } bindDescriptor(descriptor, fromLocator, opts) { return opts.resolver.bindDescriptor(this.forwardDescriptor(descriptor, opts), fromLocator, opts); } getResolutionDependencies(descriptor, opts) { return opts.resolver.getResolutionDependencies(this.forwardDescriptor(descriptor, opts), opts); } async getCandidates(descriptor, dependencies, opts) { return await opts.resolver.getCandidates(this.forwardDescriptor(descriptor, opts), dependencies, opts); } async getSatisfying(descriptor, references, opts) { return await opts.resolver.getSatisfying(this.forwardDescriptor(descriptor, opts), references, opts); } async resolve(locator, opts) { const pkg = await opts.resolver.resolve(this.forwardLocator(locator, opts), opts); return structUtils.renamePackage(pkg, locator); } forwardDescriptor(descriptor, opts) { return structUtils.makeDescriptor(descriptor, `${opts.project.configuration.get(`defaultProtocol`)}${descriptor.range}`); } forwardLocator(locator, opts) { return structUtils.makeLocator(locator, `${opts.project.configuration.get(`defaultProtocol`)}${locator.reference}`); } } exports.ProtocolResolver = ProtocolResolver; /***/ }), /***/ 50334: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Report = exports.isReportError = exports.ReportError = void 0; const stream_1 = __webpack_require__(92413); const string_decoder_1 = __webpack_require__(24304); const MessageName_1 = __webpack_require__(62755); class ReportError extends Error { constructor(code, message, reportExtra) { super(message); this.reportExtra = reportExtra; this.reportCode = code; } } exports.ReportError = ReportError; function isReportError(error) { return typeof error.reportCode !== `undefined`; } exports.isReportError = isReportError; class Report { constructor() { this.reportedInfos = new Set(); this.reportedWarnings = new Set(); this.reportedErrors = new Set(); } static progressViaCounter(max) { let current = 0; let unlock; let lock = new Promise(resolve => { unlock = resolve; }); const set = (n) => { const thisUnlock = unlock; lock = new Promise(resolve => { unlock = resolve; }); current = n; thisUnlock(); }; const tick = (n = 0) => { set(current + 1); }; const gen = (async function* () { while (current < max) { await lock; yield { progress: current / max, }; } })(); return { [Symbol.asyncIterator]() { return gen; }, set, tick, }; } reportInfoOnce(name, text, opts) { const key = opts && opts.key ? opts.key : text; if (!this.reportedInfos.has(key)) { this.reportedInfos.add(key); this.reportInfo(name, text); } } reportWarningOnce(name, text, opts) { const key = opts && opts.key ? opts.key : text; if (!this.reportedWarnings.has(key)) { this.reportedWarnings.add(key); this.reportWarning(name, text); } } reportErrorOnce(name, text, opts) { var _a; const key = opts && opts.key ? opts.key : text; if (!this.reportedErrors.has(key)) { this.reportedErrors.add(key); this.reportError(name, text); (_a = opts === null || opts === void 0 ? void 0 : opts.reportExtra) === null || _a === void 0 ? void 0 : _a.call(opts, this); } } reportExceptionOnce(error) { if (isReportError(error)) { this.reportErrorOnce(error.reportCode, error.message, { key: error, reportExtra: error.reportExtra }); } else { this.reportErrorOnce(MessageName_1.MessageName.EXCEPTION, error.stack || error.message, { key: error }); } } createStreamReporter(prefix = null) { const stream = new stream_1.PassThrough(); const decoder = new string_decoder_1.StringDecoder(); let buffer = ``; stream.on(`data`, chunk => { let chunkStr = decoder.write(chunk); let lineIndex; do { lineIndex = chunkStr.indexOf(`\n`); if (lineIndex !== -1) { const line = buffer + chunkStr.substr(0, lineIndex); chunkStr = chunkStr.substr(lineIndex + 1); buffer = ``; if (prefix !== null) { this.reportInfo(null, `${prefix} ${line}`); } else { this.reportInfo(null, line); } } } while (lineIndex !== -1); buffer += chunkStr; }); stream.on(`end`, () => { const last = decoder.end(); if (last !== ``) { if (prefix !== null) { this.reportInfo(null, `${prefix} ${last}`); } else { this.reportInfo(null, last); } } }); return stream; } } exports.Report = Report; /***/ }), /***/ 30460: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RunInstallPleaseResolver = void 0; const MessageName_1 = __webpack_require__(62755); const Report_1 = __webpack_require__(50334); class RunInstallPleaseResolver { constructor(resolver) { this.resolver = resolver; } supportsDescriptor(descriptor, opts) { return this.resolver.supportsDescriptor(descriptor, opts); } supportsLocator(locator, opts) { return this.resolver.supportsLocator(locator, opts); } shouldPersistResolution(locator, opts) { return this.resolver.shouldPersistResolution(locator, opts); } bindDescriptor(descriptor, fromLocator, opts) { return this.resolver.bindDescriptor(descriptor, fromLocator, opts); } getResolutionDependencies(descriptor, opts) { return this.resolver.getResolutionDependencies(descriptor, opts); } async getCandidates(descriptor, dependencies, opts) { throw new Report_1.ReportError(MessageName_1.MessageName.MISSING_LOCKFILE_ENTRY, `This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions`); } async getSatisfying(descriptor, references, opts) { throw new Report_1.ReportError(MessageName_1.MessageName.MISSING_LOCKFILE_ENTRY, `This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions`); } async resolve(locator, opts) { throw new Report_1.ReportError(MessageName_1.MessageName.MISSING_LOCKFILE_ENTRY, `This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions`); } } exports.RunInstallPleaseResolver = RunInstallPleaseResolver; /***/ }), /***/ 73759: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.StreamReport = exports.formatNameWithHyperlink = exports.formatName = void 0; const tslib_1 = __webpack_require__(70655); const slice_ansi_1 = tslib_1.__importDefault(__webpack_require__(28231)); const MessageName_1 = __webpack_require__(62755); const Report_1 = __webpack_require__(50334); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); const PROGRESS_FRAMES = [`⠋`, `⠙`, `⠹`, `⠸`, `⠼`, `⠴`, `⠦`, `⠧`, `⠇`, `⠏`]; const PROGRESS_INTERVAL = 80; const BASE_FORGETTABLE_NAMES = new Set([MessageName_1.MessageName.FETCH_NOT_CACHED, MessageName_1.MessageName.UNUSED_CACHE_ENTRY]); const BASE_FORGETTABLE_BUFFER_SIZE = 5; const GROUP = process.env.GITHUB_ACTIONS ? { start: (what) => `::group::${what}\n`, end: (what) => `::endgroup::\n` } : process.env.TRAVIS ? { start: (what) => `travis_fold:start:${what}\n`, end: (what) => `travis_fold:end:${what}\n` } : process.env.GITLAB_CI ? { start: (what) => `section_start:${Math.floor(Date.now() / 1000)}:${what.toLowerCase().replace(/\W+/g, `_`)}\r\x1b[0K${what}\n`, end: (what) => `section_end:${Math.floor(Date.now() / 1000)}:${what.toLowerCase().replace(/\W+/g, `_`)}\r\x1b[0K` } : null; const now = new Date(); // We only want to support environments that will out-of-the-box accept the // characters we want to use. Others can enforce the style from the project // configuration. const supportsEmojis = [`iTerm.app`, `Apple_Terminal`].includes(process.env.TERM_PROGRAM) || !!process.env.WT_SESSION; const makeRecord = (obj) => obj; const PROGRESS_STYLES = makeRecord({ patrick: { date: [17, 3], chars: [`🍀`, `🌱`], size: 40, }, simba: { date: [19, 7], chars: [`🦁`, `🌴`], size: 40, }, jack: { date: [31, 10], chars: [`🎃`, `🦇`], size: 40, }, hogsfather: { date: [31, 12], chars: [`🎉`, `🎄`], size: 40, }, default: { chars: [`=`, `-`], size: 80, }, }); const defaultStyle = (supportsEmojis && Object.keys(PROGRESS_STYLES).find(name => { const style = PROGRESS_STYLES[name]; if (style.date && (style.date[0] !== now.getDate() || style.date[1] !== now.getMonth() + 1)) return false; return true; })) || `default`; function formatName(name, { configuration, json }) { const num = name === null ? 0 : name; const label = MessageName_1.stringifyMessageName(num); if (!json && name === null) { return formatUtils.pretty(configuration, label, `grey`); } else { return label; } } exports.formatName = formatName; function formatNameWithHyperlink(name, { configuration, json }) { const code = formatName(name, { configuration, json }); // Only print hyperlinks if allowed per configuration if (!configuration.get(`enableHyperlinks`)) return code; // Don't print hyperlinks for the generic messages if (name === null || name === MessageName_1.MessageName.UNNAMED) return code; const desc = MessageName_1.MessageName[name]; const href = `https://yarnpkg.com/advanced/error-codes#${code}---${desc}`.toLowerCase(); // We use BELL as ST because it seems that iTerm doesn't properly support // the \x1b\\ sequence described in the reference document // https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#the-escape-sequence return `\u001b]8;;${href}\u0007${code}\u001b]8;;\u0007`; } exports.formatNameWithHyperlink = formatNameWithHyperlink; class StreamReport extends Report_1.Report { constructor({ configuration, stdout, json = false, includeFooter = true, includeLogs = !json, includeInfos = includeLogs, includeWarnings = includeLogs, forgettableBufferSize = BASE_FORGETTABLE_BUFFER_SIZE, forgettableNames = new Set(), }) { super(); this.uncommitted = new Set(); this.cacheHitCount = 0; this.cacheMissCount = 0; this.warningCount = 0; this.errorCount = 0; this.startTime = Date.now(); this.indent = 0; this.progress = new Map(); this.progressTime = 0; this.progressFrame = 0; this.progressTimeout = null; this.forgettableLines = []; formatUtils.addLogFilterSupport(this, { configuration }); this.configuration = configuration; this.forgettableBufferSize = forgettableBufferSize; this.forgettableNames = new Set([...forgettableNames, ...BASE_FORGETTABLE_NAMES]); this.includeFooter = includeFooter; this.includeInfos = includeInfos; this.includeWarnings = includeWarnings; this.json = json; this.stdout = stdout; const styleName = this.configuration.get(`progressBarStyle`) || defaultStyle; if (!Object.prototype.hasOwnProperty.call(PROGRESS_STYLES, styleName)) throw new Error(`Assertion failed: Invalid progress bar style`); this.progressStyle = PROGRESS_STYLES[styleName]; const PAD_LEFT = `➤ YN0000: ┌ `.length; const maxWidth = Math.max(0, Math.min(process.stdout.columns - PAD_LEFT, 80)); this.progressMaxScaledSize = Math.floor(this.progressStyle.size * maxWidth / 80); } static async start(opts, cb) { const report = new this(opts); const emitWarning = process.emitWarning; process.emitWarning = (message, name) => { if (typeof message !== `string`) { const error = message; message = error.message; name = name !== null && name !== void 0 ? name : error.name; } const fullMessage = typeof name !== `undefined` ? `${name}: ${message}` : message; report.reportWarning(MessageName_1.MessageName.UNNAMED, fullMessage); }; try { await cb(report); } catch (error) { report.reportExceptionOnce(error); } finally { await report.finalize(); process.emitWarning = emitWarning; } return report; } hasErrors() { return this.errorCount > 0; } exitCode() { return this.hasErrors() ? 1 : 0; } reportCacheHit(locator) { this.cacheHitCount += 1; } reportCacheMiss(locator, message) { this.cacheMissCount += 1; if (typeof message !== `undefined` && !this.configuration.get(`preferAggregateCacheInfo`)) { this.reportInfo(MessageName_1.MessageName.FETCH_NOT_CACHED, message); } } startTimerSync(what, opts, cb) { const realOpts = typeof opts === `function` ? {} : opts; const realCb = typeof opts === `function` ? opts : cb; const mark = { committed: false, action: () => { this.reportInfo(null, `┌ ${what}`); this.indent += 1; if (GROUP !== null) { this.stdout.write(GROUP.start(what)); } } }; if (realOpts.skipIfEmpty) { this.uncommitted.add(mark); } else { mark.action(); mark.committed = true; } const before = Date.now(); try { return realCb(); } catch (error) { this.reportExceptionOnce(error); throw error; } finally { const after = Date.now(); this.uncommitted.delete(mark); if (mark.committed) { this.indent -= 1; if (GROUP !== null) this.stdout.write(GROUP.end(what)); if (this.configuration.get(`enableTimers`) && after - before > 200) { this.reportInfo(null, `└ Completed in ${formatUtils.pretty(this.configuration, after - before, formatUtils.Type.DURATION)}`); } else { this.reportInfo(null, `└ Completed`); } } } } async startTimerPromise(what, opts, cb) { const realOpts = typeof opts === `function` ? {} : opts; const realCb = typeof opts === `function` ? opts : cb; const mark = { committed: false, action: () => { this.reportInfo(null, `┌ ${what}`); this.indent += 1; if (GROUP !== null) { this.stdout.write(GROUP.start(what)); } } }; if (realOpts.skipIfEmpty) { this.uncommitted.add(mark); } else { mark.action(); mark.committed = true; } const before = Date.now(); try { return await realCb(); } catch (error) { this.reportExceptionOnce(error); throw error; } finally { const after = Date.now(); this.uncommitted.delete(mark); if (mark.committed) { this.indent -= 1; if (GROUP !== null) this.stdout.write(GROUP.end(what)); if (this.configuration.get(`enableTimers`) && after - before > 200) { this.reportInfo(null, `└ Completed in ${formatUtils.pretty(this.configuration, after - before, formatUtils.Type.DURATION)}`); } else { this.reportInfo(null, `└ Completed`); } } } } async startCacheReport(cb) { const cacheInfo = this.configuration.get(`preferAggregateCacheInfo`) ? { cacheHitCount: this.cacheHitCount, cacheMissCount: this.cacheMissCount } : null; try { return await cb(); } catch (error) { this.reportExceptionOnce(error); throw error; } finally { if (cacheInfo !== null) { this.reportCacheChanges(cacheInfo); } } } reportSeparator() { if (this.indent === 0) { this.writeLineWithForgettableReset(``); } else { this.reportInfo(null, ``); } } reportInfo(name, text) { if (!this.includeInfos) return; this.commit(); const message = `${formatUtils.pretty(this.configuration, `➤`, `blueBright`)} ${this.formatNameWithHyperlink(name)}: ${this.formatIndent()}${text}`; if (!this.json) { if (this.forgettableNames.has(name)) { this.forgettableLines.push(message); if (this.forgettableLines.length > this.forgettableBufferSize) { while (this.forgettableLines.length > this.forgettableBufferSize) this.forgettableLines.shift(); this.writeLines(this.forgettableLines, { truncate: true }); } else { this.writeLine(message, { truncate: true }); } } else { this.writeLineWithForgettableReset(message); } } else { this.reportJson({ type: `info`, name, displayName: this.formatName(name), indent: this.formatIndent(), data: text }); } } reportWarning(name, text) { this.warningCount += 1; if (!this.includeWarnings) return; this.commit(); if (!this.json) { this.writeLineWithForgettableReset(`${formatUtils.pretty(this.configuration, `➤`, `yellowBright`)} ${this.formatNameWithHyperlink(name)}: ${this.formatIndent()}${text}`); } else { this.reportJson({ type: `warning`, name, displayName: this.formatName(name), indent: this.formatIndent(), data: text }); } } reportError(name, text) { this.errorCount += 1; this.commit(); if (!this.json) { this.writeLineWithForgettableReset(`${formatUtils.pretty(this.configuration, `➤`, `redBright`)} ${this.formatNameWithHyperlink(name)}: ${this.formatIndent()}${text}`, { truncate: false }); } else { this.reportJson({ type: `error`, name, displayName: this.formatName(name), indent: this.formatIndent(), data: text }); } } reportProgress(progressIt) { let stopped = false; const promise = Promise.resolve().then(async () => { const progressDefinition = { progress: 0, title: undefined, }; this.progress.set(progressIt, { definition: progressDefinition, lastScaledSize: -1, }); this.refreshProgress(-1); for await (const { progress, title } of progressIt) { if (stopped) continue; if (progressDefinition.progress === progress && progressDefinition.title === title) continue; progressDefinition.progress = progress; progressDefinition.title = title; this.refreshProgress(); } stop(); }); const stop = () => { if (stopped) return; stopped = true; this.progress.delete(progressIt); this.refreshProgress(+1); }; return { ...promise, stop }; } reportJson(data) { if (this.json) { this.writeLineWithForgettableReset(`${JSON.stringify(data)}`); } } async finalize() { if (!this.includeFooter) return; let installStatus = ``; if (this.errorCount > 0) installStatus = `Failed with errors`; else if (this.warningCount > 0) installStatus = `Done with warnings`; else installStatus = `Done`; const timing = formatUtils.pretty(this.configuration, Date.now() - this.startTime, formatUtils.Type.DURATION); const message = this.configuration.get(`enableTimers`) ? `${installStatus} in ${timing}` : installStatus; if (this.errorCount > 0) { this.reportError(MessageName_1.MessageName.UNNAMED, message); } else if (this.warningCount > 0) { this.reportWarning(MessageName_1.MessageName.UNNAMED, message); } else { this.reportInfo(MessageName_1.MessageName.UNNAMED, message); } } writeLine(str, { truncate } = {}) { this.clearProgress({ clear: true }); this.stdout.write(`${this.truncate(str, { truncate })}\n`); this.writeProgress(); } writeLineWithForgettableReset(str, { truncate } = {}) { this.forgettableLines = []; this.writeLine(str, { truncate }); } writeLines(lines, { truncate } = {}) { this.clearProgress({ delta: lines.length }); for (const line of lines) this.stdout.write(`${this.truncate(line, { truncate })}\n`); this.writeProgress(); } reportCacheChanges({ cacheHitCount, cacheMissCount }) { const cacheHitDelta = this.cacheHitCount - cacheHitCount; const cacheMissDelta = this.cacheMissCount - cacheMissCount; if (cacheHitDelta === 0 && cacheMissDelta === 0) return; let fetchStatus = ``; if (this.cacheHitCount > 1) fetchStatus += `${this.cacheHitCount} packages were already cached`; else if (this.cacheHitCount === 1) fetchStatus += ` - one package was already cached`; else fetchStatus += `No packages were cached`; if (this.cacheHitCount > 0) { if (this.cacheMissCount > 1) { fetchStatus += `, ${this.cacheMissCount} had to be fetched`; } else if (this.cacheMissCount === 1) { fetchStatus += `, one had to be fetched`; } } else { if (this.cacheMissCount > 1) { fetchStatus += ` - ${this.cacheMissCount} packages had to be fetched`; } else if (this.cacheMissCount === 1) { fetchStatus += ` - one package had to be fetched`; } } this.reportInfo(MessageName_1.MessageName.FETCH_NOT_CACHED, fetchStatus); } commit() { const marks = this.uncommitted; this.uncommitted = new Set(); for (const mark of marks) { mark.committed = true; mark.action(); } } clearProgress({ delta = 0, clear = false }) { if (!this.configuration.get(`enableProgressBars`) || this.json) return; if (this.progress.size + delta > 0) { this.stdout.write(`\x1b[${this.progress.size + delta}A`); if (delta > 0 || clear) { this.stdout.write(`\x1b[0J`); } } } writeProgress() { if (!this.configuration.get(`enableProgressBars`) || this.json) return; if (this.progressTimeout !== null) clearTimeout(this.progressTimeout); this.progressTimeout = null; if (this.progress.size === 0) return; const now = Date.now(); if (now - this.progressTime > PROGRESS_INTERVAL) { this.progressFrame = (this.progressFrame + 1) % PROGRESS_FRAMES.length; this.progressTime = now; } const spinner = PROGRESS_FRAMES[this.progressFrame]; for (const progress of this.progress.values()) { const ok = this.progressStyle.chars[0].repeat(progress.lastScaledSize); const ko = this.progressStyle.chars[1].repeat(this.progressMaxScaledSize - progress.lastScaledSize); this.stdout.write(`${formatUtils.pretty(this.configuration, `➤`, `blueBright`)} ${this.formatName(null)}: ${spinner} ${ok}${ko}\n`); } this.progressTimeout = setTimeout(() => { this.refreshProgress(); }, PROGRESS_INTERVAL); } refreshProgress(delta = 0) { let needsUpdate = false; if (this.progress.size === 0) { needsUpdate = true; } else { for (const progress of this.progress.values()) { const refreshedScaledSize = Math.trunc(this.progressMaxScaledSize * progress.definition.progress); const previousScaledSize = progress.lastScaledSize; progress.lastScaledSize = refreshedScaledSize; if (refreshedScaledSize !== previousScaledSize) { needsUpdate = true; break; } } } if (needsUpdate) { this.clearProgress({ delta }); this.writeProgress(); } } truncate(str, { truncate } = {}) { if (!this.configuration.get(`enableProgressBars`)) truncate = false; if (typeof truncate === `undefined`) truncate = this.configuration.get(`preferTruncatedLines`); // The -1 is to account for terminals that would wrap after // the last column rather before the first overwrite if (truncate) str = slice_ansi_1.default(str, 0, process.stdout.columns - 1); return str; } formatName(name) { return formatName(name, { configuration: this.configuration, json: this.json, }); } formatNameWithHyperlink(name) { return formatNameWithHyperlink(name, { configuration: this.configuration, json: this.json, }); } formatIndent() { return `│ `.repeat(this.indent); } } exports.StreamReport = StreamReport; /***/ }), /***/ 58166: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TelemetryManager = exports.MetricName = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const httpUtils = tslib_1.__importStar(__webpack_require__(57392)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); var MetricName; (function (MetricName) { MetricName["VERSION"] = "version"; MetricName["COMMAND_NAME"] = "commandName"; MetricName["PLUGIN_NAME"] = "pluginName"; MetricName["INSTALL_COUNT"] = "installCount"; MetricName["PROJECT_COUNT"] = "projectCount"; MetricName["WORKSPACE_COUNT"] = "workspaceCount"; MetricName["DEPENDENCY_COUNT"] = "dependencyCount"; MetricName["EXTENSION"] = "packageExtension"; })(MetricName = exports.MetricName || (exports.MetricName = {})); class TelemetryManager { constructor(configuration, accountId) { this.values = new Map(); this.hits = new Map(); this.enumerators = new Map(); this.configuration = configuration; const registryFile = this.getRegistryPath(); this.isNew = !fslib_1.xfs.existsSync(registryFile); this.sendReport(accountId); this.startBuffer(); } reportVersion(value) { this.reportValue(MetricName.VERSION, value); } reportCommandName(value) { this.reportValue(MetricName.COMMAND_NAME, value || ``); } reportPluginName(value) { this.reportValue(MetricName.PLUGIN_NAME, value); } reportProject(cwd) { this.reportEnumerator(MetricName.PROJECT_COUNT, cwd); } reportInstall(nodeLinker) { this.reportHit(MetricName.INSTALL_COUNT, nodeLinker); } reportPackageExtension(value) { this.reportValue(MetricName.EXTENSION, value); } reportWorkspaceCount(count) { this.reportValue(MetricName.WORKSPACE_COUNT, String(count)); } reportDependencyCount(count) { this.reportValue(MetricName.DEPENDENCY_COUNT, String(count)); } reportValue(metric, value) { miscUtils.getSetWithDefault(this.values, metric).add(value); } reportEnumerator(metric, value) { miscUtils.getSetWithDefault(this.enumerators, metric).add(value); } reportHit(metric, extra = `*`) { const ns = miscUtils.getMapWithDefault(this.hits, metric); const current = miscUtils.getFactoryWithDefault(ns, extra, () => 0); ns.set(extra, current + 1); } getRegistryPath() { const registryFile = this.configuration.get(`globalFolder`); return fslib_1.ppath.join(registryFile, `telemetry.json`); } sendReport(accountId) { var _a, _b, _c; const registryFile = this.getRegistryPath(); let content; try { content = fslib_1.xfs.readJsonSync(registryFile); } catch (_d) { content = {}; } const now = Date.now(); const interval = this.configuration.get(`telemetryInterval`) * 24 * 60 * 60 * 1000; const lastUpdate = (_a = content.lastUpdate) !== null && _a !== void 0 ? _a : now + interval + Math.floor(interval * Math.random()); const nextUpdate = lastUpdate + interval; if (nextUpdate > now && content.lastUpdate != null) return; try { fslib_1.xfs.mkdirSync(fslib_1.ppath.dirname(registryFile), { recursive: true }); fslib_1.xfs.writeJsonSync(registryFile, { lastUpdate: now }); } catch (_e) { // In some cases this location is read-only. Too bad 🤷‍♀️ return; } if (nextUpdate > now) return; if (!content.blocks) return; for (const [userId, block] of Object.entries((_b = content.blocks) !== null && _b !== void 0 ? _b : {})) { if (Object.keys(block).length === 0) continue; const upload = block; upload.userId = userId; for (const key of Object.keys((_c = upload.enumerators) !== null && _c !== void 0 ? _c : {})) upload.enumerators[key] = upload.enumerators[key].length; const rawUrl = `https://browser-http-intake.logs.datadoghq.eu/v1/input/${accountId}?ddsource=yarn`; httpUtils.post(rawUrl, upload, { configuration: this.configuration, }).catch(() => { // Nothing we can do }); } } applyChanges() { var _a, _b, _c, _d, _e, _f, _g, _h, _j; const registryFile = this.getRegistryPath(); let content; try { content = fslib_1.xfs.readJsonSync(registryFile); } catch (_k) { content = {}; } const userId = (_a = this.configuration.get(`telemetryUserId`)) !== null && _a !== void 0 ? _a : `*`; const blocks = content.blocks = (_b = content.blocks) !== null && _b !== void 0 ? _b : {}; const block = blocks[userId] = (_c = blocks[userId]) !== null && _c !== void 0 ? _c : {}; for (const key of this.hits.keys()) { const store = block.hits = (_d = block.hits) !== null && _d !== void 0 ? _d : {}; const ns = store[key] = (_e = store[key]) !== null && _e !== void 0 ? _e : {}; for (const [extra, value] of this.hits.get(key)) { ns[extra] = ((_f = ns[extra]) !== null && _f !== void 0 ? _f : 0) + value; } } for (const field of [`values`, `enumerators`]) { for (const key of this[field].keys()) { const store = block[field] = (_g = block[field]) !== null && _g !== void 0 ? _g : {}; store[key] = [...new Set([ ...(_h = store[key]) !== null && _h !== void 0 ? _h : [], ...(_j = this[field].get(key)) !== null && _j !== void 0 ? _j : [], ])]; } } fslib_1.xfs.mkdirSync(fslib_1.ppath.dirname(registryFile), { recursive: true }); fslib_1.xfs.writeJsonSync(registryFile, content); } startBuffer() { process.on(`exit`, () => { try { this.applyChanges(); } catch (_a) { // Explicitly ignore errors } }); } } exports.TelemetryManager = TelemetryManager; /***/ }), /***/ 6059: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ThrowReport = void 0; const Report_1 = __webpack_require__(50334); class ThrowReport extends Report_1.Report { reportCacheHit(locator) { } reportCacheMiss(locator) { } startTimerSync(what, opts, cb) { const realCb = typeof opts === `function` ? opts : cb; return realCb(); } async startTimerPromise(what, opts, cb) { const realCb = typeof opts === `function` ? opts : cb; return await realCb(); } async startCacheReport(cb) { return await cb(); } reportSeparator() { } reportInfo(name, text) { } reportWarning(name, text) { } reportError(name, text) { } reportProgress(progress) { const promise = Promise.resolve().then(async () => { // eslint-disable-next-line no-empty-pattern for await (const {} of progress) { // No need to do anything; we just want to consume the progress events } }); const stop = () => { // Nothing to stop }; return { ...promise, stop }; } reportJson(data) { // Just ignore the json output } async finalize() { } } exports.ThrowReport = ThrowReport; /***/ }), /***/ 7100: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VirtualFetcher = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class VirtualFetcher { supports(locator) { if (!locator.reference.startsWith(`virtual:`)) return false; return true; } getLocalPath(locator, opts) { const splitPoint = locator.reference.indexOf(`#`); if (splitPoint === -1) throw new Error(`Invalid virtual package reference`); const nextReference = locator.reference.slice(splitPoint + 1); const nextLocator = structUtils.makeLocator(locator, nextReference); return opts.fetcher.getLocalPath(nextLocator, opts); } async fetch(locator, opts) { const splitPoint = locator.reference.indexOf(`#`); if (splitPoint === -1) throw new Error(`Invalid virtual package reference`); const nextReference = locator.reference.slice(splitPoint + 1); const nextLocator = structUtils.makeLocator(locator, nextReference); const parentFetch = await opts.fetcher.fetch(nextLocator, opts); return await this.ensureVirtualLink(locator, parentFetch, opts); } getLocatorFilename(locator) { return structUtils.slugifyLocator(locator); } async ensureVirtualLink(locator, sourceFetch, opts) { const to = sourceFetch.packageFs.getRealPath(); const virtualFolder = opts.project.configuration.get(`virtualFolder`); const virtualName = this.getLocatorFilename(locator); const virtualPath = fslib_1.VirtualFS.makeVirtualPath(virtualFolder, virtualName, to); // We then use an alias to tell anyone that asks us that we're operating within the virtual folder, while still using the same old fs const aliasFs = new fslib_1.AliasFS(virtualPath, { baseFs: sourceFetch.packageFs, pathUtils: fslib_1.ppath }); return { ...sourceFetch, packageFs: aliasFs }; } } exports.VirtualFetcher = VirtualFetcher; /***/ }), /***/ 55605: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VirtualResolver = void 0; class VirtualResolver { static isVirtualDescriptor(descriptor) { if (!descriptor.range.startsWith(VirtualResolver.protocol)) return false; return true; } static isVirtualLocator(locator) { if (!locator.reference.startsWith(VirtualResolver.protocol)) return false; return true; } supportsDescriptor(descriptor, opts) { return VirtualResolver.isVirtualDescriptor(descriptor); } supportsLocator(locator, opts) { return VirtualResolver.isVirtualLocator(locator); } shouldPersistResolution(locator, opts) { return false; } bindDescriptor(descriptor, locator, opts) { // It's unsupported because packages inside the dependency tree should // only become virtual AFTER they have all been resolved, by which point // you shouldn't need to call `bindDescriptor` anymore. throw new Error(`Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported`); } getResolutionDependencies(descriptor, opts) { // It's unsupported because packages inside the dependency tree should // only become virtual AFTER they have all been resolved, by which point // you shouldn't need to call `bindDescriptor` anymore. throw new Error(`Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported`); } async getCandidates(descriptor, dependencies, opts) { // It's unsupported because packages inside the dependency tree should // only become virtual AFTER they have all been resolved, by which point // you shouldn't need to call `getCandidates` anymore. throw new Error(`Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported`); } async getSatisfying(descriptor, candidates, opts) { // It's unsupported because packages inside the dependency tree should // only become virtual AFTER they have all been resolved, by which point // you shouldn't need to call `getSatisfying` anymore. throw new Error(`Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported`); } async resolve(locator, opts) { // It's unsupported because packages inside the dependency tree should // only become virtual AFTER they have all been resolved, by which point // you shouldn't need to call `resolve` anymore. throw new Error(`Assertion failed: calling "resolve" on a virtual locator is unsupported`); } } exports.VirtualResolver = VirtualResolver; VirtualResolver.protocol = `virtual:`; /***/ }), /***/ 2234: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Workspace = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const globby_1 = tslib_1.__importDefault(__webpack_require__(25839)); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const Manifest_1 = __webpack_require__(11658); const WorkspaceResolver_1 = __webpack_require__(83740); const hashUtils = tslib_1.__importStar(__webpack_require__(73279)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); class Workspace { constructor(workspaceCwd, { project }) { this.workspacesCwds = new Set(); // Generated at resolution; basically dependencies + devDependencies + child workspaces this.dependencies = new Map(); this.project = project; this.cwd = workspaceCwd; } async setup() { // @ts-expect-error: It's ok to initialize it now this.manifest = fslib_1.xfs.existsSync(fslib_1.ppath.join(this.cwd, Manifest_1.Manifest.fileName)) ? await Manifest_1.Manifest.find(this.cwd) : new Manifest_1.Manifest(); // We use ppath.relative to guarantee that the default hash will be consistent even if the project is installed on different OS / path // @ts-expect-error: It's ok to initialize it now, even if it's readonly (setup is called right after construction) this.relativeCwd = fslib_1.ppath.relative(this.project.cwd, this.cwd) || fslib_1.PortablePath.dot; const ident = this.manifest.name ? this.manifest.name : structUtils.makeIdent(null, `${this.computeCandidateName()}-${hashUtils.makeHash(this.relativeCwd).substr(0, 6)}`); const reference = this.manifest.version ? this.manifest.version : `0.0.0`; // @ts-expect-error: It's ok to initialize it now, even if it's readonly (setup is called right after construction) this.locator = structUtils.makeLocator(ident, reference); // @ts-expect-error: It's ok to initialize it now, even if it's readonly (setup is called right after construction) this.anchoredDescriptor = structUtils.makeDescriptor(this.locator, `${WorkspaceResolver_1.WorkspaceResolver.protocol}${this.relativeCwd}`); // @ts-expect-error: It's ok to initialize it now, even if it's readonly (setup is called right after construction) this.anchoredLocator = structUtils.makeLocator(this.locator, `${WorkspaceResolver_1.WorkspaceResolver.protocol}${this.relativeCwd}`); const patterns = this.manifest.workspaceDefinitions.map(({ pattern }) => pattern); const relativeCwds = await globby_1.default(patterns, { absolute: true, cwd: fslib_1.npath.fromPortablePath(this.cwd), expandDirectories: false, onlyDirectories: true, onlyFiles: false, ignore: [`**/node_modules`, `**/.git`, `**/.yarn`], }); // It seems that the return value of globby isn't in any guaranteed order - not even the directory listing order relativeCwds.sort(); for (const relativeCwd of relativeCwds) { const candidateCwd = fslib_1.ppath.resolve(this.cwd, fslib_1.npath.toPortablePath(relativeCwd)); if (fslib_1.xfs.existsSync(fslib_1.ppath.join(candidateCwd, `package.json`))) { this.workspacesCwds.add(candidateCwd); } } } accepts(range) { const protocolIndex = range.indexOf(`:`); const protocol = protocolIndex !== -1 ? range.slice(0, protocolIndex + 1) : null; const pathname = protocolIndex !== -1 ? range.slice(protocolIndex + 1) : range; if (protocol === WorkspaceResolver_1.WorkspaceResolver.protocol && fslib_1.ppath.normalize(pathname) === this.relativeCwd) return true; if (protocol === WorkspaceResolver_1.WorkspaceResolver.protocol && pathname === `*`) return true; if (!semver_1.default.validRange(pathname)) return false; if (protocol === WorkspaceResolver_1.WorkspaceResolver.protocol) return semver_1.default.satisfies(this.manifest.version !== null ? this.manifest.version : `0.0.0`, pathname); if (!this.project.configuration.get(`enableTransparentWorkspaces`)) return false; if (this.manifest.version !== null) return semver_1.default.satisfies(this.manifest.version, pathname); return false; } computeCandidateName() { if (this.cwd === this.project.cwd) { return `root-workspace`; } else { return `${fslib_1.ppath.basename(this.cwd)}` || `unnamed-workspace`; } } async persistManifest() { const data = {}; this.manifest.exportTo(data); const path = fslib_1.ppath.join(this.cwd, Manifest_1.Manifest.fileName); const content = `${JSON.stringify(data, null, this.manifest.indent)}\n`; await fslib_1.xfs.changeFilePromise(path, content, { automaticNewlines: true, }); } } exports.Workspace = Workspace; /***/ }), /***/ 2925: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.WorkspaceFetcher = void 0; const fslib_1 = __webpack_require__(91794); const WorkspaceResolver_1 = __webpack_require__(83740); class WorkspaceFetcher { supports(locator) { if (!locator.reference.startsWith(WorkspaceResolver_1.WorkspaceResolver.protocol)) return false; return true; } getLocalPath(locator, opts) { return this.getWorkspace(locator, opts).cwd; } async fetch(locator, opts) { const sourcePath = this.getWorkspace(locator, opts).cwd; return { packageFs: new fslib_1.CwdFS(sourcePath), prefixPath: fslib_1.PortablePath.dot, localPath: sourcePath }; } getWorkspace(locator, opts) { return opts.project.getWorkspaceByCwd(locator.reference.slice(WorkspaceResolver_1.WorkspaceResolver.protocol.length)); } } exports.WorkspaceFetcher = WorkspaceFetcher; /***/ }), /***/ 83740: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.WorkspaceResolver = void 0; const types_1 = __webpack_require__(79588); class WorkspaceResolver { supportsDescriptor(descriptor, opts) { if (descriptor.range.startsWith(WorkspaceResolver.protocol)) return true; const workspace = opts.project.tryWorkspaceByDescriptor(descriptor); if (workspace !== null) return true; return false; } supportsLocator(locator, opts) { if (!locator.reference.startsWith(WorkspaceResolver.protocol)) return false; return true; } shouldPersistResolution(locator, opts) { return false; } bindDescriptor(descriptor, fromLocator, opts) { return descriptor; } getResolutionDependencies(descriptor, opts) { return []; } async getCandidates(descriptor, dependencies, opts) { const workspace = opts.project.getWorkspaceByDescriptor(descriptor); return [workspace.anchoredLocator]; } async getSatisfying(descriptor, references, opts) { return null; } async resolve(locator, opts) { const workspace = opts.project.getWorkspaceByCwd(locator.reference.slice(WorkspaceResolver.protocol.length)); return { ...locator, version: workspace.manifest.version || `0.0.0`, languageName: `unknown`, linkType: types_1.LinkType.SOFT, dependencies: new Map([...workspace.manifest.dependencies, ...workspace.manifest.devDependencies]), peerDependencies: new Map([...workspace.manifest.peerDependencies]), dependenciesMeta: workspace.manifest.dependenciesMeta, peerDependenciesMeta: workspace.manifest.peerDependenciesMeta, bin: workspace.manifest.bin, }; } } exports.WorkspaceResolver = WorkspaceResolver; WorkspaceResolver.protocol = `workspace:`; /***/ }), /***/ 71774: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.YarnVersion = void 0; exports.YarnVersion = typeof YARN_VERSION !== `undefined` ? YARN_VERSION : null; /***/ }), /***/ 12915: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execvp = exports.pipevp = exports.EndStrategy = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const cross_spawn_1 = tslib_1.__importDefault(__webpack_require__(19789)); var EndStrategy; (function (EndStrategy) { EndStrategy[EndStrategy["Never"] = 0] = "Never"; EndStrategy[EndStrategy["ErrorCode"] = 1] = "ErrorCode"; EndStrategy[EndStrategy["Always"] = 2] = "Always"; })(EndStrategy = exports.EndStrategy || (exports.EndStrategy = {})); function hasFd(stream) { // @ts-expect-error: Not sure how to typecheck this field return stream !== null && typeof stream.fd === `number`; } function sigintHandler() { // We don't want SIGINT to kill our process; we want it to kill the // innermost process, whose end will cause our own to exit. } // Rather than attaching one SIGINT handler for each process, we // attach a single one and use a refcount to detect once it's no // longer needed. let sigintRefCount = 0; async function pipevp(fileName, args, { cwd, env = process.env, strict = false, stdin = null, stdout, stderr, end = EndStrategy.Always }) { const stdio = [`pipe`, `pipe`, `pipe`]; if (stdin === null) stdio[0] = `ignore`; else if (hasFd(stdin)) stdio[0] = stdin; if (hasFd(stdout)) stdio[1] = stdout; if (hasFd(stderr)) stdio[2] = stderr; if (sigintRefCount++ === 0) process.on(`SIGINT`, sigintHandler); const child = cross_spawn_1.default(fileName, args, { cwd: fslib_1.npath.fromPortablePath(cwd), env: { ...env, PWD: fslib_1.npath.fromPortablePath(cwd), }, stdio, }); if (!hasFd(stdin) && stdin !== null) stdin.pipe(child.stdin); if (!hasFd(stdout)) child.stdout.pipe(stdout, { end: false }); if (!hasFd(stderr)) child.stderr.pipe(stderr, { end: false }); const closeStreams = () => { for (const stream of new Set([stdout, stderr])) { if (!hasFd(stream)) { stream.end(); } } }; return new Promise((resolve, reject) => { child.on(`error`, error => { if (--sigintRefCount === 0) process.off(`SIGINT`, sigintHandler); if (end === EndStrategy.Always || end === EndStrategy.ErrorCode) closeStreams(); reject(error); }); child.on(`close`, (code, sig) => { if (--sigintRefCount === 0) process.off(`SIGINT`, sigintHandler); if (end === EndStrategy.Always || (end === EndStrategy.ErrorCode && code > 0)) closeStreams(); if (code === 0 || !strict) { resolve({ code: getExitCode(code, sig) }); } else if (code !== null) { reject(new Error(`Child "${fileName}" exited with exit code ${code}`)); } else { reject(new Error(`Child "${fileName}" exited with signal ${sig}`)); } }); }); } exports.pipevp = pipevp; async function execvp(fileName, args, { cwd, env = process.env, encoding = `utf8`, strict = false }) { const stdio = [`ignore`, `pipe`, `pipe`]; const stdoutChunks = []; const stderrChunks = []; const nativeCwd = fslib_1.npath.fromPortablePath(cwd); if (typeof env.PWD !== `undefined`) env = { ...env, PWD: nativeCwd }; const subprocess = cross_spawn_1.default(fileName, args, { cwd: nativeCwd, env, stdio, }); subprocess.stdout.on(`data`, (chunk) => { stdoutChunks.push(chunk); }); subprocess.stderr.on(`data`, (chunk) => { stderrChunks.push(chunk); }); return await new Promise((resolve, reject) => { subprocess.on(`error`, reject); subprocess.on(`close`, (code, signal) => { const stdout = encoding === `buffer` ? Buffer.concat(stdoutChunks) : Buffer.concat(stdoutChunks).toString(encoding); const stderr = encoding === `buffer` ? Buffer.concat(stderrChunks) : Buffer.concat(stderrChunks).toString(encoding); if (code === 0 || !strict) { resolve({ code: getExitCode(code, signal), stdout, stderr, }); } else { reject(Object.assign(new Error(`Child "${fileName}" exited with exit code ${code}\n\n${stderr}`), { code: getExitCode(code, signal), stdout, stderr, })); } }); }); } exports.execvp = execvp; const signalToCodeMap = new Map([ [`SIGINT`, 2], [`SIGQUIT`, 3], [`SIGKILL`, 9], [`SIGTERM`, 15], ]); function getExitCode(code, signal) { const signalCode = signalToCodeMap.get(signal); if (typeof signalCode !== `undefined`) { return 128 + signalCode; } else { return code !== null && code !== void 0 ? code : 1; } } /***/ }), /***/ 13061: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isFolderInside = exports.getHomeFolder = exports.getDefaultGlobalFolder = void 0; const fslib_1 = __webpack_require__(91794); const os_1 = __webpack_require__(12087); function getDefaultGlobalFolder() { if (process.platform === `win32`) { const base = fslib_1.npath.toPortablePath(process.env.LOCALAPPDATA || fslib_1.npath.join(os_1.homedir(), `AppData`, `Local`)); return fslib_1.ppath.resolve(base, `Yarn/Berry`); } if (process.env.XDG_DATA_HOME) { const base = fslib_1.npath.toPortablePath(process.env.XDG_DATA_HOME); return fslib_1.ppath.resolve(base, `yarn/berry`); } return fslib_1.ppath.resolve(getHomeFolder(), `.yarn/berry`); } exports.getDefaultGlobalFolder = getDefaultGlobalFolder; function getHomeFolder() { return fslib_1.npath.toPortablePath(os_1.homedir() || `/usr/local/share`); } exports.getHomeFolder = getHomeFolder; function isFolderInside(target, parent) { const relative = fslib_1.ppath.relative(parent, target); return relative && !relative.startsWith(`..`) && !fslib_1.ppath.isAbsolute(relative); } exports.isFolderInside = isFolderInside; /***/ }), /***/ 23821: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.addLogFilterSupport = exports.LogLevel = exports.mark = exports.json = exports.prettyList = exports.pretty = exports.applyColor = exports.applyStyle = exports.tuple = exports.supportsHyperlinks = exports.supportsColor = exports.Style = exports.Type = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const chalk_1 = tslib_1.__importDefault(__webpack_require__(59084)); const MessageName_1 = __webpack_require__(62755); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const types_1 = __webpack_require__(79588); var Type; (function (Type) { Type["NO_HINT"] = "NO_HINT"; Type["NULL"] = "NULL"; Type["SCOPE"] = "SCOPE"; Type["NAME"] = "NAME"; Type["RANGE"] = "RANGE"; Type["REFERENCE"] = "REFERENCE"; Type["NUMBER"] = "NUMBER"; Type["PATH"] = "PATH"; Type["URL"] = "URL"; Type["ADDED"] = "ADDED"; Type["REMOVED"] = "REMOVED"; Type["CODE"] = "CODE"; Type["DURATION"] = "DURATION"; Type["SIZE"] = "SIZE"; Type["IDENT"] = "IDENT"; Type["DESCRIPTOR"] = "DESCRIPTOR"; Type["LOCATOR"] = "LOCATOR"; Type["RESOLUTION"] = "RESOLUTION"; Type["DEPENDENT"] = "DEPENDENT"; Type["PACKAGE_EXTENSION"] = "PACKAGE_EXTENSION"; })(Type = exports.Type || (exports.Type = {})); var Style; (function (Style) { Style[Style["BOLD"] = 2] = "BOLD"; })(Style = exports.Style || (exports.Style = {})); const chalkOptions = process.env.GITHUB_ACTIONS ? { level: 2 } : chalk_1.default.supportsColor ? { level: chalk_1.default.supportsColor.level } : { level: 0 }; exports.supportsColor = chalkOptions.level !== 0; exports.supportsHyperlinks = exports.supportsColor && !process.env.GITHUB_ACTIONS; const chalkInstance = new chalk_1.default.Instance(chalkOptions); const colors = new Map([ [Type.NO_HINT, null], [Type.NULL, [`#a853b5`, 129]], [Type.SCOPE, [`#d75f00`, 166]], [Type.NAME, [`#d7875f`, 173]], [Type.RANGE, [`#00afaf`, 37]], [Type.REFERENCE, [`#87afff`, 111]], [Type.NUMBER, [`#ffd700`, 220]], [Type.PATH, [`#d75fd7`, 170]], [Type.URL, [`#d75fd7`, 170]], [Type.ADDED, [`#5faf00`, 70]], [Type.REMOVED, [`#d70000`, 160]], [Type.CODE, [`#87afff`, 111]], [Type.SIZE, [`#ffd700`, 220]], ]); // Just to make sure that the individual fields of the transform map have // compatible parameter types, without upcasting the map to a too generic type // // We also take the opportunity to downcast the configuration into `any`, // otherwise TypeScript will detect a circular reference and won't allow us to // properly type the `format` method from Configuration. Since transforms are // internal to this file, it should be fine. const validateTransform = (spec) => spec; const transforms = { [Type.NUMBER]: validateTransform({ pretty: (configuration, value) => { return `${value}`; }, json: (value) => { return value; }, }), [Type.IDENT]: validateTransform({ pretty: (configuration, ident) => { return structUtils.prettyIdent(configuration, ident); }, json: (ident) => { return structUtils.stringifyIdent(ident); }, }), [Type.LOCATOR]: validateTransform({ pretty: (configuration, locator) => { return structUtils.prettyLocator(configuration, locator); }, json: (locator) => { return structUtils.stringifyLocator(locator); }, }), [Type.DESCRIPTOR]: validateTransform({ pretty: (configuration, descriptor) => { return structUtils.prettyDescriptor(configuration, descriptor); }, json: (descriptor) => { return structUtils.stringifyDescriptor(descriptor); }, }), [Type.RESOLUTION]: validateTransform({ pretty: (configuration, { descriptor, locator }) => { return structUtils.prettyResolution(configuration, descriptor, locator); }, json: ({ descriptor, locator }) => { return { descriptor: structUtils.stringifyDescriptor(descriptor), locator: locator !== null ? structUtils.stringifyLocator(locator) : null, }; }, }), [Type.DEPENDENT]: validateTransform({ pretty: (configuration, { locator, descriptor }) => { return structUtils.prettyDependent(configuration, locator, descriptor); }, json: ({ locator, descriptor }) => { return { locator: structUtils.stringifyLocator(locator), descriptor: structUtils.stringifyDescriptor(descriptor), }; }, }), [Type.PACKAGE_EXTENSION]: validateTransform({ pretty: (configuration, packageExtension) => { switch (packageExtension.type) { case types_1.PackageExtensionType.Dependency: return `${structUtils.prettyIdent(configuration, packageExtension.parentDescriptor)} ➤ ${applyColor(configuration, `dependencies`, Type.CODE)} ➤ ${structUtils.prettyIdent(configuration, packageExtension.descriptor)}`; case types_1.PackageExtensionType.PeerDependency: return `${structUtils.prettyIdent(configuration, packageExtension.parentDescriptor)} ➤ ${applyColor(configuration, `peerDependencies`, Type.CODE)} ➤ ${structUtils.prettyIdent(configuration, packageExtension.descriptor)}`; case types_1.PackageExtensionType.PeerDependencyMeta: return `${structUtils.prettyIdent(configuration, packageExtension.parentDescriptor)} ➤ ${applyColor(configuration, `peerDependenciesMeta`, Type.CODE)} ➤ ${structUtils.prettyIdent(configuration, structUtils.parseIdent(packageExtension.selector))} ➤ ${applyColor(configuration, packageExtension.key, Type.CODE)}`; default: throw new Error(`Assertion failed: Unsupported package extension type: ${packageExtension.type}`); } }, json: (packageExtension) => { switch (packageExtension.type) { case types_1.PackageExtensionType.Dependency: return `${structUtils.stringifyIdent(packageExtension.parentDescriptor)} > ${structUtils.stringifyIdent(packageExtension.descriptor)}`; case types_1.PackageExtensionType.PeerDependency: return `${structUtils.stringifyIdent(packageExtension.parentDescriptor)} >> ${structUtils.stringifyIdent(packageExtension.descriptor)}`; case types_1.PackageExtensionType.PeerDependencyMeta: return `${structUtils.stringifyIdent(packageExtension.parentDescriptor)} >> ${packageExtension.selector} / ${packageExtension.key}`; default: throw new Error(`Assertion failed: Unsupported package extension type: ${packageExtension.type}`); } }, }), [Type.DURATION]: validateTransform({ pretty: (configuration, duration) => { if (duration > 1000 * 60) { const minutes = Math.floor(duration / 1000 / 60); const seconds = Math.ceil((duration - minutes * 60 * 1000) / 1000); return seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`; } else { const seconds = Math.floor(duration / 1000); const milliseconds = duration - seconds * 1000; return milliseconds === 0 ? `${seconds}s` : `${seconds}s ${milliseconds}ms`; } }, json: (duration) => { return duration; }, }), [Type.SIZE]: validateTransform({ pretty: (configuration, size) => { const thresholds = [`KB`, `MB`, `GB`, `TB`]; let power = thresholds.length; while (power > 1 && size < 1024 ** power) power -= 1; const factor = 1024 ** power; const value = Math.floor(size * 100 / factor) / 100; return applyColor(configuration, `${value} ${thresholds[power - 1]}`, Type.NUMBER); }, json: (size) => { return size; }, }), [Type.PATH]: validateTransform({ pretty: (configuration, filePath) => { return applyColor(configuration, fslib_1.npath.fromPortablePath(filePath), Type.PATH); }, json: (filePath) => { return fslib_1.npath.fromPortablePath(filePath); }, }), }; function tuple(formatType, value) { return [value, formatType]; } exports.tuple = tuple; function applyStyle(configuration, text, flags) { if (!configuration.get(`enableColors`)) return text; if (flags & Style.BOLD) text = chalk_1.default.bold(text); return text; } exports.applyStyle = applyStyle; function applyColor(configuration, value, formatType) { if (!configuration.get(`enableColors`)) return value; const colorSpec = colors.get(formatType); if (colorSpec === null) return value; const color = typeof colorSpec === `undefined` ? formatType : chalkOptions.level >= 3 ? colorSpec[0] : colorSpec[1]; const fn = typeof color === `number` ? chalkInstance.ansi256(color) : color.startsWith(`#`) ? chalkInstance.hex(color) : chalkInstance[color]; if (typeof fn !== `function`) throw new Error(`Invalid format type ${color}`); return fn(value); } exports.applyColor = applyColor; function pretty(configuration, value, formatType) { if (value === null) return applyColor(configuration, `null`, Type.NULL); if (Object.prototype.hasOwnProperty.call(transforms, formatType)) { const transform = transforms[formatType]; const typedTransform = transform; return typedTransform.pretty(configuration, value); } if (typeof value !== `string`) throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof value}`); return applyColor(configuration, value, formatType); } exports.pretty = pretty; function prettyList(configuration, values, formatType, { separator = `, ` } = {}) { return [...values].map(value => pretty(configuration, value, formatType)).join(separator); } exports.prettyList = prettyList; function json(value, formatType) { if (value === null) return null; if (Object.prototype.hasOwnProperty.call(transforms, formatType)) { miscUtils.overrideType(formatType); return transforms[formatType].json(value); } if (typeof value !== `string`) throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof value}`); return value; } exports.json = json; function mark(configuration) { return { Check: applyColor(configuration, `✓`, `green`), Cross: applyColor(configuration, `✘`, `red`), Question: applyColor(configuration, `?`, `cyan`), }; } exports.mark = mark; var LogLevel; (function (LogLevel) { LogLevel["Error"] = "error"; LogLevel["Warning"] = "warning"; LogLevel["Info"] = "info"; LogLevel["Discard"] = "discard"; })(LogLevel = exports.LogLevel || (exports.LogLevel = {})); /** * Add support support for the `logFilters` setting to the specified Report * instance. */ function addLogFilterSupport(report, { configuration }) { const logFilters = configuration.get(`logFilters`); const logFiltersByCode = new Map(); const logFiltersByText = new Map(); for (const filter of logFilters) { const level = filter.get(`level`); if (typeof level === `undefined`) continue; const code = filter.get(`code`); if (typeof code !== `undefined`) logFiltersByCode.set(code, level); const text = filter.get(`text`); if (typeof text !== `undefined`) { logFiltersByText.set(text, level); } } const findLogLevel = (name, text, defaultLevel) => { if (name === null || name === MessageName_1.MessageName.UNNAMED) return defaultLevel; if (logFiltersByText.size > 0) { const level = logFiltersByText.get(chalk_1.default.reset(text)); if (typeof level !== `undefined`) { return level !== null && level !== void 0 ? level : defaultLevel; } } if (logFiltersByCode.size > 0) { const level = logFiltersByCode.get(MessageName_1.stringifyMessageName(name)); if (typeof level !== `undefined`) { return level !== null && level !== void 0 ? level : defaultLevel; } } return defaultLevel; }; const reportInfo = report.reportInfo; const reportWarning = report.reportWarning; const reportError = report.reportError; const routeMessage = function (report, name, text, level) { switch (findLogLevel(name, text, level)) { case LogLevel.Info: { reportInfo.call(report, name, text); } break; case LogLevel.Warning: { reportWarning.call(report, name !== null && name !== void 0 ? name : MessageName_1.MessageName.UNNAMED, text); } break; case LogLevel.Error: { reportError.call(report, name !== null && name !== void 0 ? name : MessageName_1.MessageName.UNNAMED, text); } break; } }; report.reportInfo = function (...args) { return routeMessage(this, ...args, LogLevel.Info); }; report.reportWarning = function (...args) { return routeMessage(this, ...args, LogLevel.Warning); }; report.reportError = function (...args) { return routeMessage(this, ...args, LogLevel.Error); }; } exports.addLogFilterSupport = addLogFilterSupport; /***/ }), /***/ 73279: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.checksumPattern = exports.checksumFile = exports.makeHash = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const crypto_1 = __webpack_require__(76417); const globby_1 = tslib_1.__importDefault(__webpack_require__(25839)); function makeHash(...args) { const hash = crypto_1.createHash(`sha512`); for (const arg of args) hash.update(arg ? arg : ``); return hash.digest(`hex`); } exports.makeHash = makeHash; function checksumFile(path) { return new Promise((resolve, reject) => { const hash = crypto_1.createHash(`sha512`); const stream = fslib_1.xfs.createReadStream(path); stream.on(`data`, chunk => { hash.update(chunk); }); stream.on(`error`, error => { reject(error); }); stream.on(`end`, () => { resolve(hash.digest(`hex`)); }); }); } exports.checksumFile = checksumFile; async function checksumPattern(pattern, { cwd }) { // Note: We use a two-pass glob instead of using the expandDirectories option // from globby, because the native implementation is broken. // // Ref: https://github.com/sindresorhus/globby/issues/147 const dirListing = await globby_1.default(pattern, { cwd: fslib_1.npath.fromPortablePath(cwd), expandDirectories: false, onlyDirectories: true, unique: true, }); const dirPatterns = dirListing.map(entry => { return `${entry}/**/*`; }); const listing = await globby_1.default([pattern, ...dirPatterns], { cwd: fslib_1.npath.fromPortablePath(cwd), expandDirectories: false, onlyFiles: false, unique: true, }); listing.sort(); const hashes = await Promise.all(listing.map(async (entry) => { const parts = [Buffer.from(entry)]; const p = fslib_1.npath.toPortablePath(entry); const stat = await fslib_1.xfs.lstatPromise(p); if (stat.isSymbolicLink()) parts.push(Buffer.from(await fslib_1.xfs.readlinkPromise(p))); else if (stat.isFile()) parts.push(await fslib_1.xfs.readFilePromise(p)); return parts.join(`\u0000`); })); const hash = crypto_1.createHash(`sha512`); for (const sub of hashes) hash.update(sub); return hash.digest(`hex`); } exports.checksumPattern = checksumPattern; /***/ }), /***/ 57392: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.del = exports.post = exports.put = exports.get = exports.request = exports.Method = exports.getNetworkSettings = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const https_1 = __webpack_require__(57211); const http_1 = __webpack_require__(98605); const micromatch_1 = tslib_1.__importDefault(__webpack_require__(70850)); const tunnel_1 = tslib_1.__importDefault(__webpack_require__(6149)); const url_1 = __webpack_require__(78835); const cache = new Map(); const certCache = new Map(); const globalHttpAgent = new http_1.Agent({ keepAlive: true }); const globalHttpsAgent = new https_1.Agent({ keepAlive: true }); function parseProxy(specifier) { const url = new url_1.URL(specifier); const proxy = { host: url.hostname, headers: {} }; if (url.port) proxy.port = Number(url.port); return { proxy }; } async function getCachedCertificate(caFilePath) { let certificate = certCache.get(caFilePath); if (!certificate) { certificate = fslib_1.xfs.readFilePromise(caFilePath).then(cert => { certCache.set(caFilePath, cert); return cert; }); certCache.set(caFilePath, certificate); } return certificate; } /** * Searches through networkSettings and returns the most specific match */ function getNetworkSettings(target, opts) { // Sort the config by key length to match on the most specific pattern const networkSettings = [...opts.configuration.get(`networkSettings`)].sort(([keyA], [keyB]) => { return keyB.length - keyA.length; }); const mergedNetworkSettings = { enableNetwork: undefined, caFilePath: undefined, httpProxy: undefined, httpsProxy: undefined, }; const mergableKeys = Object.keys(mergedNetworkSettings); const url = new url_1.URL(target); for (const [glob, config] of networkSettings) { if (micromatch_1.default.isMatch(url.hostname, glob)) { for (const key of mergableKeys) { const setting = config.get(key); if (setting !== null && typeof mergedNetworkSettings[key] === `undefined`) { mergedNetworkSettings[key] = setting; } } } } // Apply defaults for (const key of mergableKeys) { if (typeof mergedNetworkSettings[key] === `undefined`) { mergedNetworkSettings[key] = opts.configuration.get(key); } } return mergedNetworkSettings; } exports.getNetworkSettings = getNetworkSettings; var Method; (function (Method) { Method["GET"] = "GET"; Method["PUT"] = "PUT"; Method["POST"] = "POST"; Method["DELETE"] = "DELETE"; })(Method = exports.Method || (exports.Method = {})); async function request(target, body, { configuration, headers, json, jsonRequest = json, jsonResponse = json, method = Method.GET }) { const networkConfig = getNetworkSettings(target, { configuration }); if (networkConfig.enableNetwork === false) throw new Error(`Request to '${target}' has been blocked because of your configuration settings`); const url = new url_1.URL(target); if (url.protocol === `http:` && !micromatch_1.default.isMatch(url.hostname, configuration.get(`unsafeHttpWhitelist`))) throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${url.hostname})`); const agent = { http: networkConfig.httpProxy ? tunnel_1.default.httpOverHttp(parseProxy(networkConfig.httpProxy)) : globalHttpAgent, https: networkConfig.httpsProxy ? tunnel_1.default.httpsOverHttp(parseProxy(networkConfig.httpsProxy)) : globalHttpsAgent, }; const gotOptions = { agent, headers, method }; gotOptions.responseType = jsonResponse ? `json` : `buffer`; if (body !== null) { if (Buffer.isBuffer(body) || (!jsonRequest && typeof body === `string`)) { gotOptions.body = body; } else { // @ts-expect-error: The got types only allow an object, but got can stringify any valid JSON gotOptions.json = body; } } const socketTimeout = configuration.get(`httpTimeout`); const retry = configuration.get(`httpRetry`); const rejectUnauthorized = configuration.get(`enableStrictSsl`); const caFilePath = networkConfig.caFilePath; const { default: got } = await Promise.resolve().then(() => tslib_1.__importStar(__webpack_require__(12210))); const certificateAuthority = caFilePath ? await getCachedCertificate(caFilePath) : undefined; const gotClient = got.extend({ timeout: { socket: socketTimeout, }, retry, https: { rejectUnauthorized, certificateAuthority, }, ...gotOptions, }); return configuration.getLimit(`networkConcurrency`)(() => { return gotClient(target); }); } exports.request = request; async function get(target, { configuration, json, jsonResponse = json, ...rest }) { let entry = cache.get(target); if (!entry) { entry = request(target, null, { configuration, ...rest }).then(response => { cache.set(target, response.body); return response.body; }); cache.set(target, entry); } if (Buffer.isBuffer(entry) === false) entry = await entry; if (jsonResponse) { return JSON.parse(entry.toString()); } else { return entry; } } exports.get = get; async function put(target, body, options) { const response = await request(target, body, { ...options, method: Method.PUT }); return response.body; } exports.put = put; async function post(target, body, options) { const response = await request(target, body, { ...options, method: Method.POST }); return response.body; } exports.post = post; async function del(target, options) { const response = await request(target, null, { ...options, method: Method.DELETE }); return response.body; } exports.del = del; /***/ }), /***/ 74876: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.treeUtils = exports.tgzUtils = exports.structUtils = exports.semverUtils = exports.scriptUtils = exports.miscUtils = exports.formatUtils = exports.folderUtils = exports.execUtils = exports.httpUtils = exports.hashUtils = exports.PackageExtensionStatus = exports.PackageExtensionType = exports.LinkType = exports.YarnVersion = exports.Workspace = exports.WorkspaceResolver = exports.VirtualFetcher = exports.ThrowReport = exports.TelemetryManager = exports.StreamReport = exports.Report = exports.ReportError = exports.TAG_REGEXP = exports.Project = exports.MessageName = exports.Manifest = exports.LightReport = exports.BuildType = exports.SettingsType = exports.ProjectLookup = exports.FormatType = exports.Configuration = exports.DEFAULT_LOCK_FILENAME = exports.DEFAULT_RC_FILENAME = exports.Cache = void 0; const tslib_1 = __webpack_require__(70655); const execUtils = tslib_1.__importStar(__webpack_require__(12915)); exports.execUtils = execUtils; const folderUtils = tslib_1.__importStar(__webpack_require__(13061)); exports.folderUtils = folderUtils; const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); exports.formatUtils = formatUtils; const hashUtils = tslib_1.__importStar(__webpack_require__(73279)); exports.hashUtils = hashUtils; const httpUtils = tslib_1.__importStar(__webpack_require__(57392)); exports.httpUtils = httpUtils; const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); exports.miscUtils = miscUtils; const scriptUtils = tslib_1.__importStar(__webpack_require__(50888)); exports.scriptUtils = scriptUtils; const semverUtils = tslib_1.__importStar(__webpack_require__(51201)); exports.semverUtils = semverUtils; const structUtils = tslib_1.__importStar(__webpack_require__(34103)); exports.structUtils = structUtils; const tgzUtils = tslib_1.__importStar(__webpack_require__(83607)); exports.tgzUtils = tgzUtils; const treeUtils = tslib_1.__importStar(__webpack_require__(55024)); exports.treeUtils = treeUtils; var Cache_1 = __webpack_require__(19552); Object.defineProperty(exports, "Cache", ({ enumerable: true, get: function () { return Cache_1.Cache; } })); var Configuration_1 = __webpack_require__(62889); Object.defineProperty(exports, "DEFAULT_RC_FILENAME", ({ enumerable: true, get: function () { return Configuration_1.DEFAULT_RC_FILENAME; } })); Object.defineProperty(exports, "DEFAULT_LOCK_FILENAME", ({ enumerable: true, get: function () { return Configuration_1.DEFAULT_LOCK_FILENAME; } })); var Configuration_2 = __webpack_require__(62889); Object.defineProperty(exports, "Configuration", ({ enumerable: true, get: function () { return Configuration_2.Configuration; } })); Object.defineProperty(exports, "FormatType", ({ enumerable: true, get: function () { return Configuration_2.FormatType; } })); Object.defineProperty(exports, "ProjectLookup", ({ enumerable: true, get: function () { return Configuration_2.ProjectLookup; } })); Object.defineProperty(exports, "SettingsType", ({ enumerable: true, get: function () { return Configuration_2.SettingsType; } })); var Installer_1 = __webpack_require__(45006); Object.defineProperty(exports, "BuildType", ({ enumerable: true, get: function () { return Installer_1.BuildType; } })); var LightReport_1 = __webpack_require__(60613); Object.defineProperty(exports, "LightReport", ({ enumerable: true, get: function () { return LightReport_1.LightReport; } })); var Manifest_1 = __webpack_require__(11658); Object.defineProperty(exports, "Manifest", ({ enumerable: true, get: function () { return Manifest_1.Manifest; } })); var MessageName_1 = __webpack_require__(62755); Object.defineProperty(exports, "MessageName", ({ enumerable: true, get: function () { return MessageName_1.MessageName; } })); var Project_1 = __webpack_require__(49015); Object.defineProperty(exports, "Project", ({ enumerable: true, get: function () { return Project_1.Project; } })); var ProtocolResolver_1 = __webpack_require__(6729); Object.defineProperty(exports, "TAG_REGEXP", ({ enumerable: true, get: function () { return ProtocolResolver_1.TAG_REGEXP; } })); var Report_1 = __webpack_require__(50334); Object.defineProperty(exports, "ReportError", ({ enumerable: true, get: function () { return Report_1.ReportError; } })); Object.defineProperty(exports, "Report", ({ enumerable: true, get: function () { return Report_1.Report; } })); var StreamReport_1 = __webpack_require__(73759); Object.defineProperty(exports, "StreamReport", ({ enumerable: true, get: function () { return StreamReport_1.StreamReport; } })); var TelemetryManager_1 = __webpack_require__(58166); Object.defineProperty(exports, "TelemetryManager", ({ enumerable: true, get: function () { return TelemetryManager_1.TelemetryManager; } })); var ThrowReport_1 = __webpack_require__(6059); Object.defineProperty(exports, "ThrowReport", ({ enumerable: true, get: function () { return ThrowReport_1.ThrowReport; } })); var VirtualFetcher_1 = __webpack_require__(7100); Object.defineProperty(exports, "VirtualFetcher", ({ enumerable: true, get: function () { return VirtualFetcher_1.VirtualFetcher; } })); var WorkspaceResolver_1 = __webpack_require__(83740); Object.defineProperty(exports, "WorkspaceResolver", ({ enumerable: true, get: function () { return WorkspaceResolver_1.WorkspaceResolver; } })); var Workspace_1 = __webpack_require__(2234); Object.defineProperty(exports, "Workspace", ({ enumerable: true, get: function () { return Workspace_1.Workspace; } })); var YarnVersion_1 = __webpack_require__(71774); Object.defineProperty(exports, "YarnVersion", ({ enumerable: true, get: function () { return YarnVersion_1.YarnVersion; } })); var types_1 = __webpack_require__(79588); Object.defineProperty(exports, "LinkType", ({ enumerable: true, get: function () { return types_1.LinkType; } })); Object.defineProperty(exports, "PackageExtensionType", ({ enumerable: true, get: function () { return types_1.PackageExtensionType; } })); Object.defineProperty(exports, "PackageExtensionStatus", ({ enumerable: true, get: function () { return types_1.PackageExtensionStatus; } })); /***/ }), /***/ 63111: /***/ ((module, exports, __webpack_require__) => { "use strict"; /* module decorator */ module = __webpack_require__.nmd(module); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.tryParseOptionalBoolean = exports.parseOptionalBoolean = exports.parseBoolean = exports.replaceEnvVariables = exports.buildIgnorePattern = exports.sortMap = exports.dynamicRequireNoCache = exports.dynamicRequire = exports.DefaultStream = exports.BufferStream = exports.bufferStream = exports.prettifySyncErrors = exports.prettifyAsyncErrors = exports.releaseAfterUseAsync = exports.getMapWithDefault = exports.getSetWithDefault = exports.getArrayWithDefault = exports.getFactoryWithDefault = exports.convertMapsToIndexableObjects = exports.isIndexableObject = exports.mapAndFind = exports.mapAndFilter = exports.validateEnum = exports.assertNever = exports.overrideType = exports.escapeRegExp = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const clipanion_1 = __webpack_require__(87730); const micromatch_1 = tslib_1.__importDefault(__webpack_require__(70850)); const stream_1 = __webpack_require__(92413); function escapeRegExp(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`); } exports.escapeRegExp = escapeRegExp; function overrideType(val) { } exports.overrideType = overrideType; function assertNever(arg) { throw new Error(`Assertion failed: Unexpected object '${arg}'`); } exports.assertNever = assertNever; function validateEnum(def, value) { if (!Object.values(def).includes(value)) throw new Error(`Assertion failed: Invalid value for enumeration`); return value; } exports.validateEnum = validateEnum; function mapAndFilter(iterable, cb) { const output = []; for (const value of iterable) { const out = cb(value); if (out !== mapAndFilterSkip) { output.push(out); } } return output; } exports.mapAndFilter = mapAndFilter; const mapAndFilterSkip = Symbol(); mapAndFilter.skip = mapAndFilterSkip; function mapAndFind(iterable, cb) { for (const value of iterable) { const out = cb(value); if (out !== mapAndFindSkip) { return out; } } return undefined; } exports.mapAndFind = mapAndFind; const mapAndFindSkip = Symbol(); mapAndFind.skip = mapAndFindSkip; function isIndexableObject(value) { return typeof value === `object` && value !== null; } exports.isIndexableObject = isIndexableObject; /** * Converts Maps to indexable objects recursively. */ function convertMapsToIndexableObjects(arg) { if (arg instanceof Map) arg = Object.fromEntries(arg); if (isIndexableObject(arg)) { for (const key of Object.keys(arg)) { const value = arg[key]; if (isIndexableObject(value)) { // @ts-expect-error: Apparently nothing in this world can be used to index type 'T & { [key: string]: unknown; }' arg[key] = convertMapsToIndexableObjects(value); } } } return arg; } exports.convertMapsToIndexableObjects = convertMapsToIndexableObjects; function getFactoryWithDefault(map, key, factory) { let value = map.get(key); if (typeof value === `undefined`) map.set(key, value = factory()); return value; } exports.getFactoryWithDefault = getFactoryWithDefault; function getArrayWithDefault(map, key) { let value = map.get(key); if (typeof value === `undefined`) map.set(key, value = []); return value; } exports.getArrayWithDefault = getArrayWithDefault; function getSetWithDefault(map, key) { let value = map.get(key); if (typeof value === `undefined`) map.set(key, value = new Set()); return value; } exports.getSetWithDefault = getSetWithDefault; function getMapWithDefault(map, key) { let value = map.get(key); if (typeof value === `undefined`) map.set(key, value = new Map()); return value; } exports.getMapWithDefault = getMapWithDefault; // Executes a chunk of code and calls a cleanup function once it returns (even // if it throws an exception) async function releaseAfterUseAsync(fn, cleanup) { if (cleanup == null) return await fn(); try { return await fn(); } finally { await cleanup(); } } exports.releaseAfterUseAsync = releaseAfterUseAsync; // Executes a chunk of code but slightly modify its exception message if it // throws something async function prettifyAsyncErrors(fn, update) { try { return await fn(); } catch (error) { error.message = update(error.message); throw error; } } exports.prettifyAsyncErrors = prettifyAsyncErrors; // Same thing but synchronous function prettifySyncErrors(fn, update) { try { return fn(); } catch (error) { error.message = update(error.message); throw error; } } exports.prettifySyncErrors = prettifySyncErrors; // Converts a Node stream into a Buffer instance async function bufferStream(stream) { return await new Promise((resolve, reject) => { const chunks = []; stream.on(`error`, error => { reject(error); }); stream.on(`data`, chunk => { chunks.push(chunk); }); stream.on(`end`, () => { resolve(Buffer.concat(chunks)); }); }); } exports.bufferStream = bufferStream; // A stream implementation that buffers a stream to send it all at once class BufferStream extends stream_1.Transform { constructor() { super(...arguments); this.chunks = []; } _transform(chunk, encoding, cb) { if (encoding !== `buffer` || !Buffer.isBuffer(chunk)) throw new Error(`Assertion failed: BufferStream only accept buffers`); this.chunks.push(chunk); cb(null, null); } _flush(cb) { cb(null, Buffer.concat(this.chunks)); } } exports.BufferStream = BufferStream; // A stream implementation that prints a message if nothing was output class DefaultStream extends stream_1.Transform { constructor(ifEmpty = Buffer.alloc(0)) { super(); this.active = true; this.ifEmpty = ifEmpty; } _transform(chunk, encoding, cb) { if (encoding !== `buffer` || !Buffer.isBuffer(chunk)) throw new Error(`Assertion failed: DefaultStream only accept buffers`); this.active = false; cb(null, chunk); } _flush(cb) { if (this.active && this.ifEmpty.length > 0) { cb(null, this.ifEmpty); } } } exports.DefaultStream = DefaultStream; // Webpack has this annoying tendency to replace dynamic requires by a stub // code that simply throws when called. It's all fine and dandy in the context // of a web application, but is quite annoying when working with Node projects! function dynamicRequire(path) { // @ts-expect-error if (typeof require !== `undefined`) { // @ts-expect-error return require(path); } else { return __webpack_require__(61452)(path); } } exports.dynamicRequire = dynamicRequire; function dynamicRequireNoCache(path) { const physicalPath = fslib_1.npath.fromPortablePath(path); const currentCacheEntry = __webpack_require__.c[physicalPath]; delete __webpack_require__.c[physicalPath]; let result; try { result = dynamicRequire(physicalPath); const freshCacheEntry = __webpack_require__.c[physicalPath]; const freshCacheIndex = module.children.indexOf(freshCacheEntry); if (freshCacheIndex !== -1) { module.children.splice(freshCacheIndex, 1); } } finally { __webpack_require__.c[physicalPath] = currentCacheEntry; } return result; } exports.dynamicRequireNoCache = dynamicRequireNoCache; // This function transforms an iterable into an array and sorts it according to // the mapper functions provided as parameter. The mappers are expected to take // each element from the iterable and generate a string from it, that will then // be used to compare the entries. // // Using sortMap is more efficient than kinda reimplementing the logic in a sort // predicate because sortMap caches the result of the mappers in such a way that // they are guaranteed to be executed exactly once for each element. function sortMap(values, mappers) { const asArray = Array.from(values); if (!Array.isArray(mappers)) mappers = [mappers]; const stringified = []; for (const mapper of mappers) stringified.push(asArray.map(value => mapper(value))); const indices = asArray.map((_, index) => index); indices.sort((a, b) => { for (const layer of stringified) { const comparison = layer[a] < layer[b] ? -1 : layer[a] > layer[b] ? +1 : 0; if (comparison !== 0) { return comparison; } } return 0; }); return indices.map(index => { return asArray[index]; }); } exports.sortMap = sortMap; /** * Combines an Array of glob patterns into a regular expression. * * @param ignorePatterns An array of glob patterns * * @returns A `string` representing a regular expression or `null` if no glob patterns are provided */ function buildIgnorePattern(ignorePatterns) { if (ignorePatterns.length === 0) return null; return ignorePatterns.map(pattern => { return `(${micromatch_1.default.makeRe(pattern, { windows: false, }).source})`; }).join(`|`); } exports.buildIgnorePattern = buildIgnorePattern; function replaceEnvVariables(value, { env }) { const regex = /\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g; return value.replace(regex, (...args) => { const { variableName, colon, fallback } = args[args.length - 1]; const variableExist = Object.prototype.hasOwnProperty.call(env, variableName); const variableValue = env[variableName]; if (variableValue) return variableValue; if (variableExist && !colon) return variableValue; if (fallback != null) return fallback; throw new clipanion_1.UsageError(`Environment variable not found (${variableName})`); }); } exports.replaceEnvVariables = replaceEnvVariables; function parseBoolean(value) { switch (value) { case `true`: case `1`: case 1: case true: { return true; } case `false`: case `0`: case 0: case false: { return false; } default: { throw new Error(`Couldn't parse "${value}" as a boolean`); } } } exports.parseBoolean = parseBoolean; function parseOptionalBoolean(value) { if (typeof value === `undefined`) return value; return parseBoolean(value); } exports.parseOptionalBoolean = parseOptionalBoolean; function tryParseOptionalBoolean(value) { try { return parseOptionalBoolean(value); } catch (_a) { return null; } } exports.tryParseOptionalBoolean = tryParseOptionalBoolean; /***/ }), /***/ 83825: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.builtinModules = exports.dynamicRequire = void 0; const tslib_1 = __webpack_require__(70655); const module_1 = tslib_1.__importDefault(__webpack_require__(32282)); function dynamicRequire(request) { const req = typeof require !== `undefined` ? require : __webpack_require__(61452); return req(request); } exports.dynamicRequire = dynamicRequire; function builtinModules() { // @ts-expect-error return new Set(module_1.default.builtinModules || Object.keys(process.binding(`natives`))); } exports.builtinModules = builtinModules; /***/ }), /***/ 50888: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.executeWorkspaceAccessibleBinary = exports.executePackageAccessibleBinary = exports.getWorkspaceAccessibleBinaries = exports.getPackageAccessibleBinaries = exports.maybeExecuteWorkspaceLifecycleScript = exports.executeWorkspaceLifecycleScript = exports.hasWorkspaceScript = exports.executeWorkspaceScript = exports.executePackageShellcode = exports.executePackageScript = exports.hasPackageScript = exports.prepareExternalProject = exports.makeScriptEnv = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const fslib_2 = __webpack_require__(91794); const libzip_1 = __webpack_require__(40364); const shell_1 = __webpack_require__(56096); const binjumper_1 = __webpack_require__(94372); const capitalize_1 = tslib_1.__importDefault(__webpack_require__(48403)); const p_limit_1 = tslib_1.__importDefault(__webpack_require__(94498)); const stream_1 = __webpack_require__(92413); const Manifest_1 = __webpack_require__(11658); const MessageName_1 = __webpack_require__(62755); const Report_1 = __webpack_require__(50334); const StreamReport_1 = __webpack_require__(73759); const YarnVersion_1 = __webpack_require__(71774); const execUtils = tslib_1.__importStar(__webpack_require__(12915)); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); var PackageManager; (function (PackageManager) { PackageManager["Yarn1"] = "Yarn Classic"; PackageManager["Yarn2"] = "Yarn"; PackageManager["Npm"] = "npm"; PackageManager["Pnpm"] = "pnpm"; })(PackageManager || (PackageManager = {})); async function makePathWrapper(location, name, argv0, args = []) { if (process.platform === `win32`) { await Promise.all([ fslib_2.xfs.writeFilePromise(fslib_2.ppath.format({ dir: location, name, ext: `.exe` }), binjumper_1.getBinjumper()), fslib_2.xfs.writeFilePromise(fslib_2.ppath.format({ dir: location, name, ext: `.exe.info` }), [argv0, ...args].join(`\n`)), fslib_2.xfs.writeFilePromise(fslib_2.ppath.format({ dir: location, name, ext: `.cmd` }), `@"${argv0}" ${args.map(arg => `"${arg.replace(`"`, `""`)}"`).join(` `)} %*\n`), ]); } await fslib_2.xfs.writeFilePromise(fslib_2.ppath.join(location, name), `#!/bin/sh\nexec "${argv0}" ${args.map(arg => `'${arg.replace(/'/g, `'"'"'`)}'`).join(` `)} "$@"\n`); await fslib_2.xfs.chmodPromise(fslib_2.ppath.join(location, name), 0o755); } async function detectPackageManager(location) { let yarnLock = null; try { yarnLock = await fslib_2.xfs.readFilePromise(fslib_2.ppath.join(location, fslib_1.Filename.lockfile), `utf8`); } catch (_a) { } if (yarnLock !== null) { if (yarnLock.match(/^__metadata:$/m)) { return PackageManager.Yarn2; } else { return PackageManager.Yarn1; } } if (fslib_2.xfs.existsSync(fslib_2.ppath.join(location, `package-lock.json`))) return PackageManager.Npm; if (fslib_2.xfs.existsSync(fslib_2.ppath.join(location, `pnpm-lock.yaml`))) return PackageManager.Pnpm; return null; } async function makeScriptEnv({ project, binFolder, lifecycleScript }) { const scriptEnv = {}; for (const [key, value] of Object.entries(process.env)) if (typeof value !== `undefined`) scriptEnv[key.toLowerCase() !== `path` ? key : `PATH`] = value; const nBinFolder = fslib_2.npath.fromPortablePath(binFolder); // We expose the base folder in the environment so that we can later add the // binaries for the dependencies of the active package scriptEnv.BERRY_BIN_FOLDER = fslib_2.npath.fromPortablePath(nBinFolder); // Register some binaries that must be made available in all subprocesses // spawned by Yarn (we thus ensure that they always use the right version) await makePathWrapper(binFolder, `node`, process.execPath); if (YarnVersion_1.YarnVersion !== null) { await makePathWrapper(binFolder, `run`, process.execPath, [process.argv[1], `run`]); await makePathWrapper(binFolder, `yarn`, process.execPath, [process.argv[1]]); await makePathWrapper(binFolder, `yarnpkg`, process.execPath, [process.argv[1]]); await makePathWrapper(binFolder, `node-gyp`, process.execPath, [process.argv[1], `run`, `--top-level`, `node-gyp`]); } if (project) scriptEnv.INIT_CWD = fslib_2.npath.fromPortablePath(project.configuration.startingCwd); scriptEnv.PATH = scriptEnv.PATH ? `${nBinFolder}${fslib_2.npath.delimiter}${scriptEnv.PATH}` : `${nBinFolder}`; scriptEnv.npm_execpath = `${nBinFolder}${fslib_2.npath.sep}yarn`; scriptEnv.npm_node_execpath = `${nBinFolder}${fslib_2.npath.sep}node`; const version = YarnVersion_1.YarnVersion !== null ? `yarn/${YarnVersion_1.YarnVersion}` : `yarn/${miscUtils.dynamicRequire(`@yarnpkg/core`).version}-core`; scriptEnv.npm_config_user_agent = `${version} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`; if (lifecycleScript) scriptEnv.npm_lifecycle_event = lifecycleScript; if (project) { await project.configuration.triggerHook(hook => hook.setupScriptEnvironment, project, scriptEnv, async (name, argv0, args) => { return await makePathWrapper(binFolder, fslib_2.toFilename(name), argv0, args); }); } return scriptEnv; } exports.makeScriptEnv = makeScriptEnv; /** * Given a folder, prepares this project for use. Runs `yarn install` then * `yarn build` if a `package.json` is found. */ const MAX_PREPARE_CONCURRENCY = 2; const prepareLimit = p_limit_1.default(MAX_PREPARE_CONCURRENCY); async function prepareExternalProject(cwd, outputPath, { configuration, report, workspace = null }) { await prepareLimit(async () => { await fslib_2.xfs.mktempPromise(async (logDir) => { const logFile = fslib_2.ppath.join(logDir, `pack.log`); const stdin = null; const { stdout, stderr } = configuration.getSubprocessStreams(logFile, { prefix: cwd, report }); const packageManager = await detectPackageManager(cwd); let effectivePackageManager; if (packageManager !== null) { stdout.write(`Installing the project using ${packageManager}\n\n`); effectivePackageManager = packageManager; } else { stdout.write(`No package manager detected; defaulting to Yarn\n\n`); effectivePackageManager = PackageManager.Yarn2; } await fslib_2.xfs.mktempPromise(async (binFolder) => { const env = await makeScriptEnv({ binFolder }); const workflows = new Map([ [PackageManager.Yarn1, async () => { const workspaceCli = workspace !== null ? [`workspace`, workspace] : []; // Makes sure that we'll be using Yarn 1.x const version = await execUtils.pipevp(`yarn`, [`set`, `version`, `classic`, `--only-if-needed`], { cwd, env, stdin, stdout, stderr, end: execUtils.EndStrategy.ErrorCode }); if (version.code !== 0) return version.code; // Otherwise Yarn 1 will pack the .yarn directory :( await fslib_2.xfs.appendFilePromise(fslib_2.ppath.join(cwd, `.npmignore`), `/.yarn\n`); stdout.write(`\n`); // Run an install; we can't avoid it unless we inspect the // package.json, which I don't want to do to keep the codebase // clean (even if it has a slight perf cost when cloning v1 repos) const install = await execUtils.pipevp(`yarn`, [`install`], { cwd, env, stdin, stdout, stderr, end: execUtils.EndStrategy.ErrorCode }); if (install.code !== 0) return install.code; stdout.write(`\n`); const pack = await execUtils.pipevp(`yarn`, [...workspaceCli, `pack`, `--filename`, fslib_2.npath.fromPortablePath(outputPath)], { cwd, env, stdin, stdout, stderr }); if (pack.code !== 0) return pack.code; return 0; }], [PackageManager.Yarn2, async () => { const workspaceCli = workspace !== null ? [`workspace`, workspace] : []; // We enable inline builds, because nobody wants to // read a logfile telling them to open another logfile env.YARN_ENABLE_INLINE_BUILDS = `1`; // If a lockfile doesn't exist we create a empty one to // prevent the project root detection from thinking it's in an // undeclared workspace when the user has a lockfile in their home // directory on Windows const lockfilePath = fslib_2.ppath.join(cwd, fslib_1.Filename.lockfile); if (!(await fslib_2.xfs.existsPromise(lockfilePath))) await fslib_2.xfs.writeFilePromise(lockfilePath, ``); // Yarn 2 supports doing the install and the pack in a single command, // so we leverage that. We also don't need the "set version" call since // we're already operating within a Yarn 2 context (plus people should // really check-in their Yarn versions anyway). const pack = await execUtils.pipevp(`yarn`, [...workspaceCli, `pack`, `--install-if-needed`, `--filename`, fslib_2.npath.fromPortablePath(outputPath)], { cwd, env, stdin, stdout, stderr }); if (pack.code !== 0) return pack.code; return 0; }], [PackageManager.Npm, async () => { if (workspace !== null) throw new Error(`Workspaces aren't supported by npm, which has been detected as the primary package manager for ${cwd}`); // Otherwise npm won't properly set the user agent, using the Yarn // one instead delete env.npm_config_user_agent; // We can't use `npm ci` because some projects don't have npm // lockfiles that are up-to-date. Hopefully npm won't decide // to change the versions randomly. const install = await execUtils.pipevp(`npm`, [`install`], { cwd, env, stdin, stdout, stderr, end: execUtils.EndStrategy.ErrorCode }); if (install.code !== 0) return install.code; const packStream = new stream_1.PassThrough(); const packPromise = miscUtils.bufferStream(packStream); packStream.pipe(stdout); // It seems that npm doesn't support specifying the pack output path, // so we have to extract the stdout on top of forking it to the logs. const pack = await execUtils.pipevp(`npm`, [`pack`, `--silent`], { cwd, env, stdin, stdout: packStream, stderr }); if (pack.code !== 0) return pack.code; const packOutput = (await packPromise).toString().trim(); const packTarget = fslib_2.ppath.resolve(cwd, fslib_2.npath.toPortablePath(packOutput)); // Only then can we move the pack to its rightful location await fslib_2.xfs.renamePromise(packTarget, outputPath); return 0; }], ]); const workflow = workflows.get(effectivePackageManager); if (typeof workflow === `undefined`) throw new Error(`Assertion failed: Unsupported workflow`); const code = await workflow(); if (code === 0 || typeof code === `undefined`) return; fslib_2.xfs.detachTemp(logDir); throw new Report_1.ReportError(MessageName_1.MessageName.PACKAGE_PREPARATION_FAILED, `Packing the package failed (exit code ${code}, logs can be found here: ${logFile})`); }); }); }); } exports.prepareExternalProject = prepareExternalProject; async function hasPackageScript(locator, scriptName, { project }) { const pkg = project.storedPackages.get(locator.locatorHash); if (!pkg) throw new Error(`Package for ${structUtils.prettyLocator(project.configuration, locator)} not found in the project`); return await fslib_1.ZipOpenFS.openPromise(async (zipOpenFs) => { const configuration = project.configuration; const linkers = project.configuration.getLinkers(); const linkerOptions = { project, report: new StreamReport_1.StreamReport({ stdout: new stream_1.PassThrough(), configuration }) }; const linker = linkers.find(linker => linker.supportsPackage(pkg, linkerOptions)); if (!linker) throw new Error(`The package ${structUtils.prettyLocator(project.configuration, pkg)} isn't supported by any of the available linkers`); const packageLocation = await linker.findPackageLocation(pkg, linkerOptions); const packageFs = new fslib_1.CwdFS(packageLocation, { baseFs: zipOpenFs }); const manifest = await Manifest_1.Manifest.find(fslib_1.PortablePath.dot, { baseFs: packageFs }); return manifest.scripts.has(scriptName); }, { libzip: await libzip_1.getLibzipPromise(), }); } exports.hasPackageScript = hasPackageScript; async function executePackageScript(locator, scriptName, args, { cwd, project, stdin, stdout, stderr }) { return await fslib_2.xfs.mktempPromise(async (binFolder) => { const { manifest, env, cwd: realCwd } = await initializePackageEnvironment(locator, { project, binFolder, cwd, lifecycleScript: scriptName }); const script = manifest.scripts.get(scriptName); if (typeof script === `undefined`) return 1; const realExecutor = async () => { return await shell_1.execute(script, args, { cwd: realCwd, env, stdin, stdout, stderr }); }; const executor = await project.configuration.reduceHook(hooks => { return hooks.wrapScriptExecution; }, realExecutor, project, locator, scriptName, { script, args, cwd: realCwd, env, stdin, stdout, stderr, }); return await executor(); }); } exports.executePackageScript = executePackageScript; async function executePackageShellcode(locator, command, args, { cwd, project, stdin, stdout, stderr }) { return await fslib_2.xfs.mktempPromise(async (binFolder) => { const { env, cwd: realCwd } = await initializePackageEnvironment(locator, { project, binFolder, cwd }); return await shell_1.execute(command, args, { cwd: realCwd, env, stdin, stdout, stderr }); }); } exports.executePackageShellcode = executePackageShellcode; async function initializePackageEnvironment(locator, { project, binFolder, cwd, lifecycleScript }) { const pkg = project.storedPackages.get(locator.locatorHash); if (!pkg) throw new Error(`Package for ${structUtils.prettyLocator(project.configuration, locator)} not found in the project`); return await fslib_1.ZipOpenFS.openPromise(async (zipOpenFs) => { const configuration = project.configuration; const linkers = project.configuration.getLinkers(); const linkerOptions = { project, report: new StreamReport_1.StreamReport({ stdout: new stream_1.PassThrough(), configuration }) }; const linker = linkers.find(linker => linker.supportsPackage(pkg, linkerOptions)); if (!linker) throw new Error(`The package ${structUtils.prettyLocator(project.configuration, pkg)} isn't supported by any of the available linkers`); const env = await makeScriptEnv({ project, binFolder, lifecycleScript }); await Promise.all(Array.from(await getPackageAccessibleBinaries(locator, { project }), ([binaryName, [, binaryPath]]) => makePathWrapper(binFolder, fslib_2.toFilename(binaryName), process.execPath, [binaryPath]))); const packageLocation = await linker.findPackageLocation(pkg, linkerOptions); const packageFs = new fslib_1.CwdFS(packageLocation, { baseFs: zipOpenFs }); const manifest = await Manifest_1.Manifest.find(fslib_1.PortablePath.dot, { baseFs: packageFs }); if (typeof cwd === `undefined`) cwd = packageLocation; return { manifest, binFolder, env, cwd }; }, { libzip: await libzip_1.getLibzipPromise(), }); } async function executeWorkspaceScript(workspace, scriptName, args, { cwd, stdin, stdout, stderr }) { return await executePackageScript(workspace.anchoredLocator, scriptName, args, { cwd, project: workspace.project, stdin, stdout, stderr }); } exports.executeWorkspaceScript = executeWorkspaceScript; function hasWorkspaceScript(workspace, scriptName) { return workspace.manifest.scripts.has(scriptName); } exports.hasWorkspaceScript = hasWorkspaceScript; async function executeWorkspaceLifecycleScript(workspace, lifecycleScriptName, { cwd, report }) { const { configuration } = workspace.project; const stdin = null; await fslib_2.xfs.mktempPromise(async (logDir) => { const logFile = fslib_2.ppath.join(logDir, `${lifecycleScriptName}.log`); const header = `# This file contains the result of Yarn calling the "${lifecycleScriptName}" lifecycle script inside a workspace ("${workspace.cwd}")\n`; const { stdout, stderr } = configuration.getSubprocessStreams(logFile, { report, prefix: structUtils.prettyLocator(configuration, workspace.anchoredLocator), header, }); report.reportInfo(MessageName_1.MessageName.LIFECYCLE_SCRIPT, `Calling the "${lifecycleScriptName}" lifecycle script`); const exitCode = await executeWorkspaceScript(workspace, lifecycleScriptName, [], { cwd, stdin, stdout, stderr }); stdout.end(); stderr.end(); if (exitCode !== 0) { fslib_2.xfs.detachTemp(logDir); throw new Report_1.ReportError(MessageName_1.MessageName.LIFECYCLE_SCRIPT, `${capitalize_1.default(lifecycleScriptName)} script failed (exit code ${formatUtils.pretty(configuration, exitCode, formatUtils.Type.NUMBER)}, logs can be found here: ${formatUtils.pretty(configuration, logFile, formatUtils.Type.PATH)}); run ${formatUtils.pretty(configuration, `yarn ${lifecycleScriptName}`, formatUtils.Type.CODE)} to investigate`); } }); } exports.executeWorkspaceLifecycleScript = executeWorkspaceLifecycleScript; async function maybeExecuteWorkspaceLifecycleScript(workspace, lifecycleScriptName, opts) { if (hasWorkspaceScript(workspace, lifecycleScriptName)) { await executeWorkspaceLifecycleScript(workspace, lifecycleScriptName, opts); } } exports.maybeExecuteWorkspaceLifecycleScript = maybeExecuteWorkspaceLifecycleScript; /** * Return the binaries that can be accessed by the specified package * * @param locator The queried package * @param project The project owning the package */ async function getPackageAccessibleBinaries(locator, { project }) { const configuration = project.configuration; const binaries = new Map(); const pkg = project.storedPackages.get(locator.locatorHash); if (!pkg) throw new Error(`Package for ${structUtils.prettyLocator(configuration, locator)} not found in the project`); const stdout = new stream_1.Writable(); const linkers = configuration.getLinkers(); const linkerOptions = { project, report: new StreamReport_1.StreamReport({ configuration, stdout }) }; const visibleLocators = new Set([locator.locatorHash]); for (const descriptor of pkg.dependencies.values()) { const resolution = project.storedResolutions.get(descriptor.descriptorHash); if (!resolution) throw new Error(`Assertion failed: The resolution (${structUtils.prettyDescriptor(configuration, descriptor)}) should have been registered`); visibleLocators.add(resolution); } for (const locatorHash of visibleLocators) { const dependency = project.storedPackages.get(locatorHash); if (!dependency) throw new Error(`Assertion failed: The package (${locatorHash}) should have been registered`); if (dependency.bin.size === 0) continue; const linker = linkers.find(linker => linker.supportsPackage(dependency, linkerOptions)); if (!linker) continue; let packageLocation = null; try { packageLocation = await linker.findPackageLocation(dependency, linkerOptions); } catch (err) { // Some packages may not be installed when they are incompatible // with the current system. if (err.code === `LOCATOR_NOT_INSTALLED`) { continue; } else { throw err; } } for (const [name, target] of dependency.bin) { binaries.set(name, [dependency, fslib_2.npath.fromPortablePath(fslib_2.ppath.resolve(packageLocation, target))]); } } return binaries; } exports.getPackageAccessibleBinaries = getPackageAccessibleBinaries; /** * Return the binaries that can be accessed by the specified workspace * * @param workspace The queried workspace */ async function getWorkspaceAccessibleBinaries(workspace) { return await getPackageAccessibleBinaries(workspace.anchoredLocator, { project: workspace.project }); } exports.getWorkspaceAccessibleBinaries = getWorkspaceAccessibleBinaries; /** * Execute a binary from the specified package. * * Note that "binary" in this sense means "a Javascript file". Actual native * binaries cannot be executed this way, because we use Node in order to * transparently read from the archives. * * @param locator The queried package * @param binaryName The name of the binary file to execute * @param args The arguments to pass to the file */ async function executePackageAccessibleBinary(locator, binaryName, args, { cwd, project, stdin, stdout, stderr, nodeArgs = [] }) { const packageAccessibleBinaries = await getPackageAccessibleBinaries(locator, { project }); const binary = packageAccessibleBinaries.get(binaryName); if (!binary) throw new Error(`Binary not found (${binaryName}) for ${structUtils.prettyLocator(project.configuration, locator)}`); return await fslib_2.xfs.mktempPromise(async (binFolder) => { const [, binaryPath] = binary; const env = await makeScriptEnv({ project, binFolder }); await Promise.all(Array.from(packageAccessibleBinaries, ([binaryName, [, binaryPath]]) => makePathWrapper(env.BERRY_BIN_FOLDER, fslib_2.toFilename(binaryName), process.execPath, [binaryPath]))); let result; try { result = await execUtils.pipevp(process.execPath, [...nodeArgs, binaryPath, ...args], { cwd, env, stdin, stdout, stderr }); } finally { await fslib_2.xfs.removePromise(env.BERRY_BIN_FOLDER); } return result.code; }); } exports.executePackageAccessibleBinary = executePackageAccessibleBinary; /** * Execute a binary from the specified workspace * * @param workspace The queried package * @param binaryName The name of the binary file to execute * @param args The arguments to pass to the file */ async function executeWorkspaceAccessibleBinary(workspace, binaryName, args, { cwd, stdin, stdout, stderr }) { return await executePackageAccessibleBinary(workspace.anchoredLocator, binaryName, args, { project: workspace.project, cwd, stdin, stdout, stderr }); } exports.executeWorkspaceAccessibleBinary = executeWorkspaceAccessibleBinary; /***/ }), /***/ 51201: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validRange = exports.satisfiesWithPrereleases = void 0; const tslib_1 = __webpack_require__(70655); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); /** * Returns whether the given semver version satisfies the given range. Notably * this supports prerelease versions so that "2.0.0-rc.0" satisfies the range * ">=1.0.0", for example. * * This function exists because the semver.satisfies method does not include * pre releases. This means ranges such as * would not satisfy 1.0.0-rc. The * includePrerelease flag has a weird behavior and cannot be used (if you want * to try it out, just run the `semverUtils` testsuite using this flag instead * of our own implementation, and you'll see the failing cases). * * See https://github.com/yarnpkg/berry/issues/575 for more context. */ function satisfiesWithPrereleases(version, range, loose = false) { let semverRange; try { semverRange = new semver_1.default.Range(range, { includePrerelease: true, loose }); } catch (err) { return false; } if (!version) return false; let semverVersion; try { semverVersion = new semver_1.default.SemVer(version, semverRange); if (semverVersion.prerelease) { semverVersion.prerelease = []; } } catch (err) { return false; } // A range has multiple sets of comparators. A version must satisfy all // comparators in a set and at least one set to satisfy the range. return semverRange.set.some(comparatorSet => { for (const comparator of comparatorSet) if (comparator.semver.prerelease) comparator.semver.prerelease = []; return comparatorSet.every(comparator => { return comparator.test(semverVersion); }); }); } exports.satisfiesWithPrereleases = satisfiesWithPrereleases; const rangesCache = new Map(); /** * A cached version of `new semver.Range(potentialRange)` that returns `null` on invalid ranges */ function validRange(potentialRange) { if (potentialRange.indexOf(`:`) !== -1) return null; let range = rangesCache.get(potentialRange); if (typeof range !== `undefined`) return range; try { range = new semver_1.default.Range(potentialRange); } catch (_a) { range = null; } rangesCache.set(potentialRange, range); return range; } exports.validRange = validRange; /***/ }), /***/ 34103: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIdentVendorPath = exports.prettyDependent = exports.prettyResolution = exports.prettyWorkspace = exports.sortDescriptors = exports.prettyLocatorNoColors = exports.prettyLocator = exports.prettyReference = exports.prettyDescriptor = exports.prettyRange = exports.prettyIdent = exports.slugifyLocator = exports.slugifyIdent = exports.stringifyLocator = exports.stringifyDescriptor = exports.stringifyIdent = exports.requirableIdent = exports.convertToManifestRange = exports.makeRange = exports.parseFileStyleRange = exports.parseRange = exports.tryParseLocator = exports.parseLocator = exports.tryParseDescriptor = exports.parseDescriptor = exports.tryParseIdent = exports.parseIdent = exports.areVirtualPackagesEquivalent = exports.areLocatorsEqual = exports.areDescriptorsEqual = exports.areIdentsEqual = exports.bindLocator = exports.bindDescriptor = exports.devirtualizeLocator = exports.devirtualizeDescriptor = exports.isVirtualLocator = exports.isVirtualDescriptor = exports.virtualizePackage = exports.virtualizeDescriptor = exports.copyPackage = exports.renamePackage = exports.convertPackageToLocator = exports.convertLocatorToDescriptor = exports.convertDescriptorToLocator = exports.convertToIdent = exports.makeLocator = exports.makeDescriptor = exports.makeIdent = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const querystring_1 = tslib_1.__importDefault(__webpack_require__(71191)); const semver_1 = tslib_1.__importDefault(__webpack_require__(74451)); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); const hashUtils = tslib_1.__importStar(__webpack_require__(73279)); const miscUtils = tslib_1.__importStar(__webpack_require__(63111)); const structUtils = tslib_1.__importStar(__webpack_require__(34103)); const VIRTUAL_PROTOCOL = `virtual:`; const VIRTUAL_ABBREVIATE = 5; /** * Creates a package ident. * * @param scope The package scope without the `@` prefix (eg. `types`) * @param name The name of the package */ function makeIdent(scope, name) { if (scope === null || scope === void 0 ? void 0 : scope.startsWith(`@`)) throw new Error(`Invalid scope: don't prefix it with '@'`); return { identHash: hashUtils.makeHash(scope, name), scope, name }; } exports.makeIdent = makeIdent; /** * Creates a package descriptor. * * @param ident The base ident (see `makeIdent`) * @param range The range to attach (eg. `^1.0.0`) */ function makeDescriptor(ident, range) { return { identHash: ident.identHash, scope: ident.scope, name: ident.name, descriptorHash: hashUtils.makeHash(ident.identHash, range), range }; } exports.makeDescriptor = makeDescriptor; /** * Creates a package locator. * * @param ident The base ident (see `makeIdent`) * @param range The reference to attach (eg. `1.0.0`) */ function makeLocator(ident, reference) { return { identHash: ident.identHash, scope: ident.scope, name: ident.name, locatorHash: hashUtils.makeHash(ident.identHash, reference), reference }; } exports.makeLocator = makeLocator; /** * Turns a compatible source to an ident. You won't really have to use this * function since by virtue of structural inheritance all descriptors and * locators are already valid idents. * * This function is only useful if you absolutely need to remove the non-ident * fields from a structure before storing it somewhere. * * @param source The data structure to convert into an ident. */ function convertToIdent(source) { return { identHash: source.identHash, scope: source.scope, name: source.name }; } exports.convertToIdent = convertToIdent; /** * Turns a descriptor into a locator. * * Note that this process may be unsafe, as descriptors may reference multiple * packages, putting them at odd with locators' expected semantic. Only makes * sense when used with single-resolution protocols, for instance `file:`. * * @param descriptor The descriptor to convert into a locator. */ function convertDescriptorToLocator(descriptor) { return { identHash: descriptor.identHash, scope: descriptor.scope, name: descriptor.name, locatorHash: descriptor.descriptorHash, reference: descriptor.range }; } exports.convertDescriptorToLocator = convertDescriptorToLocator; /** * Turns a locator into a descriptor. * * This should be safe to do regardless of the locator, since all locator * references are expected to be valid descriptor ranges. * * @param locator The locator to convert into a descriptor. */ function convertLocatorToDescriptor(locator) { return { identHash: locator.identHash, scope: locator.scope, name: locator.name, descriptorHash: locator.locatorHash, range: locator.reference }; } exports.convertLocatorToDescriptor = convertLocatorToDescriptor; /** * Turns a package structure into a simple locator. You won't often need to * call this function since packages are already valid locators by virtue of * structural inheritance. * * This function is only useful if you absolutely need to remove the * non-locator fields from a structure before storing it somewhere. * * @param pkg The package to convert into a locator. */ function convertPackageToLocator(pkg) { return { identHash: pkg.identHash, scope: pkg.scope, name: pkg.name, locatorHash: pkg.locatorHash, reference: pkg.reference }; } exports.convertPackageToLocator = convertPackageToLocator; /** * Deep copies a package then change its locator to something else. * * @param pkg The source package * @param locator Its new new locator */ function renamePackage(pkg, locator) { return { identHash: locator.identHash, scope: locator.scope, name: locator.name, locatorHash: locator.locatorHash, reference: locator.reference, version: pkg.version, languageName: pkg.languageName, linkType: pkg.linkType, dependencies: new Map(pkg.dependencies), peerDependencies: new Map(pkg.peerDependencies), dependenciesMeta: new Map(pkg.dependenciesMeta), peerDependenciesMeta: new Map(pkg.peerDependenciesMeta), bin: new Map(pkg.bin), }; } exports.renamePackage = renamePackage; /** * Deep copies a package. The copy will share the same locator as the original. * * @param pkg The source package */ function copyPackage(pkg) { return renamePackage(pkg, pkg); } exports.copyPackage = copyPackage; /** * Creates a new virtual descriptor from a non virtual one. * * @param descriptor The descriptor to virtualize * @param entropy A hash that provides uniqueness to this virtualized descriptor (normally a locator hash) */ function virtualizeDescriptor(descriptor, entropy) { if (entropy.includes(`#`)) throw new Error(`Invalid entropy`); return makeDescriptor(descriptor, `virtual:${entropy}#${descriptor.range}`); } exports.virtualizeDescriptor = virtualizeDescriptor; /** * Creates a new virtual package from a non virtual one. * * @param pkg The package to virtualize * @param entropy A hash that provides uniqueness to this virtualized package (normally a locator hash) */ function virtualizePackage(pkg, entropy) { if (entropy.includes(`#`)) throw new Error(`Invalid entropy`); return renamePackage(pkg, makeLocator(pkg, `virtual:${entropy}#${pkg.reference}`)); } exports.virtualizePackage = virtualizePackage; /** * Returns `true` if the descriptor is virtual. */ function isVirtualDescriptor(descriptor) { return descriptor.range.startsWith(VIRTUAL_PROTOCOL); } exports.isVirtualDescriptor = isVirtualDescriptor; /** * Returns `true` if the locator is virtual. */ function isVirtualLocator(locator) { return locator.reference.startsWith(VIRTUAL_PROTOCOL); } exports.isVirtualLocator = isVirtualLocator; /** * Returns a new devirtualized descriptor based on a virtualized descriptor */ function devirtualizeDescriptor(descriptor) { if (!isVirtualDescriptor(descriptor)) throw new Error(`Not a virtual descriptor`); return makeDescriptor(descriptor, descriptor.range.replace(/^[^#]*#/, ``)); } exports.devirtualizeDescriptor = devirtualizeDescriptor; /** * Returns a new devirtualized locator based on a virtualized locator * @param locator the locator */ function devirtualizeLocator(locator) { if (!isVirtualLocator(locator)) throw new Error(`Not a virtual descriptor`); return makeLocator(locator, locator.reference.replace(/^[^#]*#/, ``)); } exports.devirtualizeLocator = devirtualizeLocator; /** * Some descriptors only make sense when bound with some internal state. For * instance that would be the case for the `file:` ranges, which require to * be bound to their parent packages in order to resolve relative paths from * the right location. * * This function will apply the specified parameters onto the requested * descriptor, but only if it didn't get bound before (important to handle the * case where we replace a descriptor by another, since when that happens the * replacement has probably been already bound). * * @param descriptor The original descriptor * @param params The parameters to encode in the range */ function bindDescriptor(descriptor, params) { if (descriptor.range.includes(`::`)) return descriptor; return makeDescriptor(descriptor, `${descriptor.range}::${querystring_1.default.stringify(params)}`); } exports.bindDescriptor = bindDescriptor; /** * Some locators only make sense when bound with some internal state. For * instance that would be the case for the `file:` references, which require to * be bound to their parent packages in order to resolve relative paths from * the right location. * * This function will apply the specified parameters onto the requested * locator, but only if it didn't get bound before (important to handle the * case where we replace a locator by another, since when that happens the * replacement has probably been already bound). * * @param locator The original locator * @param params The parameters to encode in the reference */ function bindLocator(locator, params) { if (locator.reference.includes(`::`)) return locator; return makeLocator(locator, `${locator.reference}::${querystring_1.default.stringify(params)}`); } exports.bindLocator = bindLocator; /** * Returns `true` if the idents are equal */ function areIdentsEqual(a, b) { return a.identHash === b.identHash; } exports.areIdentsEqual = areIdentsEqual; /** * Returns `true` if the descriptors are equal */ function areDescriptorsEqual(a, b) { return a.descriptorHash === b.descriptorHash; } exports.areDescriptorsEqual = areDescriptorsEqual; /** * Returns `true` if the locators are equal */ function areLocatorsEqual(a, b) { return a.locatorHash === b.locatorHash; } exports.areLocatorsEqual = areLocatorsEqual; /** * Virtual packages are considered equivalent when they belong to the same * package identity and have the same dependencies. Note that equivalence * is not the same as equality, as the references may be different. */ function areVirtualPackagesEquivalent(a, b) { if (!isVirtualLocator(a)) throw new Error(`Invalid package type`); if (!isVirtualLocator(b)) throw new Error(`Invalid package type`); if (!areIdentsEqual(a, b)) return false; if (a.dependencies.size !== b.dependencies.size) return false; for (const dependencyDescriptorA of a.dependencies.values()) { const dependencyDescriptorB = b.dependencies.get(dependencyDescriptorA.identHash); if (!dependencyDescriptorB) return false; if (!areDescriptorsEqual(dependencyDescriptorA, dependencyDescriptorB)) { return false; } } return true; } exports.areVirtualPackagesEquivalent = areVirtualPackagesEquivalent; /** * Parses a string into an ident. * * Throws an error if the ident cannot be parsed. * * @param string The ident string (eg. `@types/lodash`) */ function parseIdent(string) { const ident = tryParseIdent(string); if (!ident) throw new Error(`Invalid ident (${string})`); return ident; } exports.parseIdent = parseIdent; /** * Parses a string into an ident. * * Returns `null` if the ident cannot be parsed. * * @param string The ident string (eg. `@types/lodash`) */ function tryParseIdent(string) { const match = string.match(/^(?:@([^/]+?)\/)?([^/]+)$/); if (!match) return null; const [, scope, name] = match; const realScope = typeof scope !== `undefined` ? scope : null; return makeIdent(realScope, name); } exports.tryParseIdent = tryParseIdent; /** * Parses a `string` into a descriptor * * Throws an error if the descriptor cannot be parsed. * * @param string The descriptor string (eg. `lodash@^1.0.0`) * @param strict If `false`, the range is optional (`unknown` will be used as fallback) */ function parseDescriptor(string, strict = false) { const descriptor = tryParseDescriptor(string, strict); if (!descriptor) throw new Error(`Invalid descriptor (${string})`); return descriptor; } exports.parseDescriptor = parseDescriptor; /** * Parses a `string` into a descriptor * * Returns `null` if the descriptor cannot be parsed. * * @param string The descriptor string (eg. `lodash@^1.0.0`) * @param strict If `false`, the range is optional (`unknown` will be used as fallback) */ function tryParseDescriptor(string, strict = false) { const match = strict ? string.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/) : string.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/); if (!match) return null; const [, scope, name, range] = match; if (range === `unknown`) throw new Error(`Invalid range (${string})`); const realScope = typeof scope !== `undefined` ? scope : null; const realRange = typeof range !== `undefined` ? range : `unknown`; return makeDescriptor(makeIdent(realScope, name), realRange); } exports.tryParseDescriptor = tryParseDescriptor; /** * Parses a `string` into a locator * * Throws an error if the locator cannot be parsed. * * @param string The locator `string` (eg. `lodash@1.0.0`) * @param strict If `false`, the reference is optional (`unknown` will be used as fallback) */ function parseLocator(string, strict = false) { const locator = tryParseLocator(string, strict); if (!locator) throw new Error(`Invalid locator (${string})`); return locator; } exports.parseLocator = parseLocator; /** * Parses a `string` into a locator * * Returns `null` if the locator cannot be parsed. * * @param string The locator string (eg. `lodash@1.0.0`) * @param strict If `false`, the reference is optional (`unknown` will be used as fallback) */ function tryParseLocator(string, strict = false) { const match = strict ? string.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/) : string.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/); if (!match) return null; const [, scope, name, reference] = match; if (reference === `unknown`) throw new Error(`Invalid reference (${string})`); const realScope = typeof scope !== `undefined` ? scope : null; const realReference = typeof reference !== `undefined` ? reference : `unknown`; return makeLocator(makeIdent(realScope, name), realReference); } exports.tryParseLocator = tryParseLocator; /** * Parses a range into its constituents. Ranges typically follow these forms, * with both `protocol` and `bindings` being optionals: * * ::: * :#:: * * The selector is intended to "refine" the source, and is required. The source * itself is optional (for instance we don't need it for npm packages, but we * do for git dependencies). */ function parseRange(range, opts) { const match = range.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/); if (match === null) throw new Error(`Invalid range (${range})`); const protocol = typeof match[1] !== `undefined` ? match[1] : null; if (typeof (opts === null || opts === void 0 ? void 0 : opts.requireProtocol) === `string` && protocol !== opts.requireProtocol) throw new Error(`Invalid protocol (${protocol})`); else if ((opts === null || opts === void 0 ? void 0 : opts.requireProtocol) && protocol === null) throw new Error(`Missing protocol (${protocol})`); const source = typeof match[3] !== `undefined` ? decodeURIComponent(match[2]) : null; if ((opts === null || opts === void 0 ? void 0 : opts.requireSource) && source === null) throw new Error(`Missing source (${range})`); const rawSelector = typeof match[3] !== `undefined` ? decodeURIComponent(match[3]) : decodeURIComponent(match[2]); const selector = (opts === null || opts === void 0 ? void 0 : opts.parseSelector) ? querystring_1.default.parse(rawSelector) : rawSelector; const params = typeof match[4] !== `undefined` ? querystring_1.default.parse(match[4]) : null; return { // @ts-expect-error protocol, // @ts-expect-error source, // @ts-expect-error selector, // @ts-expect-error params, }; } exports.parseRange = parseRange; /** * File-style ranges are bound to a parent locators that we need in order to * resolve relative paths to the location of their parent packages. This * function wraps `parseRange` to automatically extract the parent locator * from the bindings and return it along with the selector. */ function parseFileStyleRange(range, { protocol }) { const { selector, params } = parseRange(range, { requireProtocol: protocol, requireBindings: true, }); if (typeof params.locator !== `string`) throw new Error(`Assertion failed: Invalid bindings for ${range}`); const parentLocator = parseLocator(params.locator, true); const path = selector; return { parentLocator, path }; } exports.parseFileStyleRange = parseFileStyleRange; function encodeUnsafeCharacters(str) { str = str.replace(/%/g, `%25`); str = str.replace(/:/g, `%3A`); str = str.replace(/#/g, `%23`); return str; } function hasParams(params) { if (params === null) return false; return Object.entries(params).length > 0; } /** * Turn the components returned by `parseRange` back into a string. Check * `parseRange` for more details. */ function makeRange({ protocol, source, selector, params }) { let range = ``; if (protocol !== null) range += `${protocol}`; if (source !== null) range += `${encodeUnsafeCharacters(source)}#`; range += encodeUnsafeCharacters(selector); if (hasParams(params)) range += `::${querystring_1.default.stringify(params)}`; return range; } exports.makeRange = makeRange; /** * Some bindings are internal-only and not meant to be displayed anywhere (for * instance that's the case with the parent locator bound to the `file:` ranges). * * this function strips them from a range. */ function convertToManifestRange(range) { const { params, protocol, source, selector } = parseRange(range); for (const name in params) if (name.startsWith(`__`)) delete params[name]; return makeRange({ protocol, source, params, selector }); } exports.convertToManifestRange = convertToManifestRange; /** * @deprecated Prefer using `stringifyIdent` */ function requirableIdent(ident) { if (ident.scope) { return `@${ident.scope}/${ident.name}`; } else { return `${ident.name}`; } } exports.requirableIdent = requirableIdent; /** * Returns a string from an ident (eg. `@types/lodash`). */ function stringifyIdent(ident) { if (ident.scope) { return `@${ident.scope}/${ident.name}`; } else { return `${ident.name}`; } } exports.stringifyIdent = stringifyIdent; /** * Returns a string from a descriptor (eg. `@types/lodash@^1.0.0`). */ function stringifyDescriptor(descriptor) { if (descriptor.scope) { return `@${descriptor.scope}/${descriptor.name}@${descriptor.range}`; } else { return `${descriptor.name}@${descriptor.range}`; } } exports.stringifyDescriptor = stringifyDescriptor; /** * Returns a string from a descriptor (eg. `@types/lodash@1.0.0`). */ function stringifyLocator(locator) { if (locator.scope) { return `@${locator.scope}/${locator.name}@${locator.reference}`; } else { return `${locator.name}@${locator.reference}`; } } exports.stringifyLocator = stringifyLocator; /** * Returns a string from an ident, formatted as a slug (eg. `@types-lodash`). */ function slugifyIdent(ident) { if (ident.scope !== null) { return `@${ident.scope}-${ident.name}`; } else { return ident.name; } } exports.slugifyIdent = slugifyIdent; /** * Returns a string from a locator, formatted as a slug (eg. `@types-lodash-npm-1.0.0-abcdef1234`). */ function slugifyLocator(locator) { const { protocol, selector } = parseRange(locator.reference); const humanProtocol = protocol !== null ? protocol.replace(/:$/, ``) : `exotic`; const humanVersion = semver_1.default.valid(selector); const humanReference = humanVersion !== null ? `${humanProtocol}-${humanVersion}` : `${humanProtocol}`; // 10 hex characters means that 47 different entries have 10^-9 chances of // causing a hash collision. Since this hash is joined with the package name // (making it highly unlikely you'll have more than a handful of instances // of any single package), this should provide a good enough guard in most // cases. // // Also note that eCryptfs eats some bytes, so the theoretical maximum for a // file size is around 140 bytes (but we don't need as much, as explained). const hashTruncate = 10; const slug = locator.scope ? `${slugifyIdent(locator)}-${humanReference}-${locator.locatorHash.slice(0, hashTruncate)}` : `${slugifyIdent(locator)}-${humanReference}-${locator.locatorHash.slice(0, hashTruncate)}`; return fslib_1.toFilename(slug); } exports.slugifyLocator = slugifyLocator; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param ident The ident to pretty print */ function prettyIdent(configuration, ident) { if (ident.scope) { return `${formatUtils.pretty(configuration, `@${ident.scope}/`, formatUtils.Type.SCOPE)}${formatUtils.pretty(configuration, ident.name, formatUtils.Type.NAME)}`; } else { return `${formatUtils.pretty(configuration, ident.name, formatUtils.Type.NAME)}`; } } exports.prettyIdent = prettyIdent; function prettyRangeNoColors(range) { if (range.startsWith(VIRTUAL_PROTOCOL)) { const nested = prettyRangeNoColors(range.substr(range.indexOf(`#`) + 1)); const abbrev = range.substr(VIRTUAL_PROTOCOL.length, VIRTUAL_ABBREVIATE); // I'm not satisfied of how the virtual packages appear in the output // eslint-disable-next-line no-constant-condition return false ? 0 : `${nested} [${abbrev}]`; } else { return range.replace(/\?.*/, `?[...]`); } } /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param ident The range to pretty print */ function prettyRange(configuration, range) { return `${formatUtils.pretty(configuration, prettyRangeNoColors(range), formatUtils.Type.RANGE)}`; } exports.prettyRange = prettyRange; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param descriptor The descriptor to pretty print */ function prettyDescriptor(configuration, descriptor) { return `${prettyIdent(configuration, descriptor)}${formatUtils.pretty(configuration, `@`, formatUtils.Type.RANGE)}${prettyRange(configuration, descriptor.range)}`; } exports.prettyDescriptor = prettyDescriptor; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param reference The reference to pretty print */ function prettyReference(configuration, reference) { return `${formatUtils.pretty(configuration, prettyRangeNoColors(reference), formatUtils.Type.REFERENCE)}`; } exports.prettyReference = prettyReference; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param locator The locator to pretty print */ function prettyLocator(configuration, locator) { return `${prettyIdent(configuration, locator)}${formatUtils.pretty(configuration, `@`, formatUtils.Type.REFERENCE)}${prettyReference(configuration, locator.reference)}`; } exports.prettyLocator = prettyLocator; /** * Returns a string that is suitable to be printed to stdout. It will never * be colored. * * @param locator The locator to pretty print */ function prettyLocatorNoColors(locator) { return `${stringifyIdent(locator)}@${prettyRangeNoColors(locator.reference)}`; } exports.prettyLocatorNoColors = prettyLocatorNoColors; /** * Sorts a list of descriptors, first by their idents then by their ranges. */ function sortDescriptors(descriptors) { return miscUtils.sortMap(descriptors, [ descriptor => stringifyIdent(descriptor), descriptor => descriptor.range, ]); } exports.sortDescriptors = sortDescriptors; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param workspace The workspace to pretty print */ function prettyWorkspace(configuration, workspace) { return prettyIdent(configuration, workspace.locator); } exports.prettyWorkspace = prettyWorkspace; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param descriptor The descriptor to pretty print * @param locator The locator is resolves to */ function prettyResolution(configuration, descriptor, locator) { const devirtualizedDescriptor = isVirtualDescriptor(descriptor) ? devirtualizeDescriptor(descriptor) : descriptor; if (locator === null) { return `${structUtils.prettyDescriptor(configuration, devirtualizedDescriptor)} → ${formatUtils.mark(configuration).Cross}`; } else if (devirtualizedDescriptor.identHash === locator.identHash) { return `${structUtils.prettyDescriptor(configuration, devirtualizedDescriptor)} → ${prettyReference(configuration, locator.reference)}`; } else { return `${structUtils.prettyDescriptor(configuration, devirtualizedDescriptor)} → ${prettyLocator(configuration, locator)}`; } } exports.prettyResolution = prettyResolution; /** * Returns a string that is suitable to be printed to stdout. Based on the * configuration it may include color sequences. * * @param configuration Reference configuration * @param locator The locator to pretty print * @param descriptor The descriptor that depends on it */ function prettyDependent(configuration, locator, descriptor) { if (descriptor === null) { return `${prettyLocator(configuration, locator)}`; } else { return `${prettyLocator(configuration, locator)} (via ${structUtils.prettyRange(configuration, descriptor.range)})`; } } exports.prettyDependent = prettyDependent; /** * The presence of a `node_modules` directory in the path is extremely common * in the JavaScript ecosystem to denote whether a path belongs to a vendor * or not. I considered using a more generic path for packages that aren't * always JS-only (such as when using the Git fetcher), but that unfortunately * caused various JS apps to start showing errors when working with git repos. * * As a result, all packages from all languages will follow this convention. At * least it'll be consistent, and linkers will always have the ability to remap * them to a different location if that's a critical requirement. */ function getIdentVendorPath(ident) { return `node_modules/${requirableIdent(ident)}`; } exports.getIdentVendorPath = getIdentVendorPath; /***/ }), /***/ 83607: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.extractArchiveTo = exports.convertToZip = exports.makeArchiveFromDirectory = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const libzip_1 = __webpack_require__(40364); const tar_stream_1 = tslib_1.__importDefault(__webpack_require__(53871)); const util_1 = __webpack_require__(31669); const zlib_1 = tslib_1.__importDefault(__webpack_require__(78761)); const gunzip = util_1.promisify(zlib_1.default.gunzip); async function makeArchiveFromDirectory(source, { baseFs = new fslib_1.NodeFS(), prefixPath = fslib_1.PortablePath.root, compressionLevel, inMemory = false } = {}) { const libzip = await libzip_1.getLibzipPromise(); let zipFs; if (inMemory) { zipFs = new fslib_1.ZipFS(null, { libzip, level: compressionLevel }); } else { const tmpFolder = await fslib_1.xfs.mktempPromise(); const tmpFile = fslib_1.ppath.join(tmpFolder, `archive.zip`); zipFs = new fslib_1.ZipFS(tmpFile, { create: true, libzip, level: compressionLevel }); } const target = fslib_1.ppath.resolve(fslib_1.PortablePath.root, prefixPath); await zipFs.copyPromise(target, source, { baseFs, stableTime: true, stableSort: true }); return zipFs; } exports.makeArchiveFromDirectory = makeArchiveFromDirectory; async function convertToZip(tgz, opts) { const tmpFolder = await fslib_1.xfs.mktempPromise(); const tmpFile = fslib_1.ppath.join(tmpFolder, `archive.zip`); const { compressionLevel, ...bufferOpts } = opts; return await extractArchiveTo(tgz, new fslib_1.ZipFS(tmpFile, { create: true, libzip: await libzip_1.getLibzipPromise(), level: compressionLevel }), bufferOpts); } exports.convertToZip = convertToZip; async function extractArchiveTo(tgz, targetFs, { stripComponents = 0, prefixPath = fslib_1.PortablePath.dot } = {}) { // 1980-01-01, like Fedora const defaultTime = 315532800; const parser = tar_stream_1.default.extract(); function ignore(entry) { // Disallow absolute paths; might be malicious (ex: /etc/passwd) if (entry.name[0] === `/`) return true; const parts = entry.name.split(/\//g); // We also ignore paths that could lead to escaping outside the archive if (parts.some((part) => part === `..`)) return true; if (parts.length <= stripComponents) return true; return false; } parser.on(`entry`, (header, stream, next) => { var _a, _b; if (ignore(header)) { next(); return; } const parts = fslib_1.ppath.normalize(fslib_1.npath.toPortablePath(header.name)).replace(/\/$/, ``).split(/\//g); if (parts.length <= stripComponents) { stream.resume(); next(); return; } const slicePath = parts.slice(stripComponents).join(`/`); const mappedPath = fslib_1.ppath.join(prefixPath, slicePath); let mode = 0o644; // If a single executable bit is set, normalize so that all are if (header.type === `directory` || (((_a = header.mode) !== null && _a !== void 0 ? _a : 0) & 0o111) !== 0) mode |= 0o111; switch (header.type) { case `directory`: { targetFs.mkdirpSync(fslib_1.ppath.dirname(mappedPath), { chmod: 0o755, utimes: [defaultTime, defaultTime] }); targetFs.mkdirSync(mappedPath); targetFs.chmodSync(mappedPath, mode); targetFs.utimesSync(mappedPath, defaultTime, defaultTime); next(); } break; case `file`: { targetFs.mkdirpSync(fslib_1.ppath.dirname(mappedPath), { chmod: 0o755, utimes: [defaultTime, defaultTime] }); const chunks = []; stream.on(`data`, (chunk) => chunks.push(chunk)); stream.on(`end`, () => { targetFs.writeFileSync(mappedPath, Buffer.concat(chunks)); targetFs.chmodSync(mappedPath, mode); targetFs.utimesSync(mappedPath, defaultTime, defaultTime); next(); }); } break; case `symlink`: { targetFs.mkdirpSync(fslib_1.ppath.dirname(mappedPath), { chmod: 0o755, utimes: [defaultTime, defaultTime] }); targetFs.symlinkSync(header.linkname, mappedPath); (_b = targetFs.lutimesSync) === null || _b === void 0 ? void 0 : _b.call(targetFs, mappedPath, defaultTime, defaultTime); next(); } break; default: { stream.resume(); next(); } } }); const gunzipped = await gunzip(tgz); return await new Promise((resolve, reject) => { parser.on(`error`, (error) => { reject(error); }); parser.on(`finish`, () => { resolve(targetFs); }); parser.end(gunzipped); }); } exports.extractArchiveTo = extractArchiveTo; /***/ }), /***/ 55024: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.emitTree = exports.emitList = exports.treeNodeToJson = exports.treeNodeToTreeify = void 0; const tslib_1 = __webpack_require__(70655); const treeify_1 = __webpack_require__(99269); const formatUtils = tslib_1.__importStar(__webpack_require__(23821)); function treeNodeToTreeify(printTree, { configuration }) { const target = {}; const copyTree = (printNode, targetNode) => { const iterator = Array.isArray(printNode) ? printNode.entries() : Object.entries(printNode); for (const [key, { label, value, children }] of iterator) { const finalParts = []; if (typeof label !== `undefined`) finalParts.push(formatUtils.applyStyle(configuration, label, formatUtils.Style.BOLD)); if (typeof value !== `undefined`) finalParts.push(formatUtils.pretty(configuration, value[0], value[1])); if (finalParts.length === 0) finalParts.push(formatUtils.applyStyle(configuration, `${key}`, formatUtils.Style.BOLD)); const finalLabel = finalParts.join(`: `); const createdNode = targetNode[finalLabel] = {}; if (typeof children !== `undefined`) { copyTree(children, createdNode); } } }; if (typeof printTree.children === `undefined`) throw new Error(`The root node must only contain children`); copyTree(printTree.children, target); return target; } exports.treeNodeToTreeify = treeNodeToTreeify; function treeNodeToJson(printTree) { const copyTree = (printNode) => { var _a; if (typeof printNode.children === `undefined`) { if (typeof printNode.value === `undefined`) throw new Error(`Assertion failed: Expected a value to be set if the children are missing`); return formatUtils.json(printNode.value[0], printNode.value[1]); } const iterator = Array.isArray(printNode.children) ? printNode.children.entries() : Object.entries((_a = printNode.children) !== null && _a !== void 0 ? _a : {}); const targetChildren = Array.isArray(printNode.children) ? [] : {}; for (const [key, child] of iterator) targetChildren[key] = copyTree(child); if (typeof printNode.value === `undefined`) return targetChildren; return { value: formatUtils.json(printNode.value[0], printNode.value[1]), children: targetChildren, }; }; return copyTree(printTree); } exports.treeNodeToJson = treeNodeToJson; function emitList(values, { configuration, stdout, json }) { const children = values.map(value => ({ value })); emitTree({ children }, { configuration, stdout, json }); } exports.emitList = emitList; function emitTree(tree, { configuration, stdout, json, separators = 0 }) { var _a; if (json) { const iterator = Array.isArray(tree.children) ? tree.children.values() : Object.values((_a = tree.children) !== null && _a !== void 0 ? _a : {}); for (const child of iterator) stdout.write(`${JSON.stringify(treeNodeToJson(child))}\n`); return; } let treeOutput = treeify_1.asTree(treeNodeToTreeify(tree, { configuration }), false, false); // A slight hack to add line returns between two top-level entries if (separators >= 1) treeOutput = treeOutput.replace(/^([├└]─)/gm, `│\n$1`).replace(/^│\n/, ``); // Another one for the second level fields. We run it twice because in some pathological cases the regex matches would if (separators >= 2) for (let t = 0; t < 2; ++t) treeOutput = treeOutput.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm, `$1$3 │\n$2`).replace(/^│\n/, ``); if (separators >= 3) throw new Error(`Only the first two levels are accepted by treeUtils.emitTree`); stdout.write(treeOutput); } exports.emitTree = emitTree; /***/ }), /***/ 79588: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PackageExtensionStatus = exports.PackageExtensionType = exports.LinkType = void 0; /** * Describes in which capacity the linkers can manipulate the package sources. */ var LinkType; (function (LinkType) { /** * The package manager owns the location (typically things within the cache) * and can transform it at will (for instance the PnP linker may decide to * unplug those packages). */ LinkType["HARD"] = "HARD"; /** * The package manager doesn't own the location (symlinks, workspaces, etc), * so the linkers aren't allowed to do anything with them except use them as * they are. */ LinkType["SOFT"] = "SOFT"; })(LinkType = exports.LinkType || (exports.LinkType = {})); var PackageExtensionType; (function (PackageExtensionType) { PackageExtensionType["Dependency"] = "Dependency"; PackageExtensionType["PeerDependency"] = "PeerDependency"; PackageExtensionType["PeerDependencyMeta"] = "PeerDependencyMeta"; })(PackageExtensionType = exports.PackageExtensionType || (exports.PackageExtensionType = {})); var PackageExtensionStatus; (function (PackageExtensionStatus) { PackageExtensionStatus["Inactive"] = "inactive"; PackageExtensionStatus["Redundant"] = "redundant"; PackageExtensionStatus["Active"] = "active"; })(PackageExtensionStatus = exports.PackageExtensionStatus || (exports.PackageExtensionStatus = {})); /***/ }), /***/ 14843: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* module decorator */ module = __webpack_require__.nmd(module); const wrapAnsi16 = (fn, offset) => (...args) => { const code = fn(...args); return `\u001B[${code + offset}m`; }; const wrapAnsi256 = (fn, offset) => (...args) => { const code = fn(...args); return `\u001B[${38 + offset};5;${code}m`; }; const wrapAnsi16m = (fn, offset) => (...args) => { const rgb = fn(...args); return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; }; const ansi2ansi = n => n; const rgb2rgb = (r, g, b) => [r, g, b]; const setLazyProperty = (object, property, get) => { Object.defineProperty(object, property, { get: () => { const value = get(); Object.defineProperty(object, property, { value, enumerable: true, configurable: true }); return value; }, enumerable: true, configurable: true }); }; /** @type {typeof import('color-convert')} */ let colorConvert; const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { if (colorConvert === undefined) { colorConvert = __webpack_require__(12581); } const offset = isBackground ? 10 : 0; const styles = {}; for (const [sourceSpace, suite] of Object.entries(colorConvert)) { const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; if (sourceSpace === targetSpace) { styles[name] = wrap(identity, offset); } else if (typeof suite === 'object') { styles[name] = wrap(suite[targetSpace], offset); } } return styles; }; function assembleStyles() { const codes = new Map(); const styles = { modifier: { reset: [0, 0], // 21 isn't widely supported and 22 does the same thing bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], // Bright color blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], // Bright color bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; // Alias bright black as gray (and grey) styles.color.gray = styles.color.blackBright; styles.bgColor.bgGray = styles.bgColor.bgBlackBright; styles.color.grey = styles.color.blackBright; styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; for (const [groupName, group] of Object.entries(styles)) { for (const [styleName, style] of Object.entries(group)) { styles[styleName] = { open: `\u001B[${style[0]}m`, close: `\u001B[${style[1]}m` }; group[styleName] = styles[styleName]; codes.set(style[0], style[1]); } Object.defineProperty(styles, groupName, { value: group, enumerable: false }); } Object.defineProperty(styles, 'codes', { value: codes, enumerable: false }); styles.color.close = '\u001B[39m'; styles.bgColor.close = '\u001B[49m'; setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); return styles; } // Make the export immutable Object.defineProperty(module, 'exports', { enumerable: true, get: assembleStyles }); /***/ }), /***/ 35399: /***/ ((module) => { "use strict"; const preserveCamelCase = string => { let isLastCharLower = false; let isLastCharUpper = false; let isLastLastCharUpper = false; for (let i = 0; i < string.length; i++) { const character = string[i]; if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { string = string.slice(0, i) + '-' + string.slice(i); isLastCharLower = false; isLastLastCharUpper = isLastCharUpper; isLastCharUpper = true; i++; } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { string = string.slice(0, i - 1) + '-' + string.slice(i - 1); isLastLastCharUpper = isLastCharUpper; isLastCharUpper = false; isLastCharLower = true; } else { isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; isLastLastCharUpper = isLastCharUpper; isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; } } return string; }; const camelCase = (input, options) => { if (!(typeof input === 'string' || Array.isArray(input))) { throw new TypeError('Expected the input to be `string | string[]`'); } options = Object.assign({ pascalCase: false }, options); const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; if (Array.isArray(input)) { input = input.map(x => x.trim()) .filter(x => x.length) .join('-'); } else { input = input.trim(); } if (input.length === 0) { return ''; } if (input.length === 1) { return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); } const hasUpperCase = input !== input.toLowerCase(); if (hasUpperCase) { input = preserveCamelCase(input); } input = input .replace(/^[_.\- ]+/, '') .toLowerCase() .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) .replace(/\d+(\w|$)/g, m => m.toUpperCase()); return postProcess(input); }; module.exports = camelCase; // TODO: Remove this for the next major release module.exports.default = camelCase; /***/ }), /***/ 59084: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const ansiStyles = __webpack_require__(14843); const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(58597); const { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = __webpack_require__(6353); // `supportsColor.level` → `ansiStyles.color[name]` mapping const levelMapping = [ 'ansi', 'ansi', 'ansi256', 'ansi16m' ]; const styles = Object.create(null); const applyOptions = (object, options = {}) => { if (options.level > 3 || options.level < 0) { throw new Error('The `level` option should be an integer from 0 to 3'); } // Detect level if not set manually const colorLevel = stdoutColor ? stdoutColor.level : 0; object.level = options.level === undefined ? colorLevel : options.level; }; class ChalkClass { constructor(options) { return chalkFactory(options); } } const chalkFactory = options => { const chalk = {}; applyOptions(chalk, options); chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_); Object.setPrototypeOf(chalk, Chalk.prototype); Object.setPrototypeOf(chalk.template, chalk); chalk.template.constructor = () => { throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.'); }; chalk.template.Instance = ChalkClass; return chalk.template; }; function Chalk(options) { return chalkFactory(options); } for (const [styleName, style] of Object.entries(ansiStyles)) { styles[styleName] = { get() { const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); Object.defineProperty(this, styleName, {value: builder}); return builder; } }; } styles.visible = { get() { const builder = createBuilder(this, this._styler, true); Object.defineProperty(this, 'visible', {value: builder}); return builder; } }; const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256']; for (const model of usedModels) { styles[model] = { get() { const {level} = this; return function (...arguments_) { const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); return createBuilder(this, styler, this._isEmpty); }; } }; } for (const model of usedModels) { const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); styles[bgModel] = { get() { const {level} = this; return function (...arguments_) { const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); return createBuilder(this, styler, this._isEmpty); }; } }; } const proto = Object.defineProperties(() => {}, { ...styles, level: { enumerable: true, get() { return this._generator.level; }, set(level) { this._generator.level = level; } } }); const createStyler = (open, close, parent) => { let openAll; let closeAll; if (parent === undefined) { openAll = open; closeAll = close; } else { openAll = parent.openAll + open; closeAll = close + parent.closeAll; } return { open, close, openAll, closeAll, parent }; }; const createBuilder = (self, _styler, _isEmpty) => { const builder = (...arguments_) => { // Single argument is hot path, implicit coercion is faster than anything // eslint-disable-next-line no-implicit-coercion return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); }; // `__proto__` is used because we must return a function, but there is // no way to create a function with a different prototype builder.__proto__ = proto; // eslint-disable-line no-proto builder._generator = self; builder._styler = _styler; builder._isEmpty = _isEmpty; return builder; }; const applyStyle = (self, string) => { if (self.level <= 0 || !string) { return self._isEmpty ? '' : string; } let styler = self._styler; if (styler === undefined) { return string; } const {openAll, closeAll} = styler; if (string.indexOf('\u001B') !== -1) { while (styler !== undefined) { // Replace any instances already present with a re-opening code // otherwise only the part of the string until said closing code // will be colored, and the rest will simply be 'plain'. string = stringReplaceAll(string, styler.close, styler.open); styler = styler.parent; } } // We can move both next actions out of loop, because remaining actions in loop won't have // any/visible effect on parts we add here. Close the styling before a linebreak and reopen // after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92 const lfIndex = string.indexOf('\n'); if (lfIndex !== -1) { string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); } return openAll + string + closeAll; }; let template; const chalkTag = (chalk, ...strings) => { const [firstString] = strings; if (!Array.isArray(firstString)) { // If chalk() was called by itself or with a string, // return the string itself as a string. return strings.join(' '); } const arguments_ = strings.slice(1); const parts = [firstString.raw[0]]; for (let i = 1; i < firstString.length; i++) { parts.push( String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'), String(firstString.raw[i]) ); } if (template === undefined) { template = __webpack_require__(12754); } return template(chalk, parts.join('')); }; Object.defineProperties(Chalk.prototype, styles); const chalk = Chalk(); // eslint-disable-line new-cap chalk.supportsColor = stdoutColor; chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap chalk.stderr.supportsColor = stderrColor; // For TypeScript chalk.Level = { None: 0, Basic: 1, Ansi256: 2, TrueColor: 3, 0: 'None', 1: 'Basic', 2: 'Ansi256', 3: 'TrueColor' }; module.exports = chalk; /***/ }), /***/ 12754: /***/ ((module) => { "use strict"; const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi; const ESCAPES = new Map([ ['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007'] ]); function unescape(c) { const u = c[0] === 'u'; const bracket = c[1] === '{'; if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) { return String.fromCharCode(parseInt(c.slice(1), 16)); } if (u && bracket) { return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); } return ESCAPES.get(c) || c; } function parseArguments(name, arguments_) { const results = []; const chunks = arguments_.trim().split(/\s*,\s*/g); let matches; for (const chunk of chunks) { const number = Number(chunk); if (!Number.isNaN(number)) { results.push(number); } else if ((matches = chunk.match(STRING_REGEX))) { results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character)); } else { throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); } } return results; } function parseStyle(style) { STYLE_REGEX.lastIndex = 0; const results = []; let matches; while ((matches = STYLE_REGEX.exec(style)) !== null) { const name = matches[1]; if (matches[2]) { const args = parseArguments(name, matches[2]); results.push([name].concat(args)); } else { results.push([name]); } } return results; } function buildStyle(chalk, styles) { const enabled = {}; for (const layer of styles) { for (const style of layer.styles) { enabled[style[0]] = layer.inverse ? null : style.slice(1); } } let current = chalk; for (const [styleName, styles] of Object.entries(enabled)) { if (!Array.isArray(styles)) { continue; } if (!(styleName in current)) { throw new Error(`Unknown Chalk style: ${styleName}`); } current = styles.length > 0 ? current[styleName](...styles) : current[styleName]; } return current; } module.exports = (chalk, temporary) => { const styles = []; const chunks = []; let chunk = []; // eslint-disable-next-line max-params temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { if (escapeCharacter) { chunk.push(unescape(escapeCharacter)); } else if (style) { const string = chunk.join(''); chunk = []; chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); styles.push({inverse, styles: parseStyle(style)}); } else if (close) { if (styles.length === 0) { throw new Error('Found extraneous } in Chalk template literal'); } chunks.push(buildStyle(chalk, styles)(chunk.join(''))); chunk = []; styles.pop(); } else { chunk.push(character); } }); chunks.push(chunk.join('')); if (styles.length > 0) { const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; throw new Error(errMsg); } return chunks.join(''); }; /***/ }), /***/ 6353: /***/ ((module) => { "use strict"; const stringReplaceAll = (string, substring, replacer) => { let index = string.indexOf(substring); if (index === -1) { return string; } const substringLength = substring.length; let endIndex = 0; let returnValue = ''; do { returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; endIndex = index + substringLength; index = string.indexOf(substring, endIndex); } while (index !== -1); returnValue += string.substr(endIndex); return returnValue; }; const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { let endIndex = 0; let returnValue = ''; do { const gotCR = string[index - 1] === '\r'; returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix; endIndex = index + 1; index = string.indexOf('\n', endIndex); } while (index !== -1); returnValue += string.substr(endIndex); return returnValue; }; module.exports = { stringReplaceAll, stringEncaseCRLFWithFirstIndex }; /***/ }), /***/ 8288: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var vendors = __webpack_require__(58243) var env = process.env // Used for testing only Object.defineProperty(exports, "_vendors", ({ value: vendors.map(function (v) { return v.constant }) })) exports.name = null exports.isPR = null vendors.forEach(function (vendor) { var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env] var isCI = envs.every(function (obj) { return checkEnv(obj) }) exports[vendor.constant] = isCI if (isCI) { exports.name = vendor.name switch (typeof vendor.pr) { case 'string': // "pr": "CIRRUS_PR" exports.isPR = !!env[vendor.pr] break case 'object': if ('env' in vendor.pr) { // "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" } exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne } else if ('any' in vendor.pr) { // "pr": { "any": ["ghprbPullId", "CHANGE_ID"] } exports.isPR = vendor.pr.any.some(function (key) { return !!env[key] }) } else { // "pr": { "DRONE_BUILD_EVENT": "pull_request" } exports.isPR = checkEnv(vendor.pr) } break default: // PR detection not supported for this vendor exports.isPR = null } } }) exports.isCI = !!( env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI env.BUILD_NUMBER || // Jenkins, TeamCity env.RUN_ID || // TaskCluster, dsari exports.name || false ) function checkEnv (obj) { if (typeof obj === 'string') return !!env[obj] return Object.keys(obj).every(function (k) { return env[k] === obj[k] }) } /***/ }), /***/ 24110: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* MIT license */ /* eslint-disable no-mixed-operators */ const cssKeywords = __webpack_require__(24646); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). // do not use box values types (i.e. Number(), String(), etc.) const reverseKeywords = {}; for (const key of Object.keys(cssKeywords)) { reverseKeywords[cssKeywords[key]] = key; } const convert = { rgb: {channels: 3, labels: 'rgb'}, hsl: {channels: 3, labels: 'hsl'}, hsv: {channels: 3, labels: 'hsv'}, hwb: {channels: 3, labels: 'hwb'}, cmyk: {channels: 4, labels: 'cmyk'}, xyz: {channels: 3, labels: 'xyz'}, lab: {channels: 3, labels: 'lab'}, lch: {channels: 3, labels: 'lch'}, hex: {channels: 1, labels: ['hex']}, keyword: {channels: 1, labels: ['keyword']}, ansi16: {channels: 1, labels: ['ansi16']}, ansi256: {channels: 1, labels: ['ansi256']}, hcg: {channels: 3, labels: ['h', 'c', 'g']}, apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, gray: {channels: 1, labels: ['gray']} }; module.exports = convert; // Hide .channels and .labels properties for (const model of Object.keys(convert)) { if (!('channels' in convert[model])) { throw new Error('missing channels property: ' + model); } if (!('labels' in convert[model])) { throw new Error('missing channel labels property: ' + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error('channel and label counts mismatch: ' + model); } const {channels, labels} = convert[model]; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], 'channels', {value: channels}); Object.defineProperty(convert[model], 'labels', {value: labels}); } convert.rgb.hsl = function (rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const min = Math.min(r, g, b); const max = Math.max(r, g, b); const delta = max - min; let h; let s; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } const l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function (rgb) { let rdif; let gdif; let bdif; let h; let s; const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const v = Math.max(r, g, b); const diff = v - Math.min(r, g, b); const diffc = function (c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = 0; s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = (1 / 3) + rdif - bdif; } else if (b === v) { h = (2 / 3) + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function (rgb) { const r = rgb[0]; const g = rgb[1]; let b = rgb[2]; const h = convert.rgb.hsl(rgb)[0]; const w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function (rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const k = Math.min(1 - r, 1 - g, 1 - b); const c = (1 - r - k) / (1 - k) || 0; const m = (1 - g - k) / (1 - k) || 0; const y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; function comparativeDistance(x, y) { /* See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance */ return ( ((x[0] - y[0]) ** 2) + ((x[1] - y[1]) ** 2) + ((x[2] - y[2]) ** 2) ); } convert.rgb.keyword = function (rgb) { const reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } let currentClosestDistance = Infinity; let currentClosestKeyword; for (const keyword of Object.keys(cssKeywords)) { const value = cssKeywords[keyword]; // Compute comparative distance const distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } return currentClosestKeyword; }; convert.keyword.rgb = function (keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function (rgb) { let r = rgb[0] / 255; let g = rgb[1] / 255; let b = rgb[2] / 255; // Assume sRGB r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function (rgb) { const xyz = convert.rgb.xyz(rgb); let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); const l = (116 * y) - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function (hsl) { const h = hsl[0] / 360; const s = hsl[1] / 100; const l = hsl[2] / 100; let t2; let t3; let val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } const t1 = 2 * l - t2; const rgb = [0, 0, 0]; for (let i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function (hsl) { const h = hsl[0]; let s = hsl[1] / 100; let l = hsl[2] / 100; let smin = s; const lmin = Math.max(l, 0.01); l *= 2; s *= (l <= 1) ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; const v = (l + s) / 2; const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function (hsv) { const h = hsv[0] / 60; const s = hsv[1] / 100; let v = hsv[2] / 100; const hi = Math.floor(h) % 6; const f = h - Math.floor(h); const p = 255 * v * (1 - s); const q = 255 * v * (1 - (s * f)); const t = 255 * v * (1 - (s * (1 - f))); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function (hsv) { const h = hsv[0]; const s = hsv[1] / 100; const v = hsv[2] / 100; const vmin = Math.max(v, 0.01); let sl; let l; l = (2 - s) * v; const lmin = (2 - s) * vmin; sl = s * vmin; sl /= (lmin <= 1) ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb convert.hwb.rgb = function (hwb) { const h = hwb[0] / 360; let wh = hwb[1] / 100; let bl = hwb[2] / 100; const ratio = wh + bl; let f; // Wh + bl cant be > 1 if (ratio > 1) { wh /= ratio; bl /= ratio; } const i = Math.floor(6 * h); const v = 1 - bl; f = 6 * h - i; if ((i & 0x01) !== 0) { f = 1 - f; } const n = wh + f * (v - wh); // Linear interpolation let r; let g; let b; /* eslint-disable max-statements-per-line,no-multi-spaces */ switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } /* eslint-enable max-statements-per-line,no-multi-spaces */ return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function (cmyk) { const c = cmyk[0] / 100; const m = cmyk[1] / 100; const y = cmyk[2] / 100; const k = cmyk[3] / 100; const r = 1 - Math.min(1, c * (1 - k) + k); const g = 1 - Math.min(1, m * (1 - k) + k); const b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function (xyz) { const x = xyz[0] / 100; const y = xyz[1] / 100; const z = xyz[2] / 100; let r; let g; let b; r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); // Assume sRGB r = r > 0.0031308 ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) : r * 12.92; g = g > 0.0031308 ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) : g * 12.92; b = b > 0.0031308 ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function (xyz) { let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); const l = (116 * y) - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function (lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let x; let y; let z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; const y2 = y ** 3; const x2 = x ** 3; const z2 = z ** 3; y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function (lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let h; const hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } const c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function (lch) { const l = lch[0]; const c = lch[1]; const h = lch[2]; const hr = h / 360 * 2 * Math.PI; const a = c * Math.cos(hr); const b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function (args, saturation = null) { const [r, g, b] = args; let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization value = Math.round(value / 50); if (value === 0) { return 30; } let ansi = 30 + ((Math.round(b / 255) << 2) | (Math.round(g / 255) << 1) | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function (args) { // Optimization here; we already know the value and don't need to get // it converted for us. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function (args) { const r = args[0]; const g = args[1]; const b = args[2]; // We use the extended greyscale palette here, with the exception of // black and white. normal palette only has 4 greyscale shades. if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round(((r - 8) / 247) * 24) + 232; } const ansi = 16 + (36 * Math.round(r / 255 * 5)) + (6 * Math.round(g / 255 * 5)) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function (args) { let color = args % 10; // Handle greyscale if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } const mult = (~~(args > 50) + 1) * 0.5; const r = ((color & 1) * mult) * 255; const g = (((color >> 1) & 1) * mult) * 255; const b = (((color >> 2) & 1) * mult) * 255; return [r, g, b]; }; convert.ansi256.rgb = function (args) { // Handle greyscale if (args >= 232) { const c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; let rem; const r = Math.floor(args / 36) / 5 * 255; const g = Math.floor((rem = args % 36) / 6) / 5 * 255; const b = (rem % 6) / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function (args) { const integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); const string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.hex.rgb = function (args) { const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } let colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split('').map(char => { return char + char; }).join(''); } const integer = parseInt(colorString, 16); const r = (integer >> 16) & 0xFF; const g = (integer >> 8) & 0xFF; const b = integer & 0xFF; return [r, g, b]; }; convert.rgb.hcg = function (rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const max = Math.max(Math.max(r, g), b); const min = Math.min(Math.min(r, g), b); const chroma = (max - min); let grayscale; let hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = ((g - b) / chroma) % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function (hsl) { const s = hsl[1] / 100; const l = hsl[2] / 100; const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); let f = 0; if (c < 1.0) { f = (l - 0.5 * c) / (1.0 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function (hsv) { const s = hsv[1] / 100; const v = hsv[2] / 100; const c = s * v; let f = 0; if (c < 1.0) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function (hcg) { const h = hcg[0] / 360; const c = hcg[1] / 100; const g = hcg[2] / 100; if (c === 0.0) { return [g * 255, g * 255, g * 255]; } const pure = [0, 0, 0]; const hi = (h % 1) * 6; const v = hi % 1; const w = 1 - v; let mg = 0; /* eslint-disable max-statements-per-line */ switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } /* eslint-enable max-statements-per-line */ mg = (1.0 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function (hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1.0 - c); let f = 0; if (v > 0.0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function (hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const l = g * (1.0 - c) + 0.5 * c; let s = 0; if (l > 0.0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1.0) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function (hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1.0 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function (hwb) { const w = hwb[1] / 100; const b = hwb[2] / 100; const v = 1 - b; const c = v - w; let g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function (apple) { return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; }; convert.rgb.apple = function (rgb) { return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; }; convert.gray.rgb = function (args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = function (args) { return [0, 0, args[0]]; }; convert.gray.hsv = convert.gray.hsl; convert.gray.hwb = function (gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function (gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function (gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function (gray) { const val = Math.round(gray[0] / 100 * 255) & 0xFF; const integer = (val << 16) + (val << 8) + val; const string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.rgb.gray = function (rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; /***/ }), /***/ 12581: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const conversions = __webpack_require__(24110); const route = __webpack_require__(7571); const convert = {}; const models = Object.keys(conversions); function wrapRaw(fn) { const wrappedFn = function (...args) { const arg0 = args[0]; if (arg0 === undefined || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } return fn(args); }; // Preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { const wrappedFn = function (...args) { const arg0 = args[0]; if (arg0 === undefined || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } const result = fn(args); // We're assuming the result is an array here. // see notice in conversions.js; don't use box types // in conversion functions. if (typeof result === 'object') { for (let len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; // Preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(fromModel => { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); const routes = route(fromModel); const routeModels = Object.keys(routes); routeModels.forEach(toModel => { const fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module.exports = convert; /***/ }), /***/ 7571: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const conversions = __webpack_require__(24110); /* This function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included. */ function buildGraph() { const graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 const models = Object.keys(conversions); for (let len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } // https://en.wikipedia.org/wiki/Breadth-first_search function deriveBFS(fromModel) { const graph = buildGraph(); const queue = [fromModel]; // Unshift -> queue -> pop graph[fromModel].distance = 0; while (queue.length) { const current = queue.pop(); const adjacents = Object.keys(conversions[current]); for (let len = adjacents.length, i = 0; i < len; i++) { const adjacent = adjacents[i]; const node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function (args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { const path = [graph[toModel].parent, toModel]; let fn = conversions[graph[toModel].parent][toModel]; let cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module.exports = function (fromModel) { const graph = deriveBFS(fromModel); const conversion = {}; const models = Object.keys(graph); for (let len = models.length, i = 0; i < len; i++) { const toModel = models[i]; const node = graph[toModel]; if (node.parent === null) { // No possible conversion, or this node is the source model. continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; /***/ }), /***/ 24646: /***/ ((module) => { "use strict"; module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; /***/ }), /***/ 19789: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const cp = __webpack_require__(63129); const parse = __webpack_require__(71324); const enoent = __webpack_require__(94059); function spawn(command, args, options) { // Parse the arguments const parsed = parse(command, args, options); // Spawn the child process const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); // Hook into child process "exit" event to emit an error if the command // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 enoent.hookChildProcess(spawned, parsed); return spawned; } function spawnSync(command, args, options) { // Parse the arguments const parsed = parse(command, args, options); // Spawn the child process const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); return result; } module.exports = spawn; module.exports.spawn = spawn; module.exports.sync = spawnSync; module.exports._parse = parse; module.exports._enoent = enoent; /***/ }), /***/ 94059: /***/ ((module) => { "use strict"; const isWin = process.platform === 'win32'; function notFoundError(original, syscall) { return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { code: 'ENOENT', errno: 'ENOENT', syscall: `${syscall} ${original.command}`, path: original.command, spawnargs: original.args, }); } function hookChildProcess(cp, parsed) { if (!isWin) { return; } const originalEmit = cp.emit; cp.emit = function (name, arg1) { // If emitting "exit" event and exit code is 1, we need to check if // the command exists and emit an "error" instead // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 if (name === 'exit') { const err = verifyENOENT(arg1, parsed, 'spawn'); if (err) { return originalEmit.call(cp, 'error', err); } } return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params }; } function verifyENOENT(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawn'); } return null; } function verifyENOENTSync(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawnSync'); } return null; } module.exports = { hookChildProcess, verifyENOENT, verifyENOENTSync, notFoundError, }; /***/ }), /***/ 71324: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const resolveCommand = __webpack_require__(75282); const escape = __webpack_require__(82152); const readShebang = __webpack_require__(72890); const isWin = process.platform === 'win32'; const isExecutableRegExp = /\.(?:com|exe)$/i; const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; function detectShebang(parsed) { parsed.file = resolveCommand(parsed); const shebang = parsed.file && readShebang(parsed.file); if (shebang) { parsed.args.unshift(parsed.file); parsed.command = shebang; return resolveCommand(parsed); } return parsed.file; } function parseNonShell(parsed) { if (!isWin) { return parsed; } // Detect & add support for shebangs const commandFile = detectShebang(parsed); // We don't need a shell if the command filename is an executable const needsShell = !isExecutableRegExp.test(commandFile); // If a shell is required, use cmd.exe and take care of escaping everything correctly // Note that `forceShell` is an hidden option used only in tests if (parsed.options.forceShell || needsShell) { // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, // we need to double escape them const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) // This is necessary otherwise it will always fail with ENOENT in those cases parsed.command = path.normalize(parsed.command); // Escape command & arguments parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(' '); parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; parsed.command = process.env.comspec || 'cmd.exe'; parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped } return parsed; } function parse(command, args, options) { // Normalize arguments, similar to nodejs if (args && !Array.isArray(args)) { options = args; args = null; } args = args ? args.slice(0) : []; // Clone array to avoid changing the original options = Object.assign({}, options); // Clone object to avoid changing the original // Build our parsed object const parsed = { command, args, options, file: undefined, original: { command, args, }, }; // Delegate further parsing to shell or non-shell return options.shell ? parsed : parseNonShell(parsed); } module.exports = parse; /***/ }), /***/ 82152: /***/ ((module) => { "use strict"; // See http://www.robvanderwoude.com/escapechars.php const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; function escapeCommand(arg) { // Escape meta chars arg = arg.replace(metaCharsRegExp, '^$1'); return arg; } function escapeArgument(arg, doubleEscapeMetaChars) { // Convert to string arg = `${arg}`; // Algorithm below is based on https://qntm.org/cmd // Sequence of backslashes followed by a double quote: // double up all the backslashes and escape the double quote arg = arg.replace(/(\\*)"/g, '$1$1\\"'); // Sequence of backslashes followed by the end of the string // (which will become a double quote later): // double up all the backslashes arg = arg.replace(/(\\*)$/, '$1$1'); // All other backslashes occur literally // Quote the whole thing: arg = `"${arg}"`; // Escape meta chars arg = arg.replace(metaCharsRegExp, '^$1'); // Double escape meta chars if necessary if (doubleEscapeMetaChars) { arg = arg.replace(metaCharsRegExp, '^$1'); } return arg; } module.exports.command = escapeCommand; module.exports.argument = escapeArgument; /***/ }), /***/ 72890: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const shebangCommand = __webpack_require__(32975); function readShebang(command) { // Read the first 150 bytes from the file const size = 150; const buffer = Buffer.alloc(size); let fd; try { fd = fs.openSync(command, 'r'); fs.readSync(fd, buffer, 0, size, 0); fs.closeSync(fd); } catch (e) { /* Empty */ } // Attempt to extract shebang (null is returned if not a shebang) return shebangCommand(buffer.toString()); } module.exports = readShebang; /***/ }), /***/ 75282: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const which = __webpack_require__(87485); const getPathKey = __webpack_require__(76054); function resolveCommandAttempt(parsed, withoutPathExt) { const env = parsed.options.env || process.env; const cwd = process.cwd(); const hasCustomCwd = parsed.options.cwd != null; // Worker threads do not have process.chdir() const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; // If a custom `cwd` was specified, we need to change the process cwd // because `which` will do stat calls but does not support a custom cwd if (shouldSwitchCwd) { try { process.chdir(parsed.options.cwd); } catch (err) { /* Empty */ } } let resolved; try { resolved = which.sync(parsed.command, { path: env[getPathKey({ env })], pathExt: withoutPathExt ? path.delimiter : undefined, }); } catch (e) { /* Empty */ } finally { if (shouldSwitchCwd) { process.chdir(cwd); } } // If we successfully resolved, ensure that an absolute path is returned // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it if (resolved) { resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); } return resolved; } function resolveCommand(parsed) { return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); } module.exports = resolveCommand; /***/ }), /***/ 91966: /***/ ((module) => { "use strict"; module.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf('--'); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; /***/ }), /***/ 78933: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // A linked list to keep track of recently-used-ness const Yallist = __webpack_require__(30543) const MAX = Symbol('max') const LENGTH = Symbol('length') const LENGTH_CALCULATOR = Symbol('lengthCalculator') const ALLOW_STALE = Symbol('allowStale') const MAX_AGE = Symbol('maxAge') const DISPOSE = Symbol('dispose') const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') const LRU_LIST = Symbol('lruList') const CACHE = Symbol('cache') const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') const naiveLength = () => 1 // lruList is a yallist where the head is the youngest // item, and the tail is the oldest. the list contains the Hit // objects as the entries. // Each Hit object has a reference to its Yallist.Node. This // never changes. // // cache is a Map (or PseudoMap) that matches the keys to // the Yallist.Node object. class LRUCache { constructor (options) { if (typeof options === 'number') options = { max: options } if (!options) options = {} if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number') // Kind of weird to have a default max of Infinity, but oh well. const max = this[MAX] = options.max || Infinity const lc = options.length || naiveLength this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc this[ALLOW_STALE] = options.stale || false if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number') this[MAX_AGE] = options.maxAge || 0 this[DISPOSE] = options.dispose this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false this.reset() } // resize the cache when the max changes. set max (mL) { if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number') this[MAX] = mL || Infinity trim(this) } get max () { return this[MAX] } set allowStale (allowStale) { this[ALLOW_STALE] = !!allowStale } get allowStale () { return this[ALLOW_STALE] } set maxAge (mA) { if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number') this[MAX_AGE] = mA trim(this) } get maxAge () { return this[MAX_AGE] } // resize the cache when the lengthCalculator changes. set lengthCalculator (lC) { if (typeof lC !== 'function') lC = naiveLength if (lC !== this[LENGTH_CALCULATOR]) { this[LENGTH_CALCULATOR] = lC this[LENGTH] = 0 this[LRU_LIST].forEach(hit => { hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) this[LENGTH] += hit.length }) } trim(this) } get lengthCalculator () { return this[LENGTH_CALCULATOR] } get length () { return this[LENGTH] } get itemCount () { return this[LRU_LIST].length } rforEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].tail; walker !== null;) { const prev = walker.prev forEachStep(this, fn, walker, thisp) walker = prev } } forEach (fn, thisp) { thisp = thisp || this for (let walker = this[LRU_LIST].head; walker !== null;) { const next = walker.next forEachStep(this, fn, walker, thisp) walker = next } } keys () { return this[LRU_LIST].toArray().map(k => k.key) } values () { return this[LRU_LIST].toArray().map(k => k.value) } reset () { if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) } this[CACHE] = new Map() // hash of items by key this[LRU_LIST] = new Yallist() // list of items in order of use recency this[LENGTH] = 0 // length of items in the list } dump () { return this[LRU_LIST].map(hit => isStale(this, hit) ? false : { k: hit.key, v: hit.value, e: hit.now + (hit.maxAge || 0) }).toArray().filter(h => h) } dumpLru () { return this[LRU_LIST] } set (key, value, maxAge) { maxAge = maxAge || this[MAX_AGE] if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number') const now = maxAge ? Date.now() : 0 const len = this[LENGTH_CALCULATOR](value, key) if (this[CACHE].has(key)) { if (len > this[MAX]) { del(this, this[CACHE].get(key)) return false } const node = this[CACHE].get(key) const item = node.value // dispose of the old one before overwriting // split out into 2 ifs for better coverage tracking if (this[DISPOSE]) { if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value) } item.now = now item.maxAge = maxAge item.value = value this[LENGTH] += len - item.length item.length = len this.get(key) trim(this) return true } const hit = new Entry(key, value, len, now, maxAge) // oversized objects fall out of cache automatically. if (hit.length > this[MAX]) { if (this[DISPOSE]) this[DISPOSE](key, value) return false } this[LENGTH] += hit.length this[LRU_LIST].unshift(hit) this[CACHE].set(key, this[LRU_LIST].head) trim(this) return true } has (key) { if (!this[CACHE].has(key)) return false const hit = this[CACHE].get(key).value return !isStale(this, hit) } get (key) { return get(this, key, true) } peek (key) { return get(this, key, false) } pop () { const node = this[LRU_LIST].tail if (!node) return null del(this, node) return node.value } del (key) { del(this, this[CACHE].get(key)) } load (arr) { // reset the cache this.reset() const now = Date.now() // A previous serialized cache has the most recent items first for (let l = arr.length - 1; l >= 0; l--) { const hit = arr[l] const expiresAt = hit.e || 0 if (expiresAt === 0) // the item was created without expiration in a non aged cache this.set(hit.k, hit.v) else { const maxAge = expiresAt - now // dont add already expired items if (maxAge > 0) { this.set(hit.k, hit.v, maxAge) } } } } prune () { this[CACHE].forEach((value, key) => get(this, key, false)) } } const get = (self, key, doUse) => { const node = self[CACHE].get(key) if (node) { const hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) return undefined } else { if (doUse) { if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now() self[LRU_LIST].unshiftNode(node) } } return hit.value } } const isStale = (self, hit) => { if (!hit || (!hit.maxAge && !self[MAX_AGE])) return false const diff = Date.now() - hit.now return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && (diff > self[MAX_AGE]) } const trim = self => { if (self[LENGTH] > self[MAX]) { for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { // We know that we're about to delete this one, and also // what the next least recently used key will be, so just // go ahead and set it now. const prev = walker.prev del(self, walker) walker = prev } } } const del = (self, node) => { if (node) { const hit = node.value if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value) self[LENGTH] -= hit.length self[CACHE].delete(hit.key) self[LRU_LIST].removeNode(node) } } class Entry { constructor (key, value, length, now, maxAge) { this.key = key this.value = value this.length = length this.now = now this.maxAge = maxAge || 0 } } const forEachStep = (self, fn, node, thisp) => { let hit = node.value if (isStale(self, hit)) { del(self, node) if (!self[ALLOW_STALE]) hit = undefined } if (hit) fn.call(thisp, hit.value, hit.key, self) } module.exports = LRUCache /***/ }), /***/ 94498: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const pTry = __webpack_require__(89161); const pLimit = concurrency => { if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); } const queue = []; let activeCount = 0; const next = () => { activeCount--; if (queue.length > 0) { queue.shift()(); } }; const run = (fn, resolve, ...args) => { activeCount++; const result = pTry(fn, ...args); resolve(result); result.then(next, next); }; const enqueue = (fn, resolve, ...args) => { if (activeCount < concurrency) { run(fn, resolve, ...args); } else { queue.push(run.bind(null, fn, resolve, ...args)); } }; const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); Object.defineProperties(generator, { activeCount: { get: () => activeCount }, pendingCount: { get: () => queue.length }, clearQueue: { value: () => { queue.length = 0; } } }); return generator; }; module.exports = pLimit; module.exports.default = pLimit; /***/ }), /***/ 76054: /***/ ((module) => { "use strict"; const pathKey = (options = {}) => { const environment = options.env || process.env; const platform = options.platform || process.platform; if (platform !== 'win32') { return 'PATH'; } return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; }; module.exports = pathKey; // TODO: Remove this for the next major release module.exports.default = pathKey; /***/ }), /***/ 88469: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const ANY = Symbol('SemVer ANY') // hoisted class for cyclic dependency class Comparator { static get ANY () { return ANY } constructor (comp, options) { options = parseOptions(options) if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp } else { comp = comp.value } } 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) } parse (comp) { const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] const m = comp.match(r) if (!m) { throw new TypeError(`Invalid comparator: ${comp}`) } this.operator = m[1] !== undefined ? 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) } } toString () { return this.value } test (version) { debug('Comparator.test', version, this.options.loose) if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } return cmp(version, this.operator, this.semver, this.options) } intersects (comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError('a Comparator is required') } if (!options || typeof options !== 'object') { options = { loose: !!options, includePrerelease: false } } if (this.operator === '') { if (this.value === '') { return true } return new Range(comp.value, options).test(this.value) } else if (comp.operator === '') { if (comp.value === '') { return true } return new Range(this.value, options).test(comp.semver) } const sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>') const sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<') const sameSemVer = this.semver.version === comp.semver.version const differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=') const oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<') const oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>') return ( sameDirectionIncreasing || sameDirectionDecreasing || (sameSemVer && differentDirectionsInclusive) || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan ) } } module.exports = Comparator const parseOptions = __webpack_require__(34360) const {re, t} = __webpack_require__(33698) const cmp = __webpack_require__(78196) const debug = __webpack_require__(26244) const SemVer = __webpack_require__(64342) const Range = __webpack_require__(17448) /***/ }), /***/ 17448: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // hoisted class for cyclic dependency class Range { constructor (range, options) { options = parseOptions(options) 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) { // just put it in the set and return this.raw = range.value this.set = [[range]] this.format() return this } 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 the range to a 2d array of comparators .map(range => this.parseRange(range.trim())) // throw out any comparator lists that are empty // this generally means that it was not a valid range, which is allowed // in loose mode, but will still throw if the WHOLE range is invalid. .filter(c => c.length) if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${range}`) } // if we have any that are not the null set, throw out null sets. if (this.set.length > 1) { // keep the first one, in case they're all null sets const first = this.set[0] this.set = this.set.filter(c => !isNullSet(c[0])) if (this.set.length === 0) this.set = [first] else if (this.set.length > 1) { // if we have any that are *, then the range is just * for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { this.set = [c] break } } } } this.format() } format () { this.range = this.set .map((comps) => { return comps.join(' ').trim() }) .join('||') .trim() return this.range } toString () { return this.range } parseRange (range) { range = range.trim() // memoize range parsing for performance. // this is a very hot path, and fully deterministic. const memoOpts = Object.keys(this.options).join(',') const memoKey = `parseRange:${memoOpts}:${range}` const cached = cache.get(memoKey) if (cached) return cached const loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') // At this point, the range is completely trimmed and // ready to be split into comparators. const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] const rangeList = range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) // >=0.0.0 is equivalent to * .map(comp => replaceGTE0(comp, this.options)) // in loose mode, throw out any that are not valid comparators .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) .map(comp => new Comparator(comp, this.options)) // if any comparators are the null set, then replace with JUST null set // if more than one comparator, remove any * comparators // also, don't include the same comparator more than once const l = rangeList.length const rangeMap = new Map() for (const comp of rangeList) { if (isNullSet(comp)) return [comp] rangeMap.set(comp.value, comp) } if (rangeMap.size > 1 && rangeMap.has('')) rangeMap.delete('') const result = [...rangeMap.values()] cache.set(memoKey, result) return result } intersects (range, options) { if (!(range instanceof Range)) { throw new TypeError('a Range is required') } return this.set.some((thisComparators) => { return ( isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { return ( isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { return rangeComparators.every((rangeComparator) => { return thisComparator.intersects(rangeComparator, options) }) }) ) }) ) }) } // if ANY of the sets match ALL of its comparators, then pass test (version) { if (!version) { return false } if (typeof version === 'string') { try { version = new SemVer(version, this.options) } catch (er) { return false } } for (let i = 0; i < this.set.length; i++) { if (testSet(this.set[i], version, this.options)) { return true } } return false } } module.exports = Range const LRU = __webpack_require__(78933) const cache = new LRU({ max: 1000 }) const parseOptions = __webpack_require__(34360) const Comparator = __webpack_require__(88469) const debug = __webpack_require__(26244) const SemVer = __webpack_require__(64342) const { re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = __webpack_require__(33698) const isNullSet = c => c.value === '<0.0.0-0' const isAny = c => c.value === '' // take a set of comparators and determine whether there // exists a version which can satisfy it const isSatisfiable = (comparators, options) => { let result = true const remainingComparators = comparators.slice() let testComparator = remainingComparators.pop() while (result && remainingComparators.length) { result = remainingComparators.every((otherComparator) => { return testComparator.intersects(otherComparator, options) }) testComparator = remainingComparators.pop() } return result } // comprised of xranges, tildes, stars, and gtlt's at this point. // already replaced the hyphen ranges // turn into a set of JUST comparators. const 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 } const isX = id => !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-0 // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceTilde(comp, options) }).join(' ') const replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] return comp.replace(r, (_, M, m, p, pr) => { debug('tilde', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0 <${+M + 1}.0.0-0` } else if (isX(p)) { // ~1.2 == >=1.2.0 <1.3.0-0 ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` } else if (pr) { debug('replaceTilde pr', pr) ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } else { // ~1.2.3 == >=1.2.3 <1.3.0-0 ret = `>=${M}.${m}.${p } <${M}.${+m + 1}.0-0` } debug('tilde return', ret) return ret }) } // ^ --> * (any, kinda silly) // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 // ^1.2.3 --> >=1.2.3 <2.0.0-0 // ^1.2.0 --> >=1.2.0 <2.0.0-0 const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((comp) => { return replaceCaret(comp, options) }).join(' ') const replaceCaret = (comp, options) => { debug('caret', comp, options) const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] const z = options.includePrerelease ? '-0' : '' return comp.replace(r, (_, M, m, p, pr) => { debug('caret', comp, _, M, m, p, pr) let ret if (isX(M)) { ret = '' } else if (isX(m)) { ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` } else if (isX(p)) { if (M === '0') { ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` } else { ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` } } else if (pr) { debug('replaceCaret pr', pr) if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p}-${pr } <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p}-${pr } <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p}-${pr } <${+M + 1}.0.0-0` } } else { debug('no pr') if (M === '0') { if (m === '0') { ret = `>=${M}.${m}.${p }${z} <${M}.${m}.${+p + 1}-0` } else { ret = `>=${M}.${m}.${p }${z} <${M}.${+m + 1}.0-0` } } else { ret = `>=${M}.${m}.${p } <${+M + 1}.0.0-0` } } debug('caret return', ret) return ret }) } const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) return comp.split(/\s+/).map((comp) => { return replaceXRange(comp, options) }).join(' ') } const replaceXRange = (comp, options) => { comp = comp.trim() const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug('xRange', comp, ret, gtlt, M, m, p, pr) const xM = isX(M) const xm = xM || isX(m) const xp = xm || isX(p) const anyX = xp if (gtlt === '=' && anyX) { gtlt = '' } // if we're including prereleases in the match, then we need // to fix this to -0, the lowest possible prerelease value pr = options.includePrerelease ? '-0' : '' if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed ret = '<0.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 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 } } if (gtlt === '<') pr = '-0' ret = `${gtlt + M}.${m}.${p}${pr}` } else if (xm) { ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` } else if (xp) { ret = `>=${M}.${m}.0${pr } <${M}.${+m + 1}.0-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. const replaceStars = (comp, options) => { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! return comp.trim().replace(re[t.STAR], '') } const replaceGTE0 = (comp, options) => { debug('replaceGTE0', comp, options) return comp.trim() .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') } // This function is passed to string.replace(re[t.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-0 Any 3.4.x will do // 1.2 - 3.4 => >=1.2.0 <3.5.0-0 const hyphenReplace = incPr => ($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${incPr ? '-0' : ''}` } else if (isX(fp)) { from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` } else if (fpr) { from = `>=${from}` } else { from = `>=${from}${incPr ? '-0' : ''}` } if (isX(tM)) { to = '' } else if (isX(tm)) { to = `<${+tM + 1}.0.0-0` } else if (isX(tp)) { to = `<${tM}.${+tm + 1}.0-0` } else if (tpr) { to = `<=${tM}.${tm}.${tp}-${tpr}` } else if (incPr) { to = `<${tM}.${tm}.${+tp + 1}-0` } else { to = `<=${to}` } return (`${from} ${to}`).trim() } const testSet = (set, version, options) => { for (let 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 (let i = 0; i < set.length; i++) { debug(set[i].semver) if (set[i].semver === Comparator.ANY) { continue } if (set[i].semver.prerelease.length > 0) { const 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 } /***/ }), /***/ 64342: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const debug = __webpack_require__(26244) const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(11154) const { re, t } = __webpack_require__(33698) const parseOptions = __webpack_require__(34360) const { compareIdentifiers } = __webpack_require__(36492) class SemVer { constructor (version, options) { options = parseOptions(options) if (version instanceof SemVer) { if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { 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` ) } debug('SemVer', version, options) this.options = options this.loose = !!options.loose // this isn't actually relevant for versions, but keep it so that we // don't run into trouble passing this.options around. this.includePrerelease = !!options.includePrerelease const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.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((id) => { if (/^[0-9]+$/.test(id)) { const num = +id if (num >= 0 && num < MAX_SAFE_INTEGER) { return num } } return id }) } this.build = m[5] ? m[5].split('.') : [] this.format() } format () { this.version = `${this.major}.${this.minor}.${this.patch}` if (this.prerelease.length) { this.version += `-${this.prerelease.join('.')}` } return this.version } toString () { return this.version } compare (other) { debug('SemVer.compare', this.version, this.options, other) if (!(other instanceof SemVer)) { if (typeof other === 'string' && other === this.version) { return 0 } other = new SemVer(other, this.options) } if (other.version === this.version) { return 0 } return this.compareMain(other) || this.comparePre(other) } compareMain (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) ) } comparePre (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 } let i = 0 do { const a = this.prerelease[i] const 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) } compareBuild (other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options) } let i = 0 do { const a = this.build[i] const b = other.build[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. inc (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 { let 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 } } module.exports = SemVer /***/ }), /***/ 95681: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(89947) const clean = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ''), options) return s ? s.version : null } module.exports = clean /***/ }), /***/ 78196: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const eq = __webpack_require__(7508) const neq = __webpack_require__(23056) const gt = __webpack_require__(33789) const gte = __webpack_require__(76536) const lt = __webpack_require__(16791) const lte = __webpack_require__(44042) const 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}`) } } module.exports = cmp /***/ }), /***/ 71269: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const parse = __webpack_require__(89947) const {re, t} = __webpack_require__(33698) const coerce = (version, options) => { if (version instanceof SemVer) { return version } if (typeof version === 'number') { version = String(version) } if (typeof version !== 'string') { return null } options = options || {} let match = null if (!options.rtl) { match = version.match(re[t.COERCE]) } else { // Find the right-most coercible string that does not share // a terminus with a more left-ward coercible string. // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' // // Walk through the string checking with a /g regexp // Manually set the index so as to pick up overlapping matches. // Stop when we get a match that ends at the string end, since no // coercible string can be more right-ward without the same terminus. let next while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length) ) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length } // leave it in a clean state re[t.COERCERTL].lastIndex = -1 } if (match === null) return null return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } module.exports = coerce /***/ }), /***/ 79963: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const compareBuild = (a, b, loose) => { const versionA = new SemVer(a, loose) const versionB = new SemVer(b, loose) return versionA.compare(versionB) || versionA.compareBuild(versionB) } module.exports = compareBuild /***/ }), /***/ 58742: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const compareLoose = (a, b) => compare(a, b, true) module.exports = compareLoose /***/ }), /***/ 81142: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)) module.exports = compare /***/ }), /***/ 10898: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(89947) const eq = __webpack_require__(7508) const diff = (version1, version2) => { if (eq(version1, version2)) { return null } else { const v1 = parse(version1) const v2 = parse(version2) const hasPre = v1.prerelease.length || v2.prerelease.length const prefix = hasPre ? 'pre' : '' const defaultResult = hasPre ? 'prerelease' : '' for (const key in v1) { if (key === 'major' || key === 'minor' || key === 'patch') { if (v1[key] !== v2[key]) { return prefix + key } } } return defaultResult // may be undefined } } module.exports = diff /***/ }), /***/ 7508: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const eq = (a, b, loose) => compare(a, b, loose) === 0 module.exports = eq /***/ }), /***/ 33789: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const gt = (a, b, loose) => compare(a, b, loose) > 0 module.exports = gt /***/ }), /***/ 76536: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const gte = (a, b, loose) => compare(a, b, loose) >= 0 module.exports = gte /***/ }), /***/ 56342: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const inc = (version, release, options, identifier) => { if (typeof (options) === 'string') { identifier = options options = undefined } try { return new SemVer(version, options).inc(release, identifier).version } catch (er) { return null } } module.exports = inc /***/ }), /***/ 16791: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const lt = (a, b, loose) => compare(a, b, loose) < 0 module.exports = lt /***/ }), /***/ 44042: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const lte = (a, b, loose) => compare(a, b, loose) <= 0 module.exports = lte /***/ }), /***/ 18747: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const major = (a, loose) => new SemVer(a, loose).major module.exports = major /***/ }), /***/ 4087: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const minor = (a, loose) => new SemVer(a, loose).minor module.exports = minor /***/ }), /***/ 23056: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const neq = (a, b, loose) => compare(a, b, loose) !== 0 module.exports = neq /***/ }), /***/ 89947: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const {MAX_LENGTH} = __webpack_require__(11154) const { re, t } = __webpack_require__(33698) const SemVer = __webpack_require__(64342) const parseOptions = __webpack_require__(34360) const parse = (version, options) => { options = parseOptions(options) if (version instanceof SemVer) { return version } if (typeof version !== 'string') { return null } if (version.length > MAX_LENGTH) { return null } const r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } try { return new SemVer(version, options) } catch (er) { return null } } module.exports = parse /***/ }), /***/ 94431: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const patch = (a, loose) => new SemVer(a, loose).patch module.exports = patch /***/ }), /***/ 34400: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(89947) const prerelease = (version, options) => { const parsed = parse(version, options) return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } module.exports = prerelease /***/ }), /***/ 13370: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compare = __webpack_require__(81142) const rcompare = (a, b, loose) => compare(b, a, loose) module.exports = rcompare /***/ }), /***/ 99290: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(79963) const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) module.exports = rsort /***/ }), /***/ 21937: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(17448) const satisfies = (version, range, options) => { try { range = new Range(range, options) } catch (er) { return false } return range.test(version) } module.exports = satisfies /***/ }), /***/ 19593: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const compareBuild = __webpack_require__(79963) const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) module.exports = sort /***/ }), /***/ 67148: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const parse = __webpack_require__(89947) const valid = (version, options) => { const v = parse(version, options) return v ? v.version : null } module.exports = valid /***/ }), /***/ 74451: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // just pre-load all the stuff that index.js lazily exports const internalRe = __webpack_require__(33698) module.exports = { re: internalRe.re, src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: __webpack_require__(11154).SEMVER_SPEC_VERSION, SemVer: __webpack_require__(64342), compareIdentifiers: __webpack_require__(36492).compareIdentifiers, rcompareIdentifiers: __webpack_require__(36492).rcompareIdentifiers, parse: __webpack_require__(89947), valid: __webpack_require__(67148), clean: __webpack_require__(95681), inc: __webpack_require__(56342), diff: __webpack_require__(10898), major: __webpack_require__(18747), minor: __webpack_require__(4087), patch: __webpack_require__(94431), prerelease: __webpack_require__(34400), compare: __webpack_require__(81142), rcompare: __webpack_require__(13370), compareLoose: __webpack_require__(58742), compareBuild: __webpack_require__(79963), sort: __webpack_require__(19593), rsort: __webpack_require__(99290), gt: __webpack_require__(33789), lt: __webpack_require__(16791), eq: __webpack_require__(7508), neq: __webpack_require__(23056), gte: __webpack_require__(76536), lte: __webpack_require__(44042), cmp: __webpack_require__(78196), coerce: __webpack_require__(71269), Comparator: __webpack_require__(88469), Range: __webpack_require__(17448), satisfies: __webpack_require__(21937), toComparators: __webpack_require__(76833), maxSatisfying: __webpack_require__(17465), minSatisfying: __webpack_require__(38162), minVersion: __webpack_require__(76438), validRange: __webpack_require__(92557), outside: __webpack_require__(91219), gtr: __webpack_require__(26511), ltr: __webpack_require__(2060), intersects: __webpack_require__(87317), simplifyRange: __webpack_require__(37996), subset: __webpack_require__(20951), } /***/ }), /***/ 11154: /***/ ((module) => { // Note: this is the semver.org version of the spec that it implements // Not necessarily the package version of this code. const SEMVER_SPEC_VERSION = '2.0.0' const MAX_LENGTH = 256 const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 module.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, MAX_SAFE_COMPONENT_LENGTH } /***/ }), /***/ 26244: /***/ ((module) => { const debug = ( typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ) ? (...args) => console.error('SEMVER', ...args) : () => {} module.exports = debug /***/ }), /***/ 36492: /***/ ((module) => { const numeric = /^[0-9]+$/ const compareIdentifiers = (a, b) => { const anum = numeric.test(a) const 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 } const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) module.exports = { compareIdentifiers, rcompareIdentifiers } /***/ }), /***/ 34360: /***/ ((module) => { // parse out just the options we care about so we always get a consistent // obj with keys in a consistent order. const opts = ['includePrerelease', 'loose', 'rtl'] const parseOptions = options => !options ? {} : typeof options !== 'object' ? { loose: true } : opts.filter(k => options[k]).reduce((options, k) => { options[k] = true return options }, {}) module.exports = parseOptions /***/ }), /***/ 33698: /***/ ((module, exports, __webpack_require__) => { const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(11154) const debug = __webpack_require__(26244) exports = module.exports = {} // The actual regexps go on exports.re const re = exports.re = [] const src = exports.src = [] const t = exports.t = {} let R = 0 const createToken = (name, value, isGlobal) => { const index = R++ debug(index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) } // 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. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') createToken('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. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') // ## Main Version // Three dot-separated numeric identifiers. createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`) createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] }|${src[t.NONNUMERICIDENTIFIER]})`) createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] }|${src[t.NONNUMERICIDENTIFIER]})`) // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] }(?:\\.${src[t.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. createToken('FULLPLAIN', `v?${src[t.MAINVERSION] }${src[t.PRERELEASE]}?${ src[t.BUILD]}?`) createToken('FULL', `^${src[t.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. createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] }${src[t.PRERELEASELOOSE]}?${ src[t.BUILD]}?`) createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) createToken('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. createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${ src[t.BUILD]}?` + `)?)?`) createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) // Coercion. // Extract anything that could conceivably be a part of a valid semver createToken('COERCE', `${'(^|[^\\d])' + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:$|[^\\d])`) createToken('COERCERTL', src[t.COERCE], true) // Tilde ranges. // Meaning is "reasonably at or greater than" createToken('LONETILDE', '(?:~>?)') createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) exports.tildeTrimReplace = '$1~' createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) // Caret ranges. // Meaning is "at least and backwards compatible with" createToken('LONECARET', '(?:\\^)') createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) exports.caretTrimReplace = '$1^' createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) // A simple gt/lt/eq thing, or just "" to indicate "any version" createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) exports.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. createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`) createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`) // Star ranges basically just allow anything at all. createToken('STAR', '(<|>)?=?\\s*\\*') // >=0.0.0 is like a star createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') /***/ }), /***/ 26511: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Determine if version is greater than all the versions possible in the range. const outside = __webpack_require__(91219) const gtr = (version, range, options) => outside(version, range, '>', options) module.exports = gtr /***/ }), /***/ 87317: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(17448) const intersects = (r1, r2, options) => { r1 = new Range(r1, options) r2 = new Range(r2, options) return r1.intersects(r2) } module.exports = intersects /***/ }), /***/ 2060: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const outside = __webpack_require__(91219) // Determine if version is less than all the versions possible in the range const ltr = (version, range, options) => outside(version, range, '<', options) module.exports = ltr /***/ }), /***/ 17465: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const Range = __webpack_require__(17448) const maxSatisfying = (versions, range, options) => { let max = null let maxSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = maxSatisfying /***/ }), /***/ 38162: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const Range = __webpack_require__(17448) const minSatisfying = (versions, range, options) => { let min = null let minSV = null let rangeObj = null try { rangeObj = new Range(range, options) } catch (er) { return null } versions.forEach((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 } module.exports = minSatisfying /***/ }), /***/ 76438: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const Range = __webpack_require__(17448) const gt = __webpack_require__(33789) const minVersion = (range, loose) => { range = new Range(range, loose) let 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] let setMin = null comparators.forEach((comparator) => { // Clone to avoid manipulating the comparator's semver object. const 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 (!setMin || gt(compver, setMin)) { setMin = compver } break case '<': case '<=': /* Ignore maximum versions */ break /* istanbul ignore next */ default: throw new Error(`Unexpected operation: ${comparator.operator}`) } }) if (setMin && (!minver || gt(minver, setMin))) minver = setMin } if (minver && range.test(minver)) { return minver } return null } module.exports = minVersion /***/ }), /***/ 91219: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const SemVer = __webpack_require__(64342) const Comparator = __webpack_require__(88469) const {ANY} = Comparator const Range = __webpack_require__(17448) const satisfies = __webpack_require__(21937) const gt = __webpack_require__(33789) const lt = __webpack_require__(16791) const lte = __webpack_require__(44042) const gte = __webpack_require__(76536) const outside = (version, range, hilo, options) => { version = new SemVer(version, options) range = new Range(range, options) let 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 satisfies 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 (let i = 0; i < range.set.length; ++i) { const comparators = range.set[i] let high = null let low = null comparators.forEach((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 } module.exports = outside /***/ }), /***/ 37996: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // given a set of versions and a range, create a "simplified" range // that includes the same versions that the original range does // If the original range is shorter than the simplified one, return that. const satisfies = __webpack_require__(21937) const compare = __webpack_require__(81142) module.exports = (versions, range, options) => { const set = [] let min = null let prev = null const v = versions.sort((a, b) => compare(a, b, options)) for (const version of v) { const included = satisfies(version, range, options) if (included) { prev = version if (!min) min = version } else { if (prev) { set.push([min, prev]) } prev = null min = null } } if (min) set.push([min, null]) const ranges = [] for (const [min, max] of set) { if (min === max) ranges.push(min) else if (!max && min === v[0]) ranges.push('*') else if (!max) ranges.push(`>=${min}`) else if (min === v[0]) ranges.push(`<=${max}`) else ranges.push(`${min} - ${max}`) } const simplified = ranges.join(' || ') const original = typeof range.raw === 'string' ? range.raw : String(range) return simplified.length < original.length ? simplified : range } /***/ }), /***/ 20951: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(17448) const Comparator = __webpack_require__(88469) const { ANY } = Comparator const satisfies = __webpack_require__(21937) const compare = __webpack_require__(81142) // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: // - Every simple range `r1, r2, ...` is a null set, OR // - Every simple range `r1, r2, ...` which is not a null set is a subset of // some `R1, R2, ...` // // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: // - If c is only the ANY comparator // - If C is only the ANY comparator, return true // - Else if in prerelease mode, return false // - else replace c with `[>=0.0.0]` // - If C is only the ANY comparator // - if in prerelease mode, return true // - else replace C with `[>=0.0.0]` // - Let EQ be the set of = comparators in c // - If EQ is more than one, return true (null set) // - Let GT be the highest > or >= comparator in c // - Let LT be the lowest < or <= comparator in c // - If GT and LT, and GT.semver > LT.semver, return true (null set) // - If any C is a = range, and GT or LT are set, return false // - If EQ // - If GT, and EQ does not satisfy GT, return true (null set) // - If LT, and EQ does not satisfy LT, return true (null set) // - If EQ satisfies every C, return true // - Else return false // - If GT // - If GT.semver is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false // - If GT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the GT.semver tuple, return false // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false // - If GT.semver has a prerelease, and not in prerelease mode // - If no C has a prerelease and the LT.semver tuple, return false // - Else return true const subset = (sub, dom, options = {}) => { if (sub === dom) return true sub = new Range(sub, options) dom = new Range(dom, options) let sawNonNull = false OUTER: for (const simpleSub of sub.set) { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options) sawNonNull = sawNonNull || isSub !== null if (isSub) continue OUTER } // the null set is a subset of everything, but null simple ranges in // a complex range should be ignored. so if we saw a non-null range, // then we know this isn't a subset, but if EVERY simple range was null, // then it is a subset. if (sawNonNull) return false } return true } const simpleSubset = (sub, dom, options) => { if (sub === dom) return true if (sub.length === 1 && sub[0].semver === ANY) { if (dom.length === 1 && dom[0].semver === ANY) return true else if (options.includePrerelease) sub = [ new Comparator('>=0.0.0-0') ] else sub = [ new Comparator('>=0.0.0') ] } if (dom.length === 1 && dom[0].semver === ANY) { if (options.includePrerelease) return true else dom = [ new Comparator('>=0.0.0') ] } const eqSet = new Set() let gt, lt for (const c of sub) { if (c.operator === '>' || c.operator === '>=') gt = higherGT(gt, c, options) else if (c.operator === '<' || c.operator === '<=') lt = lowerLT(lt, c, options) else eqSet.add(c.semver) } if (eqSet.size > 1) return null let gtltComp if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options) if (gtltComp > 0) return null else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null } // will iterate one or zero times for (const eq of eqSet) { if (gt && !satisfies(eq, String(gt), options)) return null if (lt && !satisfies(eq, String(lt), options)) return null for (const c of dom) { if (!satisfies(eq, String(c), options)) return false } return true } let higher, lower let hasDomLT, hasDomGT // if the subset has a prerelease, we need a comparator in the superset // with the same tuple and a prerelease, or it's not a subset let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false // exception: <1.2.3-0 is the same as <1.2.3 if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { needDomLTPre = false } for (const c of dom) { hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' if (gt) { if (needDomGTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { needDomGTPre = false } } if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) if (higher === c && higher !== gt) return false } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) return false } if (lt) { if (needDomLTPre) { if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { needDomLTPre = false } } if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) if (lower === c && lower !== lt) return false } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) return false } if (!c.operator && (lt || gt) && gtltComp !== 0) return false } // if there was a < or >, and nothing in the dom, then must be false // UNLESS it was limited by another range in the other direction. // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 if (gt && hasDomLT && !lt && gtltComp !== 0) return false if (lt && hasDomGT && !gt && gtltComp !== 0) return false // we needed a prerelease range in a specific tuple, but didn't get one // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, // because it includes prereleases in the 1.2.3 tuple if (needDomGTPre || needDomLTPre) return false return true } // >=1.2.3 is lower than >1.2.3 const higherGT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a } // <=1.2.3 is higher than <1.2.3 const lowerLT = (a, b, options) => { if (!a) return b const comp = compare(a.semver, b.semver, options) return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a } module.exports = subset /***/ }), /***/ 76833: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(17448) // Mostly just for testing and legacy API reasons const toComparators = (range, options) => new Range(range, options).set .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) module.exports = toComparators /***/ }), /***/ 92557: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const Range = __webpack_require__(17448) const 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 } } module.exports = validRange /***/ }), /***/ 32975: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const shebangRegex = __webpack_require__(41355); module.exports = (string = '') => { const match = string.match(shebangRegex); if (!match) { return null; } const [path, argument] = match[0].replace(/#! ?/, '').split(' '); const binary = path.split('/').pop(); if (binary === 'env') { return argument; } return argument ? `${binary} ${argument}` : binary; }; /***/ }), /***/ 41355: /***/ ((module) => { "use strict"; module.exports = /^#!(.*)/; /***/ }), /***/ 58597: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const os = __webpack_require__(12087); const tty = __webpack_require__(33867); const hasFlag = __webpack_require__(91966); const {env} = process; let forceColor; if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) { forceColor = 0; } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { forceColor = 1; } if ('FORCE_COLOR' in env) { if (env.FORCE_COLOR === 'true') { forceColor = 1; } else if (env.FORCE_COLOR === 'false') { forceColor = 0; } else { forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } function supportsColor(haveStream, streamIsTTY) { if (forceColor === 0) { return 0; } if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { return 3; } if (hasFlag('color=256')) { return 2; } if (haveStream && !streamIsTTY && forceColor === undefined) { return 0; } const min = forceColor || 0; if (env.TERM === 'dumb') { return min; } if (process.platform === 'win32') { // Windows 10 build 10586 is the first Windows release that supports 256 colors. // Windows 10 build 14931 is the first release that supports 16m/TrueColor. const osRelease = os.release().split('.'); if ( Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ('CI' in env) { if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { return 1; } return min; } if ('TEAMCITY_VERSION' in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if (env.COLORTERM === 'truecolor') { return 3; } if ('TERM_PROGRAM' in env) { const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); switch (env.TERM_PROGRAM) { case 'iTerm.app': return version >= 3 ? 3 : 2; case 'Apple_Terminal': return 2; // No default } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ('COLORTERM' in env) { return 1; } return min; } function getSupportLevel(stream) { const level = supportsColor(stream, stream && stream.isTTY); return translateLevel(level); } module.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, tty.isatty(1))), stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; /***/ }), /***/ 87485: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' const path = __webpack_require__(85622) const COLON = isWindows ? ';' : ':' const isexe = __webpack_require__(31959) const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) const getPathInfo = (cmd, opt) => { const colon = opt.colon || COLON // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] : ( [ // windows always checks the cwd first ...(isWindows ? [process.cwd()] : []), ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ '').split(colon), ] ) const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' : '' const pathExt = isWindows ? pathExtExe.split(colon) : [''] if (isWindows) { if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } return { pathEnv, pathExt, pathExtExe, } } const which = (cmd, opt, cb) => { if (typeof opt === 'function') { cb = opt opt = {} } if (!opt) opt = {} const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] const step = i => new Promise((resolve, reject) => { if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)) const ppRaw = pathEnv[i] const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw const pCmd = path.join(pathPart, cmd) const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd resolve(subStep(p, i, 0)) }) const subStep = (p, i, ii) => new Promise((resolve, reject) => { if (ii === pathExt.length) return resolve(step(i + 1)) const ext = pathExt[ii] isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { if (!er && is) { if (opt.all) found.push(p + ext) else return resolve(p + ext) } return resolve(subStep(p, i, ii + 1)) }) }) return cb ? step(0).then(res => cb(null, res), cb) : step(0) } const whichSync = (cmd, opt) => { opt = opt || {} const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] for (let i = 0; i < pathEnv.length; i ++) { const ppRaw = pathEnv[i] const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw const pCmd = path.join(pathPart, cmd) const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd for (let j = 0; j < pathExt.length; j ++) { const cur = p + pathExt[j] try { const 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) } module.exports = which which.sync = whichSync /***/ }), /***/ 23783: /***/ ((module) => { "use strict"; module.exports = function (Yallist) { Yallist.prototype[Symbol.iterator] = function* () { for (let walker = this.head; walker; walker = walker.next) { yield walker.value } } } /***/ }), /***/ 30543: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "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 = 0; i < nodes.length; i++) { walker = insert(this, walker, nodes[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 __webpack_require__(23783)(Yallist) } catch (er) {} /***/ }), /***/ 11473: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AliasFS = void 0; const ProxiedFS_1 = __webpack_require__(93334); class AliasFS extends ProxiedFS_1.ProxiedFS { constructor(target, { baseFs, pathUtils }) { super(pathUtils); this.target = target; this.baseFs = baseFs; } getRealPath() { return this.target; } getBaseFs() { return this.baseFs; } mapFromBase(p) { return p; } mapToBase(p) { return p; } } exports.AliasFS = AliasFS; /***/ }), /***/ 79918: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CwdFS = void 0; const NodeFS_1 = __webpack_require__(78633); const ProxiedFS_1 = __webpack_require__(93334); const path_1 = __webpack_require__(7194); class CwdFS extends ProxiedFS_1.ProxiedFS { constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { super(path_1.ppath); this.target = this.pathUtils.normalize(target); this.baseFs = baseFs; } getRealPath() { return this.pathUtils.resolve(this.baseFs.getRealPath(), this.target); } resolve(p) { if (this.pathUtils.isAbsolute(p)) { return path_1.ppath.normalize(p); } else { return this.baseFs.resolve(path_1.ppath.join(this.target, p)); } } mapFromBase(path) { return path; } mapToBase(path) { if (this.pathUtils.isAbsolute(path)) { return path; } else { return this.pathUtils.join(this.target, path); } } } exports.CwdFS = CwdFS; /***/ }), /***/ 86936: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.normalizeLineEndings = exports.BasePortableFakeFS = exports.FakeFS = void 0; const os_1 = __webpack_require__(12087); const copyPromise_1 = __webpack_require__(9867); const path_1 = __webpack_require__(7194); class FakeFS { constructor(pathUtils) { this.pathUtils = pathUtils; } async *genTraversePromise(init, { stableSort = false } = {}) { const stack = [init]; while (stack.length > 0) { const p = stack.shift(); const entry = await this.lstatPromise(p); if (entry.isDirectory()) { const entries = await this.readdirPromise(p); if (stableSort) { for (const entry of entries.sort()) { stack.push(this.pathUtils.join(p, entry)); } } else { throw new Error(`Not supported`); } } else { yield p; } } } async removePromise(p, { recursive = true, maxRetries = 5 } = {}) { let stat; try { stat = await this.lstatPromise(p); } catch (error) { if (error.code === `ENOENT`) { return; } else { throw error; } } if (stat.isDirectory()) { if (recursive) { const entries = await this.readdirPromise(p); await Promise.all(entries.map(entry => { return this.removePromise(this.pathUtils.resolve(p, entry)); })); } // 5 gives 1s worth of retries at worst let t = 0; do { try { await this.rmdirPromise(p); break; } catch (error) { if (error.code === `EBUSY` || error.code === `ENOTEMPTY`) { if (maxRetries === 0) { break; } else { await new Promise(resolve => setTimeout(resolve, t * 100)); continue; } } else { throw error; } } } while (t++ < maxRetries); } else { await this.unlinkPromise(p); } } removeSync(p, { recursive = true } = {}) { let stat; try { stat = this.lstatSync(p); } catch (error) { if (error.code === `ENOENT`) { return; } else { throw error; } } if (stat.isDirectory()) { if (recursive) for (const entry of this.readdirSync(p)) this.removeSync(this.pathUtils.resolve(p, entry)); this.rmdirSync(p); } else { this.unlinkSync(p); } } async mkdirpPromise(p, { chmod, utimes } = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) return; const parts = p.split(this.pathUtils.sep); for (let u = 2; u <= parts.length; ++u) { const subPath = parts.slice(0, u).join(this.pathUtils.sep); if (!this.existsSync(subPath)) { try { await this.mkdirPromise(subPath); } catch (error) { if (error.code === `EEXIST`) { continue; } else { throw error; } } if (chmod != null) await this.chmodPromise(subPath, chmod); if (utimes != null) { await this.utimesPromise(subPath, utimes[0], utimes[1]); } else { const parentStat = await this.statPromise(this.pathUtils.dirname(subPath)); await this.utimesPromise(subPath, parentStat.atime, parentStat.mtime); } } } } mkdirpSync(p, { chmod, utimes } = {}) { p = this.resolve(p); if (p === this.pathUtils.dirname(p)) return; const parts = p.split(this.pathUtils.sep); for (let u = 2; u <= parts.length; ++u) { const subPath = parts.slice(0, u).join(this.pathUtils.sep); if (!this.existsSync(subPath)) { try { this.mkdirSync(subPath); } catch (error) { if (error.code === `EEXIST`) { continue; } else { throw error; } } if (chmod != null) this.chmodSync(subPath, chmod); if (utimes != null) { this.utimesSync(subPath, utimes[0], utimes[1]); } else { const parentStat = this.statSync(this.pathUtils.dirname(subPath)); this.utimesSync(subPath, parentStat.atime, parentStat.mtime); } } } } async copyPromise(destination, source, { baseFs = this, overwrite = true, stableSort = false, stableTime = false, linkStrategy = null } = {}) { return await copyPromise_1.copyPromise(this, destination, baseFs, source, { overwrite, stableSort, stableTime, linkStrategy }); } copySync(destination, source, { baseFs = this, overwrite = true } = {}) { const stat = baseFs.lstatSync(source); const exists = this.existsSync(destination); if (stat.isDirectory()) { this.mkdirpSync(destination); const directoryListing = baseFs.readdirSync(source); for (const entry of directoryListing) { this.copySync(this.pathUtils.join(destination, entry), baseFs.pathUtils.join(source, entry), { baseFs, overwrite }); } } else if (stat.isFile()) { if (!exists || overwrite) { if (exists) this.removeSync(destination); const content = baseFs.readFileSync(source); this.writeFileSync(destination, content); } } else if (stat.isSymbolicLink()) { if (!exists || overwrite) { if (exists) this.removeSync(destination); const target = baseFs.readlinkSync(source); this.symlinkSync(path_1.convertPath(this.pathUtils, target), destination); } } else { throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6, `0`)})`); } const mode = stat.mode & 0o777; this.chmodSync(destination, mode); } async changeFilePromise(p, content, opts = {}) { if (Buffer.isBuffer(content)) { return this.changeFileBufferPromise(p, content); } else { return this.changeFileTextPromise(p, content, opts); } } async changeFileBufferPromise(p, content) { let current = Buffer.alloc(0); try { current = await this.readFilePromise(p); } catch (error) { // ignore errors, no big deal } if (Buffer.compare(current, content) === 0) return; await this.writeFilePromise(p, content); } async changeFileTextPromise(p, content, { automaticNewlines } = {}) { let current = ``; try { current = await this.readFilePromise(p, `utf8`); } catch (error) { // ignore errors, no big deal } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; await this.writeFilePromise(p, normalizedContent); } changeFileSync(p, content, opts = {}) { if (Buffer.isBuffer(content)) { return this.changeFileBufferSync(p, content); } else { return this.changeFileTextSync(p, content, opts); } } changeFileBufferSync(p, content) { let current = Buffer.alloc(0); try { current = this.readFileSync(p); } catch (error) { // ignore errors, no big deal } if (Buffer.compare(current, content) === 0) return; this.writeFileSync(p, content); } changeFileTextSync(p, content, { automaticNewlines = false } = {}) { let current = ``; try { current = this.readFileSync(p, `utf8`); } catch (error) { // ignore errors, no big deal } const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; this.writeFileSync(p, normalizedContent); } async movePromise(fromP, toP) { try { await this.renamePromise(fromP, toP); } catch (error) { if (error.code === `EXDEV`) { await this.copyPromise(toP, fromP); await this.removePromise(fromP); } else { throw error; } } } moveSync(fromP, toP) { try { this.renameSync(fromP, toP); } catch (error) { if (error.code === `EXDEV`) { this.copySync(toP, fromP); this.removeSync(fromP); } else { throw error; } } } async lockPromise(affectedPath, callback) { const lockPath = `${affectedPath}.flock`; const interval = 1000 / 60; const startTime = Date.now(); let fd = null; // Even when we detect that a lock file exists, we still look inside to see // whether the pid that created it is still alive. It's not foolproof // (there are false positive), but there are no false negative and that's // all that matters in 99% of the cases. const isAlive = async () => { let pid; try { ([pid] = await this.readJsonPromise(lockPath)); } catch (error) { // If we can't read the file repeatedly, we assume the process was // aborted before even writing finishing writing the payload. return Date.now() - startTime < 500; } try { // "As a special case, a signal of 0 can be used to test for the // existence of a process" - so we check whether it's alive. process.kill(pid, 0); return true; } catch (error) { return false; } }; while (fd === null) { try { fd = await this.openPromise(lockPath, `wx`); } catch (error) { if (error.code === `EEXIST`) { if (!await isAlive()) { try { await this.unlinkPromise(lockPath); continue; } catch (error) { // No big deal if we can't remove it. Just fallback to wait for // it to be eventually released by its owner. } } if (Date.now() - startTime < 60 * 1000) { await new Promise(resolve => setTimeout(resolve, interval)); } else { throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`); } } else { throw error; } } } await this.writePromise(fd, JSON.stringify([process.pid])); try { return await callback(); } finally { try { // closePromise needs to come before unlinkPromise otherwise another process can attempt // to get the file handle after the unlink but before close resuling in // EPERM: operation not permitted, open await this.closePromise(fd); await this.unlinkPromise(lockPath); } catch (error) { // noop } } } async readJsonPromise(p) { const content = await this.readFilePromise(p, `utf8`); try { return JSON.parse(content); } catch (error) { error.message += ` (in ${p})`; throw error; } } readJsonSync(p) { const content = this.readFileSync(p, `utf8`); try { return JSON.parse(content); } catch (error) { error.message += ` (in ${p})`; throw error; } } async writeJsonPromise(p, data) { return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)}\n`); } writeJsonSync(p, data) { return this.writeFileSync(p, `${JSON.stringify(data, null, 2)}\n`); } async preserveTimePromise(p, cb) { const stat = await this.lstatPromise(p); const result = await cb(); if (typeof result !== `undefined`) p = result; if (this.lutimesPromise) { await this.lutimesPromise(p, stat.atime, stat.mtime); } else if (!stat.isSymbolicLink()) { await this.utimesPromise(p, stat.atime, stat.mtime); } } async preserveTimeSync(p, cb) { const stat = this.lstatSync(p); const result = cb(); if (typeof result !== `undefined`) p = result; if (this.lutimesSync) { this.lutimesSync(p, stat.atime, stat.mtime); } else if (!stat.isSymbolicLink()) { this.utimesSync(p, stat.atime, stat.mtime); } } } exports.FakeFS = FakeFS; FakeFS.DEFAULT_TIME = 315532800; class BasePortableFakeFS extends FakeFS { constructor() { super(path_1.ppath); } } exports.BasePortableFakeFS = BasePortableFakeFS; function getEndOfLine(content) { const matches = content.match(/\r?\n/g); if (matches === null) return os_1.EOL; const crlf = matches.filter(nl => nl === `\r\n`).length; const lf = matches.length - crlf; return crlf > lf ? `\r\n` : `\n`; } function normalizeLineEndings(originalContent, newContent) { return newContent.replace(/\r?\n/g, getEndOfLine(originalContent)); } exports.normalizeLineEndings = normalizeLineEndings; /***/ }), /***/ 73266: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.JailFS = void 0; const NodeFS_1 = __webpack_require__(78633); const ProxiedFS_1 = __webpack_require__(93334); const path_1 = __webpack_require__(7194); const JAIL_ROOT = path_1.PortablePath.root; class JailFS extends ProxiedFS_1.ProxiedFS { constructor(target, { baseFs = new NodeFS_1.NodeFS() } = {}) { super(path_1.ppath); this.target = this.pathUtils.resolve(path_1.PortablePath.root, target); this.baseFs = baseFs; } getRealPath() { return this.pathUtils.resolve(this.baseFs.getRealPath(), this.pathUtils.relative(path_1.PortablePath.root, this.target)); } getTarget() { return this.target; } getBaseFs() { return this.baseFs; } mapToBase(p) { const normalized = this.pathUtils.normalize(p); if (this.pathUtils.isAbsolute(p)) return this.pathUtils.resolve(this.target, this.pathUtils.relative(JAIL_ROOT, p)); if (normalized.match(/^\.\.\/?/)) throw new Error(`Resolving this path (${p}) would escape the jail`); return this.pathUtils.resolve(this.target, p); } mapFromBase(p) { return this.pathUtils.resolve(JAIL_ROOT, this.pathUtils.relative(this.target, p)); } } exports.JailFS = JailFS; /***/ }), /***/ 44242: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LazyFS = void 0; const ProxiedFS_1 = __webpack_require__(93334); class LazyFS extends ProxiedFS_1.ProxiedFS { constructor(factory, pathUtils) { super(pathUtils); this.instance = null; this.factory = factory; } get baseFs() { if (!this.instance) this.instance = this.factory(); return this.instance; } set baseFs(value) { this.instance = value; } mapFromBase(p) { return p; } mapToBase(p) { return p; } } exports.LazyFS = LazyFS; /***/ }), /***/ 74585: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NoFS = void 0; const FakeFS_1 = __webpack_require__(86936); const path_1 = __webpack_require__(7194); const makeError = () => Object.assign(new Error(`ENOSYS: unsupported filesystem access`), { code: `ENOSYS` }); class NoFS extends FakeFS_1.FakeFS { constructor() { super(path_1.ppath); } getExtractHint() { throw makeError(); } getRealPath() { throw makeError(); } resolve() { throw makeError(); } async openPromise() { throw makeError(); } openSync() { throw makeError(); } async opendirPromise() { throw makeError(); } opendirSync() { throw makeError(); } async readPromise() { throw makeError(); } readSync() { throw makeError(); } async writePromise() { throw makeError(); } writeSync() { throw makeError(); } async closePromise() { throw makeError(); } closeSync() { throw makeError(); } createWriteStream() { throw makeError(); } createReadStream() { throw makeError(); } async realpathPromise() { throw makeError(); } realpathSync() { throw makeError(); } async readdirPromise() { throw makeError(); } readdirSync() { throw makeError(); } async existsPromise(p) { throw makeError(); } existsSync(p) { throw makeError(); } async accessPromise() { throw makeError(); } accessSync() { throw makeError(); } async statPromise() { throw makeError(); } statSync() { throw makeError(); } async fstatPromise(fd) { throw makeError(); } fstatSync(fd) { throw makeError(); } async lstatPromise(p) { throw makeError(); } lstatSync(p) { throw makeError(); } async chmodPromise() { throw makeError(); } chmodSync() { throw makeError(); } async chownPromise() { throw makeError(); } chownSync() { throw makeError(); } async mkdirPromise() { throw makeError(); } mkdirSync() { throw makeError(); } async rmdirPromise() { throw makeError(); } rmdirSync() { throw makeError(); } async linkPromise() { throw makeError(); } linkSync() { throw makeError(); } async symlinkPromise() { throw makeError(); } symlinkSync() { throw makeError(); } async renamePromise() { throw makeError(); } renameSync() { throw makeError(); } async copyFilePromise() { throw makeError(); } copyFileSync() { throw makeError(); } async appendFilePromise() { throw makeError(); } appendFileSync() { throw makeError(); } async writeFilePromise() { throw makeError(); } writeFileSync() { throw makeError(); } async unlinkPromise() { throw makeError(); } unlinkSync() { throw makeError(); } async utimesPromise() { throw makeError(); } utimesSync() { throw makeError(); } async readFilePromise() { throw makeError(); } readFileSync() { throw makeError(); } async readlinkPromise() { throw makeError(); } readlinkSync() { throw makeError(); } async truncatePromise() { throw makeError(); } truncateSync() { throw makeError(); } watch() { throw makeError(); } watchFile() { throw makeError(); } unwatchFile() { throw makeError(); } } exports.NoFS = NoFS; NoFS.instance = new NoFS(); /***/ }), /***/ 78633: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NodeFS = void 0; const tslib_1 = __webpack_require__(70655); const fs_1 = tslib_1.__importDefault(__webpack_require__(35747)); const FakeFS_1 = __webpack_require__(86936); const errors_1 = __webpack_require__(15004); const path_1 = __webpack_require__(7194); class NodeFS extends FakeFS_1.BasePortableFakeFS { constructor(realFs = fs_1.default) { super(); this.realFs = realFs; // @ts-expect-error if (typeof this.realFs.lutimes !== `undefined`) { this.lutimesPromise = this.lutimesPromiseImpl; this.lutimesSync = this.lutimesSyncImpl; } } getExtractHint() { return false; } getRealPath() { return path_1.PortablePath.root; } resolve(p) { return path_1.ppath.resolve(p); } async openPromise(p, flags, mode) { return await new Promise((resolve, reject) => { this.realFs.open(path_1.npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve, reject)); }); } openSync(p, flags, mode) { return this.realFs.openSync(path_1.npath.fromPortablePath(p), flags, mode); } async opendirPromise(p, opts) { return await new Promise((resolve, reject) => { if (typeof opts !== `undefined`) { this.realFs.opendir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); } else { this.realFs.opendir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }).then(dir => { return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); }); } opendirSync(p, opts) { const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(path_1.npath.fromPortablePath(p), opts) : this.realFs.opendirSync(path_1.npath.fromPortablePath(p)); return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true }); } async readPromise(fd, buffer, offset = 0, length = 0, position = -1) { return await new Promise((resolve, reject) => { this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => { if (error) { reject(error); } else { resolve(bytesRead); } }); }); } readSync(fd, buffer, offset, length, position) { return this.realFs.readSync(fd, buffer, offset, length, position); } async writePromise(fd, buffer, offset, length, position) { return await new Promise((resolve, reject) => { if (typeof buffer === `string`) { return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve, reject)); } else { return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve, reject)); } }); } writeSync(fd, buffer, offset, length, position) { if (typeof buffer === `string`) { return this.realFs.writeSync(fd, buffer, offset); } else { return this.realFs.writeSync(fd, buffer, offset, length, position); } } async closePromise(fd) { await new Promise((resolve, reject) => { this.realFs.close(fd, this.makeCallback(resolve, reject)); }); } closeSync(fd) { this.realFs.closeSync(fd); } createReadStream(p, opts) { const realPath = (p !== null ? path_1.npath.fromPortablePath(p) : p); return this.realFs.createReadStream(realPath, opts); } createWriteStream(p, opts) { const realPath = (p !== null ? path_1.npath.fromPortablePath(p) : p); return this.realFs.createWriteStream(realPath, opts); } async realpathPromise(p) { return await new Promise((resolve, reject) => { this.realFs.realpath(path_1.npath.fromPortablePath(p), {}, this.makeCallback(resolve, reject)); }).then(path => { return path_1.npath.toPortablePath(path); }); } realpathSync(p) { return path_1.npath.toPortablePath(this.realFs.realpathSync(path_1.npath.fromPortablePath(p), {})); } async existsPromise(p) { return await new Promise(resolve => { this.realFs.exists(path_1.npath.fromPortablePath(p), resolve); }); } accessSync(p, mode) { return this.realFs.accessSync(path_1.npath.fromPortablePath(p), mode); } async accessPromise(p, mode) { return await new Promise((resolve, reject) => { this.realFs.access(path_1.npath.fromPortablePath(p), mode, this.makeCallback(resolve, reject)); }); } existsSync(p) { return this.realFs.existsSync(path_1.npath.fromPortablePath(p)); } async statPromise(p, opts) { return await new Promise((resolve, reject) => { if (opts) { this.realFs.stat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); } else { this.realFs.stat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }); } statSync(p, opts) { if (opts) { return this.realFs.statSync(path_1.npath.fromPortablePath(p), opts); } else { return this.realFs.statSync(path_1.npath.fromPortablePath(p)); } } async fstatPromise(fd, opts) { return await new Promise((resolve, reject) => { if (opts) { // @ts-expect-error - The node typings doesn't know about the options this.realFs.fstat(fd, opts, this.makeCallback(resolve, reject)); } else { this.realFs.fstat(fd, this.makeCallback(resolve, reject)); } }); } fstatSync(fd, opts) { if (opts) { // @ts-expect-error - The node typings doesn't know about the options return this.realFs.fstatSync(fd, opts); } else { return this.realFs.fstatSync(fd); } } async lstatPromise(p, opts) { return await new Promise((resolve, reject) => { if (opts) { // @ts-expect-error - TS does not know this takes options this.realFs.lstat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); } else { this.realFs.lstat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }); } lstatSync(p, opts) { if (opts) { // @ts-expect-error - TS does not know this takes options return this.realFs.lstatSync(path_1.npath.fromPortablePath(p), opts); } else { return this.realFs.lstatSync(path_1.npath.fromPortablePath(p)); } } async chmodPromise(p, mask) { return await new Promise((resolve, reject) => { this.realFs.chmod(path_1.npath.fromPortablePath(p), mask, this.makeCallback(resolve, reject)); }); } chmodSync(p, mask) { return this.realFs.chmodSync(path_1.npath.fromPortablePath(p), mask); } async chownPromise(p, uid, gid) { return await new Promise((resolve, reject) => { this.realFs.chown(path_1.npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve, reject)); }); } chownSync(p, uid, gid) { return this.realFs.chownSync(path_1.npath.fromPortablePath(p), uid, gid); } async renamePromise(oldP, newP) { return await new Promise((resolve, reject) => { this.realFs.rename(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); }); } renameSync(oldP, newP) { return this.realFs.renameSync(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP)); } async copyFilePromise(sourceP, destP, flags = 0) { return await new Promise((resolve, reject) => { this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags, this.makeCallback(resolve, reject)); }); } copyFileSync(sourceP, destP, flags = 0) { return this.realFs.copyFileSync(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags); } async appendFilePromise(p, content, opts) { return await new Promise((resolve, reject) => { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; if (opts) { this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); } else { this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve, reject)); } }); } appendFileSync(p, content, opts) { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; if (opts) { this.realFs.appendFileSync(fsNativePath, content, opts); } else { this.realFs.appendFileSync(fsNativePath, content); } } async writeFilePromise(p, content, opts) { return await new Promise((resolve, reject) => { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; if (opts) { this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve, reject)); } else { this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve, reject)); } }); } writeFileSync(p, content, opts) { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; if (opts) { this.realFs.writeFileSync(fsNativePath, content, opts); } else { this.realFs.writeFileSync(fsNativePath, content); } } async unlinkPromise(p) { return await new Promise((resolve, reject) => { this.realFs.unlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); }); } unlinkSync(p) { return this.realFs.unlinkSync(path_1.npath.fromPortablePath(p)); } async utimesPromise(p, atime, mtime) { return await new Promise((resolve, reject) => { this.realFs.utimes(path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); }); } utimesSync(p, atime, mtime) { this.realFs.utimesSync(path_1.npath.fromPortablePath(p), atime, mtime); } async lutimesPromiseImpl(p, atime, mtime) { // @ts-expect-error: Not yet in DefinitelyTyped const lutimes = this.realFs.lutimes; if (typeof lutimes === `undefined`) throw errors_1.ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); return await new Promise((resolve, reject) => { lutimes.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve, reject)); }); } lutimesSyncImpl(p, atime, mtime) { // @ts-expect-error: Not yet in DefinitelyTyped const lutimesSync = this.realFs.lutimesSync; if (typeof lutimesSync === `undefined`) throw errors_1.ENOSYS(`unavailable Node binding`, `lutimes '${p}'`); lutimesSync.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime); } async mkdirPromise(p, opts) { return await new Promise((resolve, reject) => { this.realFs.mkdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); }); } mkdirSync(p, opts) { return this.realFs.mkdirSync(path_1.npath.fromPortablePath(p), opts); } async rmdirPromise(p, opts) { return await new Promise((resolve, reject) => { // TODO: always pass opts when min node version is 12.10+ if (opts) { this.realFs.rmdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject)); } else { this.realFs.rmdir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); } }); } rmdirSync(p, opts) { return this.realFs.rmdirSync(path_1.npath.fromPortablePath(p), opts); } async linkPromise(existingP, newP) { return await new Promise((resolve, reject) => { this.realFs.link(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve, reject)); }); } linkSync(existingP, newP) { return this.realFs.linkSync(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP)); } async symlinkPromise(target, p, type) { return await new Promise((resolve, reject) => { this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type, this.makeCallback(resolve, reject)); }); } symlinkSync(target, p, type) { return this.realFs.symlinkSync(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type); } async readFilePromise(p, encoding) { return await new Promise((resolve, reject) => { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject)); }); } readFileSync(p, encoding) { const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p; return this.realFs.readFileSync(fsNativePath, encoding); } async readdirPromise(p, opts) { return await new Promise((resolve, reject) => { if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { this.realFs.readdir(path_1.npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject)); } else { this.realFs.readdir(path_1.npath.fromPortablePath(p), this.makeCallback(value => resolve(value), reject)); } }); } readdirSync(p, opts) { if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) { return this.realFs.readdirSync(path_1.npath.fromPortablePath(p), { withFileTypes: true }); } else { return this.realFs.readdirSync(path_1.npath.fromPortablePath(p)); } } async readlinkPromise(p) { return await new Promise((resolve, reject) => { this.realFs.readlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve, reject)); }).then(path => { return path_1.npath.toPortablePath(path); }); } readlinkSync(p) { return path_1.npath.toPortablePath(this.realFs.readlinkSync(path_1.npath.fromPortablePath(p))); } async truncatePromise(p, len) { return await new Promise((resolve, reject) => { this.realFs.truncate(path_1.npath.fromPortablePath(p), len, this.makeCallback(resolve, reject)); }); } truncateSync(p, len) { return this.realFs.truncateSync(path_1.npath.fromPortablePath(p), len); } watch(p, a, b) { return this.realFs.watch(path_1.npath.fromPortablePath(p), // @ts-expect-error a, b); } watchFile(p, a, b) { return this.realFs.watchFile(path_1.npath.fromPortablePath(p), // @ts-expect-error a, b); } unwatchFile(p, cb) { return this.realFs.unwatchFile(path_1.npath.fromPortablePath(p), cb); } makeCallback(resolve, reject) { return (err, result) => { if (err) { reject(err); } else { resolve(result); } }; } } exports.NodeFS = NodeFS; /***/ }), /***/ 22155: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PosixFS = void 0; const ProxiedFS_1 = __webpack_require__(93334); const path_1 = __webpack_require__(7194); class PosixFS extends ProxiedFS_1.ProxiedFS { constructor(baseFs) { super(path_1.npath); this.baseFs = baseFs; } mapFromBase(path) { return path_1.npath.fromPortablePath(path); } mapToBase(path) { return path_1.npath.toPortablePath(path); } } exports.PosixFS = PosixFS; /***/ }), /***/ 93334: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ProxiedFS = void 0; const FakeFS_1 = __webpack_require__(86936); class ProxiedFS extends FakeFS_1.FakeFS { getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } resolve(path) { return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path))); } getRealPath() { return this.mapFromBase(this.baseFs.getRealPath()); } async openPromise(p, flags, mode) { return this.baseFs.openPromise(this.mapToBase(p), flags, mode); } openSync(p, flags, mode) { return this.baseFs.openSync(this.mapToBase(p), flags, mode); } async opendirPromise(p, opts) { return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p), opts), { path: p }); } opendirSync(p, opts) { return Object.assign(this.baseFs.opendirSync(this.mapToBase(p), opts), { path: p }); } async readPromise(fd, buffer, offset, length, position) { return await this.baseFs.readPromise(fd, buffer, offset, length, position); } readSync(fd, buffer, offset, length, position) { return this.baseFs.readSync(fd, buffer, offset, length, position); } async writePromise(fd, buffer, offset, length, position) { if (typeof buffer === `string`) { return await this.baseFs.writePromise(fd, buffer, offset); } else { return await this.baseFs.writePromise(fd, buffer, offset, length, position); } } writeSync(fd, buffer, offset, length, position) { if (typeof buffer === `string`) { return this.baseFs.writeSync(fd, buffer, offset); } else { return this.baseFs.writeSync(fd, buffer, offset, length, position); } } async closePromise(fd) { return this.baseFs.closePromise(fd); } closeSync(fd) { this.baseFs.closeSync(fd); } createReadStream(p, opts) { return this.baseFs.createReadStream(p !== null ? this.mapToBase(p) : p, opts); } createWriteStream(p, opts) { return this.baseFs.createWriteStream(p !== null ? this.mapToBase(p) : p, opts); } async realpathPromise(p) { return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p))); } realpathSync(p) { return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p))); } async existsPromise(p) { return this.baseFs.existsPromise(this.mapToBase(p)); } existsSync(p) { return this.baseFs.existsSync(this.mapToBase(p)); } accessSync(p, mode) { return this.baseFs.accessSync(this.mapToBase(p), mode); } async accessPromise(p, mode) { return this.baseFs.accessPromise(this.mapToBase(p), mode); } async statPromise(p, opts) { return this.baseFs.statPromise(this.mapToBase(p), opts); } statSync(p, opts) { return this.baseFs.statSync(this.mapToBase(p), opts); } async fstatPromise(fd, opts) { return this.baseFs.fstatPromise(fd, opts); } fstatSync(fd, opts) { return this.baseFs.fstatSync(fd, opts); } async lstatPromise(p, opts) { return this.baseFs.lstatPromise(this.mapToBase(p), opts); } lstatSync(p, opts) { return this.baseFs.lstatSync(this.mapToBase(p), opts); } async chmodPromise(p, mask) { return this.baseFs.chmodPromise(this.mapToBase(p), mask); } chmodSync(p, mask) { return this.baseFs.chmodSync(this.mapToBase(p), mask); } async chownPromise(p, uid, gid) { return this.baseFs.chownPromise(this.mapToBase(p), uid, gid); } chownSync(p, uid, gid) { return this.baseFs.chownSync(this.mapToBase(p), uid, gid); } async renamePromise(oldP, newP) { return this.baseFs.renamePromise(this.mapToBase(oldP), this.mapToBase(newP)); } renameSync(oldP, newP) { return this.baseFs.renameSync(this.mapToBase(oldP), this.mapToBase(newP)); } async copyFilePromise(sourceP, destP, flags = 0) { return this.baseFs.copyFilePromise(this.mapToBase(sourceP), this.mapToBase(destP), flags); } copyFileSync(sourceP, destP, flags = 0) { return this.baseFs.copyFileSync(this.mapToBase(sourceP), this.mapToBase(destP), flags); } async appendFilePromise(p, content, opts) { return this.baseFs.appendFilePromise(this.fsMapToBase(p), content, opts); } appendFileSync(p, content, opts) { return this.baseFs.appendFileSync(this.fsMapToBase(p), content, opts); } async writeFilePromise(p, content, opts) { return this.baseFs.writeFilePromise(this.fsMapToBase(p), content, opts); } writeFileSync(p, content, opts) { return this.baseFs.writeFileSync(this.fsMapToBase(p), content, opts); } async unlinkPromise(p) { return this.baseFs.unlinkPromise(this.mapToBase(p)); } unlinkSync(p) { return this.baseFs.unlinkSync(this.mapToBase(p)); } async utimesPromise(p, atime, mtime) { return this.baseFs.utimesPromise(this.mapToBase(p), atime, mtime); } utimesSync(p, atime, mtime) { return this.baseFs.utimesSync(this.mapToBase(p), atime, mtime); } async mkdirPromise(p, opts) { return this.baseFs.mkdirPromise(this.mapToBase(p), opts); } mkdirSync(p, opts) { return this.baseFs.mkdirSync(this.mapToBase(p), opts); } async rmdirPromise(p, opts) { return this.baseFs.rmdirPromise(this.mapToBase(p), opts); } rmdirSync(p, opts) { return this.baseFs.rmdirSync(this.mapToBase(p), opts); } async linkPromise(existingP, newP) { return this.baseFs.linkPromise(this.mapToBase(existingP), this.mapToBase(newP)); } linkSync(existingP, newP) { return this.baseFs.linkSync(this.mapToBase(existingP), this.mapToBase(newP)); } async symlinkPromise(target, p, type) { const mappedP = this.mapToBase(p); if (this.pathUtils.isAbsolute(target)) return this.baseFs.symlinkPromise(this.mapToBase(target), mappedP, type); const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); return this.baseFs.symlinkPromise(mappedTarget, mappedP, type); } symlinkSync(target, p, type) { const mappedP = this.mapToBase(p); if (this.pathUtils.isAbsolute(target)) return this.baseFs.symlinkSync(this.mapToBase(target), mappedP, type); const mappedAbsoluteTarget = this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p), target)); const mappedTarget = this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP), mappedAbsoluteTarget); return this.baseFs.symlinkSync(mappedTarget, mappedP, type); } async readFilePromise(p, encoding) { // This weird condition is required to tell TypeScript that the signatures are proper (otherwise it thinks that only the generic one is covered) if (encoding === `utf8`) { return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); } else { return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding); } } readFileSync(p, encoding) { // This weird condition is required to tell TypeScript that the signatures are proper (otherwise it thinks that only the generic one is covered) if (encoding === `utf8`) { return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); } else { return this.baseFs.readFileSync(this.fsMapToBase(p), encoding); } } async readdirPromise(p, opts) { return this.baseFs.readdirPromise(this.mapToBase(p), opts); } readdirSync(p, opts) { return this.baseFs.readdirSync(this.mapToBase(p), opts); } async readlinkPromise(p) { return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p))); } readlinkSync(p) { return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p))); } async truncatePromise(p, len) { return this.baseFs.truncatePromise(this.mapToBase(p), len); } truncateSync(p, len) { return this.baseFs.truncateSync(this.mapToBase(p), len); } watch(p, a, b) { return this.baseFs.watch(this.mapToBase(p), // @ts-expect-error a, b); } watchFile(p, a, b) { return this.baseFs.watchFile(this.mapToBase(p), // @ts-expect-error a, b); } unwatchFile(p, cb) { return this.baseFs.unwatchFile(this.mapToBase(p), cb); } fsMapToBase(p) { if (typeof p === `number`) { return p; } else { return this.mapToBase(p); } } } exports.ProxiedFS = ProxiedFS; /***/ }), /***/ 81894: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.URLFS = void 0; const url_1 = __webpack_require__(78835); const ProxiedFS_1 = __webpack_require__(93334); const path_1 = __webpack_require__(7194); /** * Adds support for file URLs to the wrapped `baseFs`, but *not* inside the typings. * * Only exists for compatibility with Node's behavior. * * Automatically wraps all FS instances passed to `patchFs` & `extendFs`. * * Don't use it! */ class URLFS extends ProxiedFS_1.ProxiedFS { constructor(baseFs) { super(path_1.npath); this.baseFs = baseFs; } mapFromBase(path) { return path; } mapToBase(path) { if (path instanceof url_1.URL) return url_1.fileURLToPath(path); return path; } } exports.URLFS = URLFS; /***/ }), /***/ 84478: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VirtualFS = void 0; const NodeFS_1 = __webpack_require__(78633); const ProxiedFS_1 = __webpack_require__(93334); const path_1 = __webpack_require__(7194); const NUMBER_REGEXP = /^[0-9]+$/; // $0: full path // $1: virtual folder // $2: virtual segment // $3: hash // $4: depth // $5: subpath const VIRTUAL_REGEXP = /^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/; const VALID_COMPONENT = /^([^/]+-)?[a-f0-9]+$/; class VirtualFS extends ProxiedFS_1.ProxiedFS { constructor({ baseFs = new NodeFS_1.NodeFS() } = {}) { super(path_1.ppath); this.baseFs = baseFs; } static makeVirtualPath(base, component, to) { if (path_1.ppath.basename(base) !== `__virtual__`) throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`); if (!path_1.ppath.basename(component).match(VALID_COMPONENT)) throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`); // Obtains the relative distance between the virtual path and its actual target const target = path_1.ppath.relative(path_1.ppath.dirname(base), to); const segments = target.split(`/`); // Counts how many levels we need to go back to start applying the rest of the path let depth = 0; while (depth < segments.length && segments[depth] === `..`) depth += 1; const finalSegments = segments.slice(depth); const fullVirtualPath = path_1.ppath.join(base, component, String(depth), ...finalSegments); return fullVirtualPath; } static resolveVirtual(p) { const match = p.match(VIRTUAL_REGEXP); if (!match || (!match[3] && match[5])) return p; const target = path_1.ppath.dirname(match[1]); if (!match[3] || !match[4]) return target; const isnum = NUMBER_REGEXP.test(match[4]); if (!isnum) return p; const depth = Number(match[4]); const backstep = `../`.repeat(depth); const subpath = (match[5] || `.`); return VirtualFS.resolveVirtual(path_1.ppath.join(target, backstep, subpath)); } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } getRealPath() { return this.baseFs.getRealPath(); } realpathSync(p) { const match = p.match(VIRTUAL_REGEXP); if (!match) return this.baseFs.realpathSync(p); if (!match[5]) return p; const realpath = this.baseFs.realpathSync(this.mapToBase(p)); return VirtualFS.makeVirtualPath(match[1], match[3], realpath); } async realpathPromise(p) { const match = p.match(VIRTUAL_REGEXP); if (!match) return await this.baseFs.realpathPromise(p); if (!match[5]) return p; const realpath = await this.baseFs.realpathPromise(this.mapToBase(p)); return VirtualFS.makeVirtualPath(match[1], match[3], realpath); } mapToBase(p) { if (this.pathUtils.isAbsolute(p)) return VirtualFS.resolveVirtual(p); const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(path_1.PortablePath.dot)); const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); return path_1.ppath.relative(resolvedRoot, resolvedP); } mapFromBase(p) { return p; } } exports.VirtualFS = VirtualFS; /***/ }), /***/ 56970: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ZipFS = exports.DEFAULT_COMPRESSION_LEVEL = void 0; const tslib_1 = __webpack_require__(70655); const fs_1 = __webpack_require__(35747); const stream_1 = __webpack_require__(92413); const util_1 = __webpack_require__(31669); const zlib_1 = tslib_1.__importDefault(__webpack_require__(78761)); const FakeFS_1 = __webpack_require__(86936); const NodeFS_1 = __webpack_require__(78633); const opendir_1 = __webpack_require__(74694); const watchFile_1 = __webpack_require__(38242); const constants_1 = __webpack_require__(92775); const errors = tslib_1.__importStar(__webpack_require__(15004)); const path_1 = __webpack_require__(7194); const statUtils = tslib_1.__importStar(__webpack_require__(62576)); exports.DEFAULT_COMPRESSION_LEVEL = `mixed`; function toUnixTimestamp(time) { if (typeof time === `string` && String(+time) === time) return +time; if (Number.isFinite(time)) { if (time < 0) { return Date.now() / 1000; } else { return time; } } // convert to 123.456 UNIX timestamp if (util_1.isDate(time)) return time.getTime() / 1000; throw new Error(`Invalid time`); } class ZipFS extends FakeFS_1.BasePortableFakeFS { constructor(source, opts) { super(); this.lzSource = null; this.listings = new Map(); this.entries = new Map(); /** * A cache of indices mapped to file sources. * Populated by `setFileSource` calls. * Required for supporting read after write. */ this.fileSources = new Map(); this.fds = new Map(); this.nextFd = 0; this.ready = false; this.readOnly = false; this.libzip = opts.libzip; const pathOptions = opts; this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : exports.DEFAULT_COMPRESSION_LEVEL; if (source === null) { source = Buffer.from([ 0x50, 0x4B, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ]); } if (typeof source === `string`) { const { baseFs = new NodeFS_1.NodeFS() } = pathOptions; this.baseFs = baseFs; this.path = source; } else { this.path = null; this.baseFs = null; } if (opts.stats) { this.stats = opts.stats; } else { if (typeof source === `string`) { try { this.stats = this.baseFs.statSync(source); } catch (error) { if (error.code === `ENOENT` && pathOptions.create) { this.stats = statUtils.makeDefaultStats(); } else { throw error; } } } else { this.stats = statUtils.makeDefaultStats(); } } const errPtr = this.libzip.malloc(4); try { let flags = 0; if (typeof source === `string` && pathOptions.create) flags |= this.libzip.ZIP_CREATE | this.libzip.ZIP_TRUNCATE; if (opts.readOnly) { flags |= this.libzip.ZIP_RDONLY; this.readOnly = true; } if (typeof source === `string`) { this.zip = this.libzip.open(path_1.npath.fromPortablePath(source), flags, errPtr); } else { const lzSource = this.allocateUnattachedSource(source); try { this.zip = this.libzip.openFromSource(lzSource, flags, errPtr); this.lzSource = lzSource; } catch (error) { this.libzip.source.free(lzSource); throw error; } } if (this.zip === 0) { const error = this.libzip.struct.errorS(); this.libzip.error.initWithCode(error, this.libzip.getValue(errPtr, `i32`)); throw this.makeLibzipError(error); } } finally { this.libzip.free(errPtr); } this.listings.set(path_1.PortablePath.root, new Set()); const entryCount = this.libzip.getNumEntries(this.zip, 0); for (let t = 0; t < entryCount; ++t) { const raw = this.libzip.getName(this.zip, t, 0); if (path_1.ppath.isAbsolute(raw)) continue; const p = path_1.ppath.resolve(path_1.PortablePath.root, raw); this.registerEntry(p, t); // If the raw path is a directory, register it // to prevent empty folder being skipped if (raw.endsWith(`/`)) { this.registerListing(p); } } this.symlinkCount = this.libzip.ext.countSymlinks(this.zip); if (this.symlinkCount === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); this.ready = true; } makeLibzipError(error) { const errorCode = this.libzip.struct.errorCodeZip(error); const strerror = this.libzip.error.strerror(error); const libzipError = new errors.LibzipError(strerror, this.libzip.errors[errorCode]); // This error should never come up because of the file source cache if (errorCode === this.libzip.errors.ZIP_ER_CHANGED) throw new Error(`Assertion failed: Unexpected libzip error: ${libzipError.message}`); return libzipError; } getExtractHint(hints) { for (const fileName of this.entries.keys()) { const ext = this.pathUtils.extname(fileName); if (hints.relevantExtensions.has(ext)) { return true; } } return false; } getAllFiles() { return Array.from(this.entries.keys()); } getRealPath() { if (!this.path) throw new Error(`ZipFS don't have real paths when loaded from a buffer`); return this.path; } getBufferAndClose() { this.prepareClose(); if (!this.lzSource) throw new Error(`ZipFS was not created from a Buffer`); try { // Prevent close from cleaning up the source this.libzip.source.keep(this.lzSource); // Close the zip archive if (this.libzip.close(this.zip) === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); // Open the source for reading if (this.libzip.source.open(this.lzSource) === -1) throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); // Move to the end of source if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_END) === -1) throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); // Get the size of source const size = this.libzip.source.tell(this.lzSource); if (size === -1) throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); // Move to the start of source if (this.libzip.source.seek(this.lzSource, 0, 0, this.libzip.SEEK_SET) === -1) throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); const buffer = this.libzip.malloc(size); if (!buffer) throw new Error(`Couldn't allocate enough memory`); try { const rc = this.libzip.source.read(this.lzSource, buffer, size); if (rc === -1) throw this.makeLibzipError(this.libzip.source.error(this.lzSource)); else if (rc < size) throw new Error(`Incomplete read`); else if (rc > size) throw new Error(`Overread`); const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); return Buffer.from(memory); } finally { this.libzip.free(buffer); } } finally { this.libzip.source.close(this.lzSource); this.libzip.source.free(this.lzSource); this.ready = false; } } prepareClose() { if (!this.ready) throw errors.EBUSY(`archive closed, close`); watchFile_1.unwatchAllFiles(this); } saveAndClose() { if (!this.path || !this.baseFs) throw new Error(`ZipFS cannot be saved and must be discarded when loaded from a buffer`); this.prepareClose(); if (this.readOnly) { this.discardAndClose(); return; } const previousMod = this.baseFs.existsSync(this.path) ? this.baseFs.statSync(this.path).mode & 0o777 : null; const rc = this.libzip.close(this.zip); if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); // this.libzip overrides the chmod when writing the archive, which is a weird // behavior I don't totally understand (plus the umask seems bogus in some // weird cases - maybe related to emscripten?) // // See also https://github.com/nih-at/libzip/issues/77 if (previousMod === null) this.baseFs.chmodSync(this.path, this.stats.mode); else if (previousMod !== (this.baseFs.statSync(this.path).mode & 0o777)) this.baseFs.chmodSync(this.path, previousMod); this.ready = false; } discardAndClose() { this.prepareClose(); this.libzip.discard(this.zip); this.ready = false; } resolve(p) { return path_1.ppath.resolve(path_1.PortablePath.root, p); } async openPromise(p, flags, mode) { return this.openSync(p, flags, mode); } openSync(p, flags, mode) { const fd = this.nextFd++; this.fds.set(fd, { cursor: 0, p }); return fd; } hasOpenFileHandles() { return !!this.fds.size; } async opendirPromise(p, opts) { return this.opendirSync(p, opts); } opendirSync(p, opts = {}) { const resolvedP = this.resolveFilename(`opendir '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`opendir '${p}'`); const directoryListing = this.listings.get(resolvedP); if (!directoryListing) throw errors.ENOTDIR(`opendir '${p}'`); const entries = [...directoryListing]; const fd = this.openSync(resolvedP, `r`); const onClose = () => { this.closeSync(fd); }; return opendir_1.opendir(this, resolvedP, entries, { onClose }); } async readPromise(fd, buffer, offset, length, position) { return this.readSync(fd, buffer, offset, length, position); } readSync(fd, buffer, offset = 0, length = 0, position = -1) { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`read`); let realPosition; if (position === -1 || position === null) realPosition = entry.cursor; else realPosition = position; const source = this.readFileSync(entry.p); source.copy(buffer, offset, realPosition, realPosition + length); const bytesRead = Math.max(0, Math.min(source.length - realPosition, length)); if (position === -1 || position === null) entry.cursor += bytesRead; return bytesRead; } async writePromise(fd, buffer, offset, length, position) { if (typeof buffer === `string`) { return this.writeSync(fd, buffer, position); } else { return this.writeSync(fd, buffer, offset, length, position); } } writeSync(fd, buffer, offset, length, position) { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`read`); throw new Error(`Unimplemented`); } async closePromise(fd) { return this.closeSync(fd); } closeSync(fd) { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`read`); this.fds.delete(fd); } createReadStream(p, { encoding } = {}) { if (p === null) throw new Error(`Unimplemented`); const fd = this.openSync(p, `r`); const stream = Object.assign(new stream_1.PassThrough({ emitClose: true, autoDestroy: true, destroy: (error, callback) => { clearImmediate(immediate); this.closeSync(fd); callback(error); }, }), { close() { stream.destroy(); }, bytesRead: 0, path: p, }); const immediate = setImmediate(async () => { try { const data = await this.readFilePromise(p, encoding); stream.bytesRead = data.length; stream.end(data); } catch (error) { stream.destroy(error); } }); return stream; } createWriteStream(p, { encoding } = {}) { if (this.readOnly) throw errors.EROFS(`open '${p}'`); if (p === null) throw new Error(`Unimplemented`); const chunks = []; const fd = this.openSync(p, `w`); const stream = Object.assign(new stream_1.PassThrough({ autoDestroy: true, emitClose: true, destroy: (error, callback) => { try { if (error) { callback(error); } else { this.writeFileSync(p, Buffer.concat(chunks), encoding); callback(null); } } catch (err) { callback(err); } finally { this.closeSync(fd); } }, }), { bytesWritten: 0, path: p, close() { stream.destroy(); }, }); stream.on(`data`, chunk => { const chunkBuffer = Buffer.from(chunk); stream.bytesWritten += chunkBuffer.length; chunks.push(chunkBuffer); }); return stream; } async realpathPromise(p) { return this.realpathSync(p); } realpathSync(p) { const resolvedP = this.resolveFilename(`lstat '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`lstat '${p}'`); return resolvedP; } async existsPromise(p) { return this.existsSync(p); } existsSync(p) { if (!this.ready) throw errors.EBUSY(`archive closed, existsSync '${p}'`); if (this.symlinkCount === 0) { const resolvedP = path_1.ppath.resolve(path_1.PortablePath.root, p); return this.entries.has(resolvedP) || this.listings.has(resolvedP); } let resolvedP; try { resolvedP = this.resolveFilename(`stat '${p}'`, p); } catch (error) { return false; } return this.entries.has(resolvedP) || this.listings.has(resolvedP); } async accessPromise(p, mode) { return this.accessSync(p, mode); } accessSync(p, mode = fs_1.constants.F_OK) { const resolvedP = this.resolveFilename(`access '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`access '${p}'`); if (this.readOnly && (mode & fs_1.constants.W_OK)) { throw errors.EROFS(`access '${p}'`); } } async statPromise(p, opts) { return this.statSync(p, opts); } statSync(p, opts) { const resolvedP = this.resolveFilename(`stat '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`stat '${p}'`); if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw errors.ENOTDIR(`stat '${p}'`); return this.statImpl(`stat '${p}'`, resolvedP, opts); } async fstatPromise(fd, opts) { return this.fstatSync(fd, opts); } fstatSync(fd, opts) { const entry = this.fds.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`fstatSync`); const { p } = entry; const resolvedP = this.resolveFilename(`stat '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`stat '${p}'`); if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw errors.ENOTDIR(`stat '${p}'`); return this.statImpl(`fstat '${p}'`, resolvedP, opts); } async lstatPromise(p, opts) { return this.lstatSync(p, opts); } lstatSync(p, opts) { const resolvedP = this.resolveFilename(`lstat '${p}'`, p, false); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`lstat '${p}'`); if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw errors.ENOTDIR(`lstat '${p}'`); return this.statImpl(`lstat '${p}'`, resolvedP, opts); } statImpl(reason, p, opts = {}) { const entry = this.entries.get(p); // File, or explicit directory if (typeof entry !== `undefined`) { const stat = this.libzip.struct.statS(); const rc = this.libzip.statIndex(this.zip, entry, 0, 0, stat); if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); const uid = this.stats.uid; const gid = this.stats.gid; const size = (this.libzip.struct.statSize(stat) >>> 0); const blksize = 512; const blocks = Math.ceil(size / blksize); const mtimeMs = (this.libzip.struct.statMtime(stat) >>> 0) * 1000; const atimeMs = mtimeMs; const birthtimeMs = mtimeMs; const ctimeMs = mtimeMs; const atime = new Date(atimeMs); const birthtime = new Date(birthtimeMs); const ctime = new Date(ctimeMs); const mtime = new Date(mtimeMs); const type = this.listings.has(p) ? constants_1.S_IFDIR : this.isSymbolicLink(entry) ? constants_1.S_IFLNK : constants_1.S_IFREG; const defaultMode = type === constants_1.S_IFDIR ? 0o755 : 0o644; const mode = type | (this.getUnixMode(entry, defaultMode) & 0o777); const crc = this.libzip.struct.statCrc(stat); const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; } // Implicit directory if (this.listings.has(p)) { const uid = this.stats.uid; const gid = this.stats.gid; const size = 0; const blksize = 512; const blocks = 0; const atimeMs = this.stats.mtimeMs; const birthtimeMs = this.stats.mtimeMs; const ctimeMs = this.stats.mtimeMs; const mtimeMs = this.stats.mtimeMs; const atime = new Date(atimeMs); const birthtime = new Date(birthtimeMs); const ctime = new Date(ctimeMs); const mtime = new Date(mtimeMs); const mode = constants_1.S_IFDIR | 0o755; const crc = 0; const statInstance = Object.assign(new statUtils.StatEntry(), { uid, gid, size, blksize, blocks, atime, birthtime, ctime, mtime, atimeMs, birthtimeMs, ctimeMs, mtimeMs, mode, crc }); return opts.bigint === true ? statUtils.convertToBigIntStats(statInstance) : statInstance; } throw new Error(`Unreachable`); } getUnixMode(index, defaultMode) { const rc = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; if (opsys !== this.libzip.ZIP_OPSYS_UNIX) return defaultMode; return this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; } registerListing(p) { let listing = this.listings.get(p); if (listing) return listing; const parentListing = this.registerListing(path_1.ppath.dirname(p)); listing = new Set(); parentListing.add(path_1.ppath.basename(p)); this.listings.set(p, listing); return listing; } registerEntry(p, index) { const parentListing = this.registerListing(path_1.ppath.dirname(p)); parentListing.add(path_1.ppath.basename(p)); this.entries.set(p, index); } unregisterListing(p) { this.listings.delete(p); const parentListing = this.listings.get(path_1.ppath.dirname(p)); parentListing === null || parentListing === void 0 ? void 0 : parentListing.delete(path_1.ppath.basename(p)); } unregisterEntry(p) { this.unregisterListing(p); const entry = this.entries.get(p); this.entries.delete(p); if (typeof entry === `undefined`) return; this.fileSources.delete(entry); if (this.isSymbolicLink(entry)) { this.symlinkCount--; } } deleteEntry(p, index) { this.unregisterEntry(p); const rc = this.libzip.delete(this.zip, index); if (rc === -1) { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } resolveFilename(reason, p, resolveLastComponent = true) { if (!this.ready) throw errors.EBUSY(`archive closed, ${reason}`); let resolvedP = path_1.ppath.resolve(path_1.PortablePath.root, p); if (resolvedP === `/`) return path_1.PortablePath.root; const fileIndex = this.entries.get(resolvedP); if (resolveLastComponent && fileIndex !== undefined) { if (this.symlinkCount !== 0 && this.isSymbolicLink(fileIndex)) { const target = this.getFileSource(fileIndex).toString(); return this.resolveFilename(reason, path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target), true); } else { return resolvedP; } } while (true) { const parentP = this.resolveFilename(reason, path_1.ppath.dirname(resolvedP), true); const isDir = this.listings.has(parentP); const doesExist = this.entries.has(parentP); if (!isDir && !doesExist) throw errors.ENOENT(reason); if (!isDir) throw errors.ENOTDIR(reason); resolvedP = path_1.ppath.resolve(parentP, path_1.ppath.basename(resolvedP)); if (!resolveLastComponent || this.symlinkCount === 0) break; const index = this.libzip.name.locate(this.zip, resolvedP.slice(1)); if (index === -1) break; if (this.isSymbolicLink(index)) { const target = this.getFileSource(index).toString(); resolvedP = path_1.ppath.resolve(path_1.ppath.dirname(resolvedP), target); } else { break; } } return resolvedP; } allocateBuffer(content) { if (!Buffer.isBuffer(content)) content = Buffer.from(content); const buffer = this.libzip.malloc(content.byteLength); if (!buffer) throw new Error(`Couldn't allocate enough memory`); // Copy the file into the Emscripten heap const heap = new Uint8Array(this.libzip.HEAPU8.buffer, buffer, content.byteLength); heap.set(content); return { buffer, byteLength: content.byteLength }; } allocateUnattachedSource(content) { const error = this.libzip.struct.errorS(); const { buffer, byteLength } = this.allocateBuffer(content); const source = this.libzip.source.fromUnattachedBuffer(buffer, byteLength, 0, true, error); if (source === 0) { this.libzip.free(error); throw this.makeLibzipError(error); } return source; } allocateSource(content) { const { buffer, byteLength } = this.allocateBuffer(content); const source = this.libzip.source.fromBuffer(this.zip, buffer, byteLength, 0, true); if (source === 0) { this.libzip.free(buffer); throw this.makeLibzipError(this.libzip.getError(this.zip)); } return source; } setFileSource(p, content) { const buffer = Buffer.isBuffer(content) ? content : Buffer.from(content); const target = path_1.ppath.relative(path_1.PortablePath.root, p); const lzSource = this.allocateSource(content); try { const newIndex = this.libzip.file.add(this.zip, target, lzSource, this.libzip.ZIP_FL_OVERWRITE); if (newIndex === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); if (this.level !== `mixed`) { // Use store for level 0, and deflate for 1..9 let method; if (this.level === 0) method = this.libzip.ZIP_CM_STORE; else method = this.libzip.ZIP_CM_DEFLATE; const rc = this.libzip.file.setCompression(this.zip, newIndex, 0, method, this.level); if (rc === -1) { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } this.fileSources.set(newIndex, buffer); return newIndex; } catch (error) { this.libzip.source.free(lzSource); throw error; } } isSymbolicLink(index) { if (this.symlinkCount === 0) return false; const attrs = this.libzip.file.getExternalAttributes(this.zip, index, 0, 0, this.libzip.uint08S, this.libzip.uint32S); if (attrs === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); const opsys = this.libzip.getValue(this.libzip.uint08S, `i8`) >>> 0; if (opsys !== this.libzip.ZIP_OPSYS_UNIX) return false; const attributes = this.libzip.getValue(this.libzip.uint32S, `i32`) >>> 16; return (attributes & constants_1.S_IFMT) === constants_1.S_IFLNK; } getFileSource(index, opts = { asyncDecompress: false }) { const cachedFileSource = this.fileSources.get(index); if (typeof cachedFileSource !== `undefined`) return cachedFileSource; const stat = this.libzip.struct.statS(); const rc = this.libzip.statIndex(this.zip, index, 0, 0, stat); if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); const size = this.libzip.struct.statCompSize(stat); const compressionMethod = this.libzip.struct.statCompMethod(stat); const buffer = this.libzip.malloc(size); try { const file = this.libzip.fopenIndex(this.zip, index, 0, this.libzip.ZIP_FL_COMPRESSED); if (file === 0) throw this.makeLibzipError(this.libzip.getError(this.zip)); try { const rc = this.libzip.fread(file, buffer, size, 0); if (rc === -1) throw this.makeLibzipError(this.libzip.file.getError(file)); else if (rc < size) throw new Error(`Incomplete read`); else if (rc > size) throw new Error(`Overread`); const memory = this.libzip.HEAPU8.subarray(buffer, buffer + size); const data = Buffer.from(memory); if (compressionMethod === 0) { this.fileSources.set(index, data); return data; } else if (opts.asyncDecompress) { return new Promise((resolve, reject) => { zlib_1.default.inflateRaw(data, (error, result) => { if (error) { reject(error); } else { this.fileSources.set(index, result); resolve(result); } }); }); } else { const decompressedData = zlib_1.default.inflateRawSync(data); this.fileSources.set(index, decompressedData); return decompressedData; } } finally { this.libzip.fclose(file); } } finally { this.libzip.free(buffer); } } async chmodPromise(p, mask) { return this.chmodSync(p, mask); } chmodSync(p, mask) { if (this.readOnly) throw errors.EROFS(`chmod '${p}'`); // We don't allow to make the extracted entries group-writable mask &= 0o755; const resolvedP = this.resolveFilename(`chmod '${p}'`, p, false); const entry = this.entries.get(resolvedP); if (typeof entry === `undefined`) throw new Error(`Assertion failed: The entry should have been registered (${resolvedP})`); const oldMod = this.getUnixMode(entry, constants_1.S_IFREG | 0o000); const newMod = oldMod & (~0o777) | mask; const rc = this.libzip.file.setExternalAttributes(this.zip, entry, 0, 0, this.libzip.ZIP_OPSYS_UNIX, newMod << 16); if (rc === -1) { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } async chownPromise(p, uid, gid) { return this.chownSync(p, uid, gid); } chownSync(p, uid, gid) { throw new Error(`Unimplemented`); } async renamePromise(oldP, newP) { return this.renameSync(oldP, newP); } renameSync(oldP, newP) { throw new Error(`Unimplemented`); } async copyFilePromise(sourceP, destP, flags) { const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); const source = await this.getFileSource(indexSource, { asyncDecompress: true }); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { this.registerEntry(resolvedDestP, newIndex); } } copyFileSync(sourceP, destP, flags = 0) { const { indexSource, indexDest, resolvedDestP } = this.prepareCopyFile(sourceP, destP, flags); const source = this.getFileSource(indexSource); const newIndex = this.setFileSource(resolvedDestP, source); if (newIndex !== indexDest) { this.registerEntry(resolvedDestP, newIndex); } } prepareCopyFile(sourceP, destP, flags = 0) { if (this.readOnly) throw errors.EROFS(`copyfile '${sourceP} -> '${destP}'`); if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) throw errors.ENOSYS(`unsupported clone operation`, `copyfile '${sourceP}' -> ${destP}'`); const resolvedSourceP = this.resolveFilename(`copyfile '${sourceP} -> ${destP}'`, sourceP); const indexSource = this.entries.get(resolvedSourceP); if (typeof indexSource === `undefined`) throw errors.EINVAL(`copyfile '${sourceP}' -> '${destP}'`); const resolvedDestP = this.resolveFilename(`copyfile '${sourceP}' -> ${destP}'`, destP); const indexDest = this.entries.get(resolvedDestP); if ((flags & (fs_1.constants.COPYFILE_EXCL | fs_1.constants.COPYFILE_FICLONE_FORCE)) !== 0 && typeof indexDest !== `undefined`) throw errors.EEXIST(`copyfile '${sourceP}' -> '${destP}'`); return { indexSource, resolvedDestP, indexDest, }; } async appendFilePromise(p, content, opts) { if (this.readOnly) throw errors.EROFS(`open '${p}'`); if (typeof opts === `undefined`) opts = { flag: `a` }; else if (typeof opts === `string`) opts = { flag: `a`, encoding: opts }; else if (typeof opts.flag === `undefined`) opts = { flag: `a`, ...opts }; return this.writeFilePromise(p, content, opts); } appendFileSync(p, content, opts = {}) { if (this.readOnly) throw errors.EROFS(`open '${p}'`); if (typeof opts === `undefined`) opts = { flag: `a` }; else if (typeof opts === `string`) opts = { flag: `a`, encoding: opts }; else if (typeof opts.flag === `undefined`) opts = { flag: `a`, ...opts }; return this.writeFileSync(p, content, opts); } async writeFilePromise(p, content, opts) { const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); if (index !== undefined && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) content = Buffer.concat([await this.getFileSource(index, { asyncDecompress: true }), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); if (newIndex !== index) { this.registerEntry(resolvedP, newIndex); } } writeFileSync(p, content, opts) { const { encoding, index, resolvedP } = this.prepareWriteFile(p, opts); if (index !== undefined && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); if (newIndex !== index) { this.registerEntry(resolvedP, newIndex); } } prepareWriteFile(p, opts) { if (typeof p !== `string`) throw errors.EBADF(`read`); if (this.readOnly) throw errors.EROFS(`open '${p}'`); const resolvedP = this.resolveFilename(`open '${p}'`, p); if (this.listings.has(resolvedP)) throw errors.EISDIR(`open '${p}'`); let encoding = null; if (typeof opts === `string`) encoding = opts; else if (typeof opts === `object` && opts.encoding) encoding = opts.encoding; const index = this.entries.get(resolvedP); return { encoding, resolvedP, index, }; } async unlinkPromise(p) { return this.unlinkSync(p); } unlinkSync(p) { if (this.readOnly) throw errors.EROFS(`unlink '${p}'`); const resolvedP = this.resolveFilename(`unlink '${p}'`, p); if (this.listings.has(resolvedP)) throw errors.EISDIR(`unlink '${p}'`); const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw errors.EINVAL(`unlink '${p}'`); this.deleteEntry(resolvedP, index); } async utimesPromise(p, atime, mtime) { return this.utimesSync(p, atime, mtime); } utimesSync(p, atime, mtime) { if (this.readOnly) throw errors.EROFS(`utimes '${p}'`); const resolvedP = this.resolveFilename(`utimes '${p}'`, p); this.utimesImpl(resolvedP, mtime); } async lutimesPromise(p, atime, mtime) { return this.lutimesSync(p, atime, mtime); } lutimesSync(p, atime, mtime) { if (this.readOnly) throw errors.EROFS(`lutimes '${p}'`); const resolvedP = this.resolveFilename(`utimes '${p}'`, p, false); this.utimesImpl(resolvedP, mtime); } utimesImpl(resolvedP, mtime) { if (this.listings.has(resolvedP)) if (!this.entries.has(resolvedP)) this.hydrateDirectory(resolvedP); const entry = this.entries.get(resolvedP); if (entry === undefined) throw new Error(`Unreachable`); const rc = this.libzip.file.setMtime(this.zip, entry, 0, toUnixTimestamp(mtime), 0); if (rc === -1) { throw this.makeLibzipError(this.libzip.getError(this.zip)); } } async mkdirPromise(p, opts) { return this.mkdirSync(p, opts); } mkdirSync(p, { mode = 0o755, recursive = false } = {}) { if (recursive) { this.mkdirpSync(p, { chmod: mode }); return; } if (this.readOnly) throw errors.EROFS(`mkdir '${p}'`); const resolvedP = this.resolveFilename(`mkdir '${p}'`, p); if (this.entries.has(resolvedP) || this.listings.has(resolvedP)) throw errors.EEXIST(`mkdir '${p}'`); this.hydrateDirectory(resolvedP); this.chmodSync(resolvedP, mode); } async rmdirPromise(p, opts) { return this.rmdirSync(p, opts); } rmdirSync(p, { recursive = false } = {}) { if (this.readOnly) throw errors.EROFS(`rmdir '${p}'`); if (recursive) { this.removeSync(p); return; } const resolvedP = this.resolveFilename(`rmdir '${p}'`, p); const directoryListing = this.listings.get(resolvedP); if (!directoryListing) throw errors.ENOTDIR(`rmdir '${p}'`); if (directoryListing.size > 0) throw errors.ENOTEMPTY(`rmdir '${p}'`); const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw errors.EINVAL(`rmdir '${p}'`); this.deleteEntry(p, index); } hydrateDirectory(resolvedP) { const index = this.libzip.dir.add(this.zip, path_1.ppath.relative(path_1.PortablePath.root, resolvedP)); if (index === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); this.registerListing(resolvedP); this.registerEntry(resolvedP, index); return index; } async linkPromise(existingP, newP) { return this.linkSync(existingP, newP); } linkSync(existingP, newP) { // Zip archives don't support hard links: // https://stackoverflow.com/questions/8859616/are-hard-links-possible-within-a-zip-archive throw errors.EOPNOTSUPP(`link '${existingP}' -> '${newP}'`); } async symlinkPromise(target, p) { return this.symlinkSync(target, p); } symlinkSync(target, p) { if (this.readOnly) throw errors.EROFS(`symlink '${target}' -> '${p}'`); const resolvedP = this.resolveFilename(`symlink '${target}' -> '${p}'`, p); if (this.listings.has(resolvedP)) throw errors.EISDIR(`symlink '${target}' -> '${p}'`); if (this.entries.has(resolvedP)) throw errors.EEXIST(`symlink '${target}' -> '${p}'`); const index = this.setFileSource(resolvedP, target); this.registerEntry(resolvedP, index); const rc = this.libzip.file.setExternalAttributes(this.zip, index, 0, 0, this.libzip.ZIP_OPSYS_UNIX, (constants_1.S_IFLNK | 0o777) << 16); if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); this.symlinkCount += 1; } async readFilePromise(p, encoding) { // This is messed up regarding the TS signatures if (typeof encoding === `object`) // @ts-expect-error encoding = encoding ? encoding.encoding : undefined; const data = await this.readFileBuffer(p, { asyncDecompress: true }); return encoding ? data.toString(encoding) : data; } readFileSync(p, encoding) { // This is messed up regarding the TS signatures if (typeof encoding === `object`) // @ts-expect-error encoding = encoding ? encoding.encoding : undefined; const data = this.readFileBuffer(p); return encoding ? data.toString(encoding) : data; } readFileBuffer(p, opts = { asyncDecompress: false }) { const resolvedP = this.resolveFilename(`open '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`open '${p}'`); // Ensures that the last component is a directory, if the user said so (even if it is we'll throw right after with EISDIR anyway) if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw errors.ENOTDIR(`open '${p}'`); if (this.listings.has(resolvedP)) throw errors.EISDIR(`read`); const entry = this.entries.get(resolvedP); if (entry === undefined) throw new Error(`Unreachable`); return this.getFileSource(entry, opts); } async readdirPromise(p, opts) { return this.readdirSync(p, opts); } readdirSync(p, opts) { const resolvedP = this.resolveFilename(`scandir '${p}'`, p); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`scandir '${p}'`); const directoryListing = this.listings.get(resolvedP); if (!directoryListing) throw errors.ENOTDIR(`scandir '${p}'`); const entries = [...directoryListing]; if (!(opts === null || opts === void 0 ? void 0 : opts.withFileTypes)) return entries; return entries.map(name => { return Object.assign(this.statImpl(`lstat`, path_1.ppath.join(p, name)), { name, }); }); } async readlinkPromise(p) { const entry = this.prepareReadlink(p); return (await this.getFileSource(entry, { asyncDecompress: true })).toString(); } readlinkSync(p) { const entry = this.prepareReadlink(p); return this.getFileSource(entry).toString(); } prepareReadlink(p) { const resolvedP = this.resolveFilename(`readlink '${p}'`, p, false); if (!this.entries.has(resolvedP) && !this.listings.has(resolvedP)) throw errors.ENOENT(`readlink '${p}'`); // Ensure that the last component is a directory (if it is we'll throw right after with EISDIR anyway) if (p[p.length - 1] === `/` && !this.listings.has(resolvedP)) throw errors.ENOTDIR(`open '${p}'`); if (this.listings.has(resolvedP)) throw errors.EINVAL(`readlink '${p}'`); const entry = this.entries.get(resolvedP); if (entry === undefined) throw new Error(`Unreachable`); if (!this.isSymbolicLink(entry)) throw errors.EINVAL(`readlink '${p}'`); return entry; } async truncatePromise(p, len = 0) { const resolvedP = this.resolveFilename(`open '${p}'`, p); const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw errors.EINVAL(`open '${p}'`); const source = await this.getFileSource(index, { asyncDecompress: true }); const truncated = Buffer.alloc(len, 0x00); source.copy(truncated); return await this.writeFilePromise(p, truncated); } truncateSync(p, len = 0) { const resolvedP = this.resolveFilename(`open '${p}'`, p); const index = this.entries.get(resolvedP); if (typeof index === `undefined`) throw errors.EINVAL(`open '${p}'`); const source = this.getFileSource(index); const truncated = Buffer.alloc(len, 0x00); source.copy(truncated); return this.writeFileSync(p, truncated); } watch(p, a, b) { let persistent; switch (typeof a) { case `function`: case `string`: case `undefined`: { persistent = true; } break; default: { ({ persistent = true } = a); } break; } if (!persistent) return { on: () => { }, close: () => { } }; const interval = setInterval(() => { }, 24 * 60 * 60 * 1000); return { on: () => { }, close: () => { clearInterval(interval); } }; } watchFile(p, a, b) { const resolvedP = this.resolveFilename(`open '${p}'`, p); return watchFile_1.watchFile(this, resolvedP, a, b); } unwatchFile(p, cb) { const resolvedP = this.resolveFilename(`open '${p}'`, p); return watchFile_1.unwatchFile(this, resolvedP, cb); } } exports.ZipFS = ZipFS; /***/ }), /***/ 32031: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ZipOpenFS = exports.getArchivePart = void 0; const tslib_1 = __webpack_require__(70655); const fs_1 = __webpack_require__(35747); const FakeFS_1 = __webpack_require__(86936); const NodeFS_1 = __webpack_require__(78633); const ZipFS_1 = __webpack_require__(56970); const watchFile_1 = __webpack_require__(38242); const errors = tslib_1.__importStar(__webpack_require__(15004)); const path_1 = __webpack_require__(7194); const ZIP_FD = 0x80000000; const DOT_ZIP = `.zip`; /** * Extracts the archive part (ending in the first `.zip`) from a path. * * The indexOf-based implementation is ~3.7x faster than a RegExp-based implementation. */ const getArchivePart = (path) => { let idx = path.indexOf(DOT_ZIP); if (idx <= 0) return null; let nextCharIdx = idx; while (idx >= 0) { nextCharIdx = idx + DOT_ZIP.length; if (path[nextCharIdx] === path_1.ppath.sep) break; // Disallow files named ".zip" if (path[idx - 1] === path_1.ppath.sep) return null; idx = path.indexOf(DOT_ZIP, nextCharIdx); } // The path either has to end in ".zip" or contain an archive subpath (".zip/...") if (path.length > nextCharIdx && path[nextCharIdx] !== path_1.ppath.sep) return null; return path.slice(0, nextCharIdx); }; exports.getArchivePart = getArchivePart; class ZipOpenFS extends FakeFS_1.BasePortableFakeFS { constructor({ libzip, baseFs = new NodeFS_1.NodeFS(), filter = null, maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, maxAge = 5000 }) { super(); this.fdMap = new Map(); this.nextFd = 3; this.isZip = new Set(); this.notZip = new Set(); this.realPaths = new Map(); this.limitOpenFilesTimeout = null; this.libzipFactory = typeof libzip !== `function` ? () => libzip : libzip; this.baseFs = baseFs; this.zipInstances = useCache ? new Map() : null; this.filter = filter; this.maxOpenFiles = maxOpenFiles; this.readOnlyArchives = readOnlyArchives; this.maxAge = maxAge; } static async openPromise(fn, opts) { const zipOpenFs = new ZipOpenFS(opts); try { return await fn(zipOpenFs); } finally { zipOpenFs.saveAndClose(); } } get libzip() { if (typeof this.libzipInstance === `undefined`) this.libzipInstance = this.libzipFactory(); return this.libzipInstance; } getExtractHint(hints) { return this.baseFs.getExtractHint(hints); } getRealPath() { return this.baseFs.getRealPath(); } saveAndClose() { watchFile_1.unwatchAllFiles(this); if (this.zipInstances) { for (const [path, { zipFs }] of this.zipInstances.entries()) { zipFs.saveAndClose(); this.zipInstances.delete(path); } } } discardAndClose() { watchFile_1.unwatchAllFiles(this); if (this.zipInstances) { for (const [path, { zipFs }] of this.zipInstances.entries()) { zipFs.discardAndClose(); this.zipInstances.delete(path); } } } resolve(p) { return this.baseFs.resolve(p); } remapFd(zipFs, fd) { const remappedFd = this.nextFd++ | ZIP_FD; this.fdMap.set(remappedFd, [zipFs, fd]); return remappedFd; } async openPromise(p, flags, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.openPromise(p, flags, mode); }, async (zipFs, { subPath }) => { return this.remapFd(zipFs, await zipFs.openPromise(subPath, flags, mode)); }); } openSync(p, flags, mode) { return this.makeCallSync(p, () => { return this.baseFs.openSync(p, flags, mode); }, (zipFs, { subPath }) => { return this.remapFd(zipFs, zipFs.openSync(subPath, flags, mode)); }); } async opendirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.opendirPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.opendirPromise(subPath, opts); }, { requireSubpath: false, }); } opendirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.opendirSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.opendirSync(subPath, opts); }, { requireSubpath: false, }); } async readPromise(fd, buffer, offset, length, position) { if ((fd & ZIP_FD) === 0) return await this.baseFs.readPromise(fd, buffer, offset, length, position); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`read`); const [zipFs, realFd] = entry; return await zipFs.readPromise(realFd, buffer, offset, length, position); } readSync(fd, buffer, offset, length, position) { if ((fd & ZIP_FD) === 0) return this.baseFs.readSync(fd, buffer, offset, length, position); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`readSync`); const [zipFs, realFd] = entry; return zipFs.readSync(realFd, buffer, offset, length, position); } async writePromise(fd, buffer, offset, length, position) { if ((fd & ZIP_FD) === 0) { if (typeof buffer === `string`) { return await this.baseFs.writePromise(fd, buffer, offset); } else { return await this.baseFs.writePromise(fd, buffer, offset, length, position); } } const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`write`); const [zipFs, realFd] = entry; if (typeof buffer === `string`) { return await zipFs.writePromise(realFd, buffer, offset); } else { return await zipFs.writePromise(realFd, buffer, offset, length, position); } } writeSync(fd, buffer, offset, length, position) { if ((fd & ZIP_FD) === 0) { if (typeof buffer === `string`) { return this.baseFs.writeSync(fd, buffer, offset); } else { return this.baseFs.writeSync(fd, buffer, offset, length, position); } } const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`writeSync`); const [zipFs, realFd] = entry; if (typeof buffer === `string`) { return zipFs.writeSync(realFd, buffer, offset); } else { return zipFs.writeSync(realFd, buffer, offset, length, position); } } async closePromise(fd) { if ((fd & ZIP_FD) === 0) return await this.baseFs.closePromise(fd); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`close`); this.fdMap.delete(fd); const [zipFs, realFd] = entry; return await zipFs.closePromise(realFd); } closeSync(fd) { if ((fd & ZIP_FD) === 0) return this.baseFs.closeSync(fd); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`closeSync`); this.fdMap.delete(fd); const [zipFs, realFd] = entry; return zipFs.closeSync(realFd); } createReadStream(p, opts) { if (p === null) return this.baseFs.createReadStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createReadStream(p, opts); }, (zipFs, { subPath }) => { return zipFs.createReadStream(subPath, opts); }); } createWriteStream(p, opts) { if (p === null) return this.baseFs.createWriteStream(p, opts); return this.makeCallSync(p, () => { return this.baseFs.createWriteStream(p, opts); }, (zipFs, { subPath }) => { return zipFs.createWriteStream(subPath, opts); }); } async realpathPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.realpathPromise(p); }, async (zipFs, { archivePath, subPath }) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = await this.baseFs.realpathPromise(archivePath); this.realPaths.set(archivePath, realArchivePath); } return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, await zipFs.realpathPromise(subPath))); }); } realpathSync(p) { return this.makeCallSync(p, () => { return this.baseFs.realpathSync(p); }, (zipFs, { archivePath, subPath }) => { let realArchivePath = this.realPaths.get(archivePath); if (typeof realArchivePath === `undefined`) { realArchivePath = this.baseFs.realpathSync(archivePath); this.realPaths.set(archivePath, realArchivePath); } return this.pathUtils.join(realArchivePath, this.pathUtils.relative(path_1.PortablePath.root, zipFs.realpathSync(subPath))); }); } async existsPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.existsPromise(p); }, async (zipFs, { subPath }) => { return await zipFs.existsPromise(subPath); }); } existsSync(p) { return this.makeCallSync(p, () => { return this.baseFs.existsSync(p); }, (zipFs, { subPath }) => { return zipFs.existsSync(subPath); }); } async accessPromise(p, mode) { return await this.makeCallPromise(p, async () => { return await this.baseFs.accessPromise(p, mode); }, async (zipFs, { subPath }) => { return await zipFs.accessPromise(subPath, mode); }); } accessSync(p, mode) { return this.makeCallSync(p, () => { return this.baseFs.accessSync(p, mode); }, (zipFs, { subPath }) => { return zipFs.accessSync(subPath, mode); }); } async statPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.statPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.statPromise(subPath, opts); }); } statSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.statSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.statSync(subPath, opts); }); } async fstatPromise(fd, opts) { if ((fd & ZIP_FD) === 0) return this.baseFs.fstatPromise(fd, opts); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`fstat`); const [zipFs, realFd] = entry; return zipFs.fstatPromise(realFd, opts); } fstatSync(fd, opts) { if ((fd & ZIP_FD) === 0) return this.baseFs.fstatSync(fd, opts); const entry = this.fdMap.get(fd); if (typeof entry === `undefined`) throw errors.EBADF(`fstatSync`); const [zipFs, realFd] = entry; return zipFs.fstatSync(realFd, opts); } async lstatPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.lstatPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.lstatPromise(subPath, opts); }); } lstatSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.lstatSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.lstatSync(subPath, opts); }); } async chmodPromise(p, mask) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chmodPromise(p, mask); }, async (zipFs, { subPath }) => { return await zipFs.chmodPromise(subPath, mask); }); } chmodSync(p, mask) { return this.makeCallSync(p, () => { return this.baseFs.chmodSync(p, mask); }, (zipFs, { subPath }) => { return zipFs.chmodSync(subPath, mask); }); } async chownPromise(p, uid, gid) { return await this.makeCallPromise(p, async () => { return await this.baseFs.chownPromise(p, uid, gid); }, async (zipFs, { subPath }) => { return await zipFs.chownPromise(subPath, uid, gid); }); } chownSync(p, uid, gid) { return this.makeCallSync(p, () => { return this.baseFs.chownSync(p, uid, gid); }, (zipFs, { subPath }) => { return zipFs.chownSync(subPath, uid, gid); }); } async renamePromise(oldP, newP) { return await this.makeCallPromise(oldP, async () => { return await this.makeCallPromise(newP, async () => { return await this.baseFs.renamePromise(oldP, newP); }, async () => { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }); }, async (zipFsO, { subPath: subPathO }) => { return await this.makeCallPromise(newP, async () => { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }, async (zipFsN, { subPath: subPathN }) => { if (zipFsO !== zipFsN) { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); } else { return await zipFsO.renamePromise(subPathO, subPathN); } }); }); } renameSync(oldP, newP) { return this.makeCallSync(oldP, () => { return this.makeCallSync(newP, () => { return this.baseFs.renameSync(oldP, newP); }, async () => { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }); }, (zipFsO, { subPath: subPathO }) => { return this.makeCallSync(newP, () => { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); }, (zipFsN, { subPath: subPathN }) => { if (zipFsO !== zipFsN) { throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`), { code: `EEXDEV` }); } else { return zipFsO.renameSync(subPathO, subPathN); } }); }); } async copyFilePromise(sourceP, destP, flags = 0) { const fallback = async (sourceFs, sourceP, destFs, destP) => { if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP}' -> ${destP}'`), { code: `EXDEV` }); if ((flags & fs_1.constants.COPYFILE_EXCL) && await this.existsPromise(sourceP)) throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP}' -> '${destP}'`), { code: `EEXIST` }); let content; try { content = await sourceFs.readFilePromise(sourceP); } catch (error) { throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP}' -> '${destP}'`), { code: `EINVAL` }); } await destFs.writeFilePromise(destP, content); }; return await this.makeCallPromise(sourceP, async () => { return await this.makeCallPromise(destP, async () => { return await this.baseFs.copyFilePromise(sourceP, destP, flags); }, async (zipFsD, { subPath: subPathD }) => { return await fallback(this.baseFs, sourceP, zipFsD, subPathD); }); }, async (zipFsS, { subPath: subPathS }) => { return await this.makeCallPromise(destP, async () => { return await fallback(zipFsS, subPathS, this.baseFs, destP); }, async (zipFsD, { subPath: subPathD }) => { if (zipFsS !== zipFsD) { return await fallback(zipFsS, subPathS, zipFsD, subPathD); } else { return await zipFsS.copyFilePromise(subPathS, subPathD, flags); } }); }); } copyFileSync(sourceP, destP, flags = 0) { const fallback = (sourceFs, sourceP, destFs, destP) => { if ((flags & fs_1.constants.COPYFILE_FICLONE_FORCE) !== 0) throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP}' -> ${destP}'`), { code: `EXDEV` }); if ((flags & fs_1.constants.COPYFILE_EXCL) && this.existsSync(sourceP)) throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP}' -> '${destP}'`), { code: `EEXIST` }); let content; try { content = sourceFs.readFileSync(sourceP); } catch (error) { throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP}' -> '${destP}'`), { code: `EINVAL` }); } destFs.writeFileSync(destP, content); }; return this.makeCallSync(sourceP, () => { return this.makeCallSync(destP, () => { return this.baseFs.copyFileSync(sourceP, destP, flags); }, (zipFsD, { subPath: subPathD }) => { return fallback(this.baseFs, sourceP, zipFsD, subPathD); }); }, (zipFsS, { subPath: subPathS }) => { return this.makeCallSync(destP, () => { return fallback(zipFsS, subPathS, this.baseFs, destP); }, (zipFsD, { subPath: subPathD }) => { if (zipFsS !== zipFsD) { return fallback(zipFsS, subPathS, zipFsD, subPathD); } else { return zipFsS.copyFileSync(subPathS, subPathD, flags); } }); }); } async appendFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.appendFilePromise(p, content, opts); }, async (zipFs, { subPath }) => { return await zipFs.appendFilePromise(subPath, content, opts); }); } appendFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.appendFileSync(p, content, opts); }, (zipFs, { subPath }) => { return zipFs.appendFileSync(subPath, content, opts); }); } async writeFilePromise(p, content, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.writeFilePromise(p, content, opts); }, async (zipFs, { subPath }) => { return await zipFs.writeFilePromise(subPath, content, opts); }); } writeFileSync(p, content, opts) { return this.makeCallSync(p, () => { return this.baseFs.writeFileSync(p, content, opts); }, (zipFs, { subPath }) => { return zipFs.writeFileSync(subPath, content, opts); }); } async unlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.unlinkPromise(p); }, async (zipFs, { subPath }) => { return await zipFs.unlinkPromise(subPath); }); } unlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.unlinkSync(p); }, (zipFs, { subPath }) => { return zipFs.unlinkSync(subPath); }); } async utimesPromise(p, atime, mtime) { return await this.makeCallPromise(p, async () => { return await this.baseFs.utimesPromise(p, atime, mtime); }, async (zipFs, { subPath }) => { return await zipFs.utimesPromise(subPath, atime, mtime); }); } utimesSync(p, atime, mtime) { return this.makeCallSync(p, () => { return this.baseFs.utimesSync(p, atime, mtime); }, (zipFs, { subPath }) => { return zipFs.utimesSync(subPath, atime, mtime); }); } async mkdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.mkdirPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.mkdirPromise(subPath, opts); }); } mkdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.mkdirSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.mkdirSync(subPath, opts); }); } async rmdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.rmdirPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.rmdirPromise(subPath, opts); }); } rmdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.rmdirSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.rmdirSync(subPath, opts); }); } async linkPromise(existingP, newP) { return await this.makeCallPromise(newP, async () => { return await this.baseFs.linkPromise(existingP, newP); }, async (zipFs, { subPath }) => { return await zipFs.linkPromise(existingP, subPath); }); } linkSync(existingP, newP) { return this.makeCallSync(newP, () => { return this.baseFs.linkSync(existingP, newP); }, (zipFs, { subPath }) => { return zipFs.linkSync(existingP, subPath); }); } async symlinkPromise(target, p, type) { return await this.makeCallPromise(p, async () => { return await this.baseFs.symlinkPromise(target, p, type); }, async (zipFs, { subPath }) => { return await zipFs.symlinkPromise(target, subPath); }); } symlinkSync(target, p, type) { return this.makeCallSync(p, () => { return this.baseFs.symlinkSync(target, p, type); }, (zipFs, { subPath }) => { return zipFs.symlinkSync(target, subPath); }); } async readFilePromise(p, encoding) { return this.makeCallPromise(p, async () => { // This weird switch is required to tell TypeScript that the signatures are proper (otherwise it thinks that only the generic one is covered) switch (encoding) { case `utf8`: return await this.baseFs.readFilePromise(p, encoding); default: return await this.baseFs.readFilePromise(p, encoding); } }, async (zipFs, { subPath }) => { return await zipFs.readFilePromise(subPath, encoding); }); } readFileSync(p, encoding) { return this.makeCallSync(p, () => { // This weird switch is required to tell TypeScript that the signatures are proper (otherwise it thinks that only the generic one is covered) switch (encoding) { case `utf8`: return this.baseFs.readFileSync(p, encoding); default: return this.baseFs.readFileSync(p, encoding); } }, (zipFs, { subPath }) => { return zipFs.readFileSync(subPath, encoding); }); } async readdirPromise(p, opts) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readdirPromise(p, opts); }, async (zipFs, { subPath }) => { return await zipFs.readdirPromise(subPath, opts); }, { requireSubpath: false, }); } readdirSync(p, opts) { return this.makeCallSync(p, () => { return this.baseFs.readdirSync(p, opts); }, (zipFs, { subPath }) => { return zipFs.readdirSync(subPath, opts); }, { requireSubpath: false, }); } async readlinkPromise(p) { return await this.makeCallPromise(p, async () => { return await this.baseFs.readlinkPromise(p); }, async (zipFs, { subPath }) => { return await zipFs.readlinkPromise(subPath); }); } readlinkSync(p) { return this.makeCallSync(p, () => { return this.baseFs.readlinkSync(p); }, (zipFs, { subPath }) => { return zipFs.readlinkSync(subPath); }); } async truncatePromise(p, len) { return await this.makeCallPromise(p, async () => { return await this.baseFs.truncatePromise(p, len); }, async (zipFs, { subPath }) => { return await zipFs.truncatePromise(subPath, len); }); } truncateSync(p, len) { return this.makeCallSync(p, () => { return this.baseFs.truncateSync(p, len); }, (zipFs, { subPath }) => { return zipFs.truncateSync(subPath, len); }); } watch(p, a, b) { return this.makeCallSync(p, () => { return this.baseFs.watch(p, // @ts-expect-error a, b); }, (zipFs, { subPath }) => { return zipFs.watch(subPath, // @ts-expect-error a, b); }); } watchFile(p, a, b) { return this.makeCallSync(p, () => { return this.baseFs.watchFile(p, // @ts-expect-error a, b); }, () => { return watchFile_1.watchFile(this, p, a, b); }); } unwatchFile(p, cb) { return this.makeCallSync(p, () => { return this.baseFs.unwatchFile(p, cb); }, () => { return watchFile_1.unwatchFile(this, p, cb); }); } async makeCallPromise(p, discard, accept, { requireSubpath = true } = {}) { if (typeof p !== `string`) return await discard(); const normalizedP = this.resolve(p); const zipInfo = this.findZip(normalizedP); if (!zipInfo) return await discard(); if (requireSubpath && zipInfo.subPath === `/`) return await discard(); return await this.getZipPromise(zipInfo.archivePath, async (zipFs) => await accept(zipFs, zipInfo)); } makeCallSync(p, discard, accept, { requireSubpath = true } = {}) { if (typeof p !== `string`) return discard(); const normalizedP = this.resolve(p); const zipInfo = this.findZip(normalizedP); if (!zipInfo) return discard(); if (requireSubpath && zipInfo.subPath === `/`) return discard(); return this.getZipSync(zipInfo.archivePath, zipFs => accept(zipFs, zipInfo)); } findZip(p) { if (this.filter && !this.filter.test(p)) return null; let filePath = ``; while (true) { const archivePart = exports.getArchivePart(p.substr(filePath.length)); if (!archivePart) return null; filePath = this.pathUtils.join(filePath, archivePart); if (this.isZip.has(filePath) === false) { if (this.notZip.has(filePath)) continue; try { if (!this.baseFs.lstatSync(filePath).isFile()) { this.notZip.add(filePath); continue; } } catch (_a) { return null; } this.isZip.add(filePath); } return { archivePath: filePath, subPath: this.pathUtils.join(path_1.PortablePath.root, p.substr(filePath.length)), }; } } limitOpenFiles(max) { if (this.zipInstances === null) return; const now = Date.now(); let nextExpiresAt = now + this.maxAge; let closeCount = max === null ? 0 : this.zipInstances.size - max; for (const [path, { zipFs, expiresAt, refCount }] of this.zipInstances.entries()) { if (refCount !== 0 || zipFs.hasOpenFileHandles()) { continue; } else if (now >= expiresAt) { zipFs.saveAndClose(); this.zipInstances.delete(path); closeCount -= 1; continue; } else if (max === null || closeCount <= 0) { nextExpiresAt = expiresAt; break; } zipFs.saveAndClose(); this.zipInstances.delete(path); closeCount -= 1; } if (this.limitOpenFilesTimeout === null && ((max === null && this.zipInstances.size > 0) || max !== null)) { this.limitOpenFilesTimeout = setTimeout(() => { this.limitOpenFilesTimeout = null; this.limitOpenFiles(null); }, nextExpiresAt - now).unref(); } } async getZipPromise(p, accept) { const getZipOptions = async () => ({ baseFs: this.baseFs, libzip: this.libzip, readOnly: this.readOnlyArchives, stats: await this.baseFs.statPromise(p), }); if (this.zipInstances) { let cachedZipFs = this.zipInstances.get(p); if (!cachedZipFs) { const zipOptions = await getZipOptions(); // We need to recheck because concurrent getZipPromise calls may // have instantiated the zip archive while we were waiting cachedZipFs = this.zipInstances.get(p); if (!cachedZipFs) { cachedZipFs = { zipFs: new ZipFS_1.ZipFS(p, zipOptions), expiresAt: 0, refCount: 0, }; } } // Removing then re-adding the field allows us to easily implement // a basic LRU garbage collection strategy this.zipInstances.delete(p); this.limitOpenFiles(this.maxOpenFiles - 1); this.zipInstances.set(p, cachedZipFs); cachedZipFs.expiresAt = Date.now() + this.maxAge; cachedZipFs.refCount += 1; try { return await accept(cachedZipFs.zipFs); } finally { cachedZipFs.refCount -= 1; } } else { const zipFs = new ZipFS_1.ZipFS(p, await getZipOptions()); try { return await accept(zipFs); } finally { zipFs.saveAndClose(); } } } getZipSync(p, accept) { const getZipOptions = () => ({ baseFs: this.baseFs, libzip: this.libzip, readOnly: this.readOnlyArchives, stats: this.baseFs.statSync(p), }); if (this.zipInstances) { let cachedZipFs = this.zipInstances.get(p); if (!cachedZipFs) { cachedZipFs = { zipFs: new ZipFS_1.ZipFS(p, getZipOptions()), expiresAt: 0, refCount: 0, }; } // Removing then re-adding the field allows us to easily implement // a basic LRU garbage collection strategy this.zipInstances.delete(p); this.limitOpenFiles(this.maxOpenFiles - 1); this.zipInstances.set(p, cachedZipFs); cachedZipFs.expiresAt = Date.now() + this.maxAge; return accept(cachedZipFs.zipFs); } else { const zipFs = new ZipFS_1.ZipFS(p, getZipOptions()); try { return accept(zipFs); } finally { zipFs.saveAndClose(); } } } } exports.ZipOpenFS = ZipOpenFS; /***/ }), /***/ 9867: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.copyPromise = exports.LinkStrategy = void 0; const tslib_1 = __webpack_require__(70655); const fs_1 = tslib_1.__importDefault(__webpack_require__(35747)); const path_1 = __webpack_require__(7194); // 1980-01-01, like Fedora const defaultTime = new Date(315532800 * 1000); var LinkStrategy; (function (LinkStrategy) { LinkStrategy["Allow"] = "allow"; LinkStrategy["ReadOnly"] = "readOnly"; })(LinkStrategy = exports.LinkStrategy || (exports.LinkStrategy = {})); async function copyPromise(destinationFs, destination, sourceFs, source, opts) { const normalizedDestination = destinationFs.pathUtils.normalize(destination); const normalizedSource = sourceFs.pathUtils.normalize(source); const prelayout = []; const postlayout = []; await destinationFs.mkdirPromise(destinationFs.pathUtils.dirname(destination), { recursive: true }); const updateTime = typeof destinationFs.lutimesPromise === `function` ? destinationFs.lutimesPromise.bind(destinationFs) : destinationFs.utimesPromise.bind(destinationFs); await copyImpl(prelayout, postlayout, updateTime, destinationFs, normalizedDestination, sourceFs, normalizedSource, opts); for (const operation of prelayout) await operation(); await Promise.all(postlayout.map(operation => { return operation(); })); } exports.copyPromise = copyPromise; async function copyImpl(prelayout, postlayout, updateTime, destinationFs, destination, sourceFs, source, opts) { var _a, _b; const destinationStat = await maybeLStat(destinationFs, destination); const sourceStat = await sourceFs.lstatPromise(source); const referenceTime = opts.stableTime ? { mtime: defaultTime, atime: defaultTime } : sourceStat; let updated; switch (true) { case sourceStat.isDirectory(): { updated = await copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); } break; case sourceStat.isFile(): { updated = await copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); } break; case sourceStat.isSymbolicLink(): { updated = await copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts); } break; default: { throw new Error(`Unsupported file type (${sourceStat.mode})`); } break; } if (updated || ((_a = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.mtime) === null || _a === void 0 ? void 0 : _a.getTime()) !== referenceTime.mtime.getTime() || ((_b = destinationStat === null || destinationStat === void 0 ? void 0 : destinationStat.atime) === null || _b === void 0 ? void 0 : _b.getTime()) !== referenceTime.atime.getTime()) { postlayout.push(() => updateTime(destination, referenceTime.atime, referenceTime.mtime)); updated = true; } if (destinationStat === null || (destinationStat.mode & 0o777) !== (sourceStat.mode & 0o777)) { postlayout.push(() => destinationFs.chmodPromise(destination, sourceStat.mode & 0o777)); updated = true; } return updated; } async function maybeLStat(baseFs, p) { try { return await baseFs.lstatPromise(p); } catch (e) { return null; } } async function copyFolder(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { if (destinationStat !== null && !destinationStat.isDirectory()) { if (opts.overwrite) { prelayout.push(async () => destinationFs.removePromise(destination)); destinationStat = null; } else { return false; } } let updated = false; if (destinationStat === null) { prelayout.push(async () => destinationFs.mkdirPromise(destination, { mode: sourceStat.mode })); updated = true; } const entries = await sourceFs.readdirPromise(source); if (opts.stableSort) { for (const entry of entries.sort()) { if (await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts)) { updated = true; } } } else { const entriesUpdateStatus = await Promise.all(entries.map(async (entry) => { await copyImpl(prelayout, postlayout, updateTime, destinationFs, destinationFs.pathUtils.join(destination, entry), sourceFs, sourceFs.pathUtils.join(source, entry), opts); })); if (entriesUpdateStatus.some(status => status)) { updated = true; } } return updated; } const isCloneSupportedCache = new WeakMap(); function makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { return async () => { await opFs.linkPromise(source, destination); if (linkStrategy === LinkStrategy.ReadOnly) { // We mutate the stat, otherwise it'll be reset by copyImpl sourceStat.mode &= ~0o222; await opFs.chmodPromise(destination, sourceStat.mode); } }; } function makeCloneLinkOperation(opFs, destination, source, sourceStat, linkStrategy) { const isCloneSupported = isCloneSupportedCache.get(opFs); if (typeof isCloneSupported === `undefined`) { return async () => { try { await opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); isCloneSupportedCache.set(opFs, true); } catch (err) { if (err.code === `ENOSYS` || err.code === `ENOTSUP`) { isCloneSupportedCache.set(opFs, false); await makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy)(); } else { throw err; } } }; } else { if (isCloneSupported) { return async () => opFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE_FORCE); } else { return makeLinkOperation(opFs, destination, source, sourceStat, linkStrategy); } } } async function copyFile(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { var _a; if (destinationStat !== null) { if (opts.overwrite) { prelayout.push(async () => destinationFs.removePromise(destination)); destinationStat = null; } else { return false; } } const linkStrategy = (_a = opts.linkStrategy) !== null && _a !== void 0 ? _a : null; const op = destinationFs === sourceFs ? linkStrategy !== null ? makeCloneLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.copyFilePromise(source, destination, fs_1.default.constants.COPYFILE_FICLONE) : linkStrategy !== null ? makeLinkOperation(destinationFs, destination, source, sourceStat, linkStrategy) : async () => destinationFs.writeFilePromise(destination, await sourceFs.readFilePromise(source)); prelayout.push(async () => op()); return true; } async function copySymlink(prelayout, postlayout, updateTime, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) { if (destinationStat !== null) { if (opts.overwrite) { prelayout.push(async () => destinationFs.removePromise(destination)); destinationStat = null; } else { return false; } } prelayout.push(async () => { await destinationFs.symlinkPromise(path_1.convertPath(destinationFs.pathUtils, await sourceFs.readlinkPromise(source)), destination); }); return true; } /***/ }), /***/ 74694: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.opendir = exports.CustomDir = void 0; const tslib_1 = __webpack_require__(70655); const errors = tslib_1.__importStar(__webpack_require__(15004)); class CustomDir { constructor(path, nextDirent, opts = {}) { this.path = path; this.nextDirent = nextDirent; this.opts = opts; this.closed = false; } throwIfClosed() { if (this.closed) { throw errors.ERR_DIR_CLOSED(); } } async *[Symbol.asyncIterator]() { try { let dirent; // eslint-disable-next-line no-cond-assign while ((dirent = await this.read()) !== null) { yield dirent; } } finally { await this.close(); } } read(cb) { const dirent = this.readSync(); if (typeof cb !== `undefined`) return cb(null, dirent); return Promise.resolve(dirent); } readSync() { this.throwIfClosed(); return this.nextDirent(); } close(cb) { this.closeSync(); if (typeof cb !== `undefined`) return cb(null); return Promise.resolve(); } closeSync() { var _a, _b; this.throwIfClosed(); (_b = (_a = this.opts).onClose) === null || _b === void 0 ? void 0 : _b.call(_a); this.closed = true; } } exports.CustomDir = CustomDir; function opendir(fakeFs, path, entries, opts) { const nextDirent = () => { const filename = entries.shift(); if (typeof filename === `undefined`) return null; return Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path, filename)), { name: filename, }); }; return new CustomDir(path, nextDirent, opts); } exports.opendir = opendir; /***/ }), /***/ 38242: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.unwatchAllFiles = exports.unwatchFile = exports.watchFile = void 0; const CustomStatWatcher_1 = __webpack_require__(54190); const statWatchersByFakeFS = new WeakMap(); function watchFile(fakeFs, path, a, b) { let bigint; let persistent; let interval; let listener; switch (typeof a) { case `function`: { bigint = false; persistent = true; interval = 5007; listener = a; } break; default: { ({ bigint = false, persistent = true, interval = 5007, } = a); listener = b; } break; } let statWatchers = statWatchersByFakeFS.get(fakeFs); if (typeof statWatchers === `undefined`) statWatchersByFakeFS.set(fakeFs, statWatchers = new Map()); let statWatcher = statWatchers.get(path); if (typeof statWatcher === `undefined`) { statWatcher = CustomStatWatcher_1.CustomStatWatcher.create(fakeFs, path, { bigint }); statWatchers.set(path, statWatcher); } statWatcher.registerChangeListener(listener, { persistent, interval }); return statWatcher; } exports.watchFile = watchFile; function unwatchFile(fakeFs, path, cb) { const statWatchers = statWatchersByFakeFS.get(fakeFs); if (typeof statWatchers === `undefined`) return; const statWatcher = statWatchers.get(path); if (typeof statWatcher === `undefined`) return; if (typeof cb === `undefined`) statWatcher.unregisterAllChangeListeners(); else statWatcher.unregisterChangeListener(cb); if (!statWatcher.hasChangeListeners()) { statWatcher.stop(); statWatchers.delete(path); } } exports.unwatchFile = unwatchFile; function unwatchAllFiles(fakeFs) { const statWatchers = statWatchersByFakeFS.get(fakeFs); if (typeof statWatchers === `undefined`) return; for (const path of statWatchers.keys()) { unwatchFile(fakeFs, path); } } exports.unwatchAllFiles = unwatchAllFiles; /***/ }), /***/ 54190: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CustomStatWatcher = exports.assertStatus = exports.Status = exports.Event = void 0; const tslib_1 = __webpack_require__(70655); const events_1 = __webpack_require__(28614); const statUtils = tslib_1.__importStar(__webpack_require__(62576)); var Event; (function (Event) { Event["Change"] = "change"; Event["Stop"] = "stop"; })(Event = exports.Event || (exports.Event = {})); var Status; (function (Status) { Status["Ready"] = "ready"; Status["Running"] = "running"; Status["Stopped"] = "stopped"; })(Status = exports.Status || (exports.Status = {})); function assertStatus(current, expected) { if (current !== expected) { throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`); } } exports.assertStatus = assertStatus; class CustomStatWatcher extends events_1.EventEmitter { constructor(fakeFs, path, { bigint = false } = {}) { super(); this.status = Status.Ready; this.changeListeners = new Map(); this.startTimeout = null; this.fakeFs = fakeFs; this.path = path; this.bigint = bigint; this.lastStats = this.stat(); } static create(fakeFs, path, opts) { const statWatcher = new CustomStatWatcher(fakeFs, path, opts); statWatcher.start(); return statWatcher; } start() { assertStatus(this.status, Status.Ready); this.status = Status.Running; // Node allows other listeners to be registered up to 3 milliseconds // after the watcher has been started, so that's what we're doing too this.startTimeout = setTimeout(() => { this.startTimeout = null; // Per the Node FS docs: // "When an fs.watchFile operation results in an ENOENT error, // it will invoke the listener once, with all the fields zeroed // (or, for dates, the Unix Epoch)." if (!this.fakeFs.existsSync(this.path)) { this.emit(Event.Change, this.lastStats, this.lastStats); } }, 3); } stop() { assertStatus(this.status, Status.Running); this.status = Status.Stopped; if (this.startTimeout !== null) { clearTimeout(this.startTimeout); this.startTimeout = null; } this.emit(Event.Stop); } stat() { try { return this.fakeFs.statSync(this.path, { bigint: this.bigint }); } catch (error) { if (error.code === `ENOENT`) { const statInstance = this.bigint ? new statUtils.BigIntStatsEntry() : new statUtils.StatEntry(); return statUtils.clearStats(statInstance); } else { throw error; } } } /** * Creates an interval whose callback compares the current stats with the previous stats and notifies all listeners in case of changes. * * @param opts.persistent Decides whether the interval should be immediately unref-ed. */ makeInterval(opts) { const interval = setInterval(() => { const currentStats = this.stat(); const previousStats = this.lastStats; if (statUtils.areStatsEqual(currentStats, previousStats)) return; this.lastStats = currentStats; this.emit(Event.Change, currentStats, previousStats); }, opts.interval); return opts.persistent ? interval : interval.unref(); } /** * Registers a listener and assigns it an interval. */ registerChangeListener(listener, opts) { this.addListener(Event.Change, listener); this.changeListeners.set(listener, this.makeInterval(opts)); } /** * Unregisters the listener and clears the assigned interval. */ unregisterChangeListener(listener) { this.removeListener(Event.Change, listener); const interval = this.changeListeners.get(listener); if (typeof interval !== `undefined`) clearInterval(interval); this.changeListeners.delete(listener); } /** * Unregisters all listeners and clears all assigned intervals. */ unregisterAllChangeListeners() { for (const listener of this.changeListeners.keys()) { this.unregisterChangeListener(listener); } } hasChangeListeners() { return this.changeListeners.size > 0; } /** * Refs all stored intervals. */ ref() { for (const interval of this.changeListeners.values()) interval.ref(); return this; } /** * Unrefs all stored intervals. */ unref() { for (const interval of this.changeListeners.values()) interval.unref(); return this; } } exports.CustomStatWatcher = CustomStatWatcher; /***/ }), /***/ 92775: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.S_IFLNK = exports.S_IFREG = exports.S_IFDIR = exports.S_IFMT = void 0; exports.S_IFMT = 0o170000; exports.S_IFDIR = 0o040000; exports.S_IFREG = 0o100000; exports.S_IFLNK = 0o120000; /***/ }), /***/ 15004: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LibzipError = exports.ERR_DIR_CLOSED = exports.EOPNOTSUPP = exports.ENOTEMPTY = exports.EROFS = exports.EEXIST = exports.EISDIR = exports.ENOTDIR = exports.ENOENT = exports.EBADF = exports.EINVAL = exports.ENOSYS = exports.EBUSY = void 0; function makeError(code, message) { return Object.assign(new Error(`${code}: ${message}`), { code }); } function EBUSY(message) { return makeError(`EBUSY`, message); } exports.EBUSY = EBUSY; function ENOSYS(message, reason) { return makeError(`ENOSYS`, `${message}, ${reason}`); } exports.ENOSYS = ENOSYS; function EINVAL(reason) { return makeError(`EINVAL`, `invalid argument, ${reason}`); } exports.EINVAL = EINVAL; function EBADF(reason) { return makeError(`EBADF`, `bad file descriptor, ${reason}`); } exports.EBADF = EBADF; function ENOENT(reason) { return makeError(`ENOENT`, `no such file or directory, ${reason}`); } exports.ENOENT = ENOENT; function ENOTDIR(reason) { return makeError(`ENOTDIR`, `not a directory, ${reason}`); } exports.ENOTDIR = ENOTDIR; function EISDIR(reason) { return makeError(`EISDIR`, `illegal operation on a directory, ${reason}`); } exports.EISDIR = EISDIR; function EEXIST(reason) { return makeError(`EEXIST`, `file already exists, ${reason}`); } exports.EEXIST = EEXIST; function EROFS(reason) { return makeError(`EROFS`, `read-only filesystem, ${reason}`); } exports.EROFS = EROFS; function ENOTEMPTY(reason) { return makeError(`ENOTEMPTY`, `directory not empty, ${reason}`); } exports.ENOTEMPTY = ENOTEMPTY; function EOPNOTSUPP(reason) { return makeError(`EOPNOTSUPP`, `operation not supported, ${reason}`); } exports.EOPNOTSUPP = EOPNOTSUPP; // ------------------------------------------------------------------------ function ERR_DIR_CLOSED() { return makeError(`ERR_DIR_CLOSED`, `Directory handle was closed`); } exports.ERR_DIR_CLOSED = ERR_DIR_CLOSED; // ------------------------------------------------------------------------ class LibzipError extends Error { constructor(message, code) { super(message); this.name = `Libzip Error`; this.code = code; } } exports.LibzipError = LibzipError; /***/ }), /***/ 91794: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.xfs = exports.extendFs = exports.patchFs = exports.ZipOpenFS = exports.ZipFS = exports.VirtualFS = exports.ProxiedFS = exports.PosixFS = exports.NodeFS = exports.NoFS = exports.LazyFS = exports.JailFS = exports.CwdFS = exports.FakeFS = exports.AliasFS = exports.toFilename = exports.ppath = exports.npath = exports.Filename = exports.PortablePath = exports.DEFAULT_COMPRESSION_LEVEL = exports.normalizeLineEndings = exports.statUtils = exports.opendir = exports.LinkStrategy = void 0; const tslib_1 = __webpack_require__(70655); const statUtils = tslib_1.__importStar(__webpack_require__(62576)); exports.statUtils = statUtils; var copyPromise_1 = __webpack_require__(9867); Object.defineProperty(exports, "LinkStrategy", ({ enumerable: true, get: function () { return copyPromise_1.LinkStrategy; } })); var opendir_1 = __webpack_require__(74694); Object.defineProperty(exports, "opendir", ({ enumerable: true, get: function () { return opendir_1.opendir; } })); var FakeFS_1 = __webpack_require__(86936); Object.defineProperty(exports, "normalizeLineEndings", ({ enumerable: true, get: function () { return FakeFS_1.normalizeLineEndings; } })); var ZipFS_1 = __webpack_require__(56970); Object.defineProperty(exports, "DEFAULT_COMPRESSION_LEVEL", ({ enumerable: true, get: function () { return ZipFS_1.DEFAULT_COMPRESSION_LEVEL; } })); var path_1 = __webpack_require__(7194); Object.defineProperty(exports, "PortablePath", ({ enumerable: true, get: function () { return path_1.PortablePath; } })); Object.defineProperty(exports, "Filename", ({ enumerable: true, get: function () { return path_1.Filename; } })); var path_2 = __webpack_require__(7194); Object.defineProperty(exports, "npath", ({ enumerable: true, get: function () { return path_2.npath; } })); Object.defineProperty(exports, "ppath", ({ enumerable: true, get: function () { return path_2.ppath; } })); Object.defineProperty(exports, "toFilename", ({ enumerable: true, get: function () { return path_2.toFilename; } })); var AliasFS_1 = __webpack_require__(11473); Object.defineProperty(exports, "AliasFS", ({ enumerable: true, get: function () { return AliasFS_1.AliasFS; } })); var FakeFS_2 = __webpack_require__(86936); Object.defineProperty(exports, "FakeFS", ({ enumerable: true, get: function () { return FakeFS_2.FakeFS; } })); var CwdFS_1 = __webpack_require__(79918); Object.defineProperty(exports, "CwdFS", ({ enumerable: true, get: function () { return CwdFS_1.CwdFS; } })); var JailFS_1 = __webpack_require__(73266); Object.defineProperty(exports, "JailFS", ({ enumerable: true, get: function () { return JailFS_1.JailFS; } })); var LazyFS_1 = __webpack_require__(44242); Object.defineProperty(exports, "LazyFS", ({ enumerable: true, get: function () { return LazyFS_1.LazyFS; } })); var NoFS_1 = __webpack_require__(74585); Object.defineProperty(exports, "NoFS", ({ enumerable: true, get: function () { return NoFS_1.NoFS; } })); var NodeFS_1 = __webpack_require__(78633); Object.defineProperty(exports, "NodeFS", ({ enumerable: true, get: function () { return NodeFS_1.NodeFS; } })); var PosixFS_1 = __webpack_require__(22155); Object.defineProperty(exports, "PosixFS", ({ enumerable: true, get: function () { return PosixFS_1.PosixFS; } })); var ProxiedFS_1 = __webpack_require__(93334); Object.defineProperty(exports, "ProxiedFS", ({ enumerable: true, get: function () { return ProxiedFS_1.ProxiedFS; } })); var VirtualFS_1 = __webpack_require__(84478); Object.defineProperty(exports, "VirtualFS", ({ enumerable: true, get: function () { return VirtualFS_1.VirtualFS; } })); var ZipFS_2 = __webpack_require__(56970); Object.defineProperty(exports, "ZipFS", ({ enumerable: true, get: function () { return ZipFS_2.ZipFS; } })); var ZipOpenFS_1 = __webpack_require__(32031); Object.defineProperty(exports, "ZipOpenFS", ({ enumerable: true, get: function () { return ZipOpenFS_1.ZipOpenFS; } })); var patchFs_1 = __webpack_require__(98068); Object.defineProperty(exports, "patchFs", ({ enumerable: true, get: function () { return patchFs_1.patchFs; } })); Object.defineProperty(exports, "extendFs", ({ enumerable: true, get: function () { return patchFs_1.extendFs; } })); var xfs_1 = __webpack_require__(34513); Object.defineProperty(exports, "xfs", ({ enumerable: true, get: function () { return xfs_1.xfs; } })); /***/ }), /***/ 98068: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.extendFs = exports.patchFs = void 0; const util_1 = __webpack_require__(31669); const URLFS_1 = __webpack_require__(81894); const SYNC_IMPLEMENTATIONS = new Set([ `accessSync`, `appendFileSync`, `createReadStream`, `chmodSync`, `chownSync`, `closeSync`, `copyFileSync`, `linkSync`, `lstatSync`, `fstatSync`, `lutimesSync`, `mkdirSync`, `openSync`, `opendirSync`, `readSync`, `readlinkSync`, `readFileSync`, `readdirSync`, `readlinkSync`, `realpathSync`, `renameSync`, `rmdirSync`, `statSync`, `symlinkSync`, `truncateSync`, `unlinkSync`, `unwatchFile`, `utimesSync`, `watch`, `watchFile`, `writeFileSync`, `writeSync`, ]); const ASYNC_IMPLEMENTATIONS = new Set([ `accessPromise`, `appendFilePromise`, `chmodPromise`, `chownPromise`, `closePromise`, `copyFilePromise`, `linkPromise`, `fstatPromise`, `lstatPromise`, `lutimesPromise`, `mkdirPromise`, `openPromise`, `opendirPromise`, `readdirPromise`, `realpathPromise`, `readFilePromise`, `readdirPromise`, `readlinkPromise`, `renamePromise`, `rmdirPromise`, `statPromise`, `symlinkPromise`, `truncatePromise`, `unlinkPromise`, `utimesPromise`, `writeFilePromise`, `writeSync`, ]); const FILEHANDLE_IMPLEMENTATIONS = new Set([ `appendFilePromise`, `chmodPromise`, `chownPromise`, `closePromise`, `readPromise`, `readFilePromise`, `statPromise`, `truncatePromise`, `utimesPromise`, `writePromise`, `writeFilePromise`, ]); function patchFs(patchedFs, fakeFs) { // We wrap the `fakeFs` with a `URLFS` to add support for URL instances fakeFs = new URLFS_1.URLFS(fakeFs); const setupFn = (target, name, replacement) => { const orig = target[name]; target[name] = replacement; // Preserve any util.promisify implementations if (typeof (orig === null || orig === void 0 ? void 0 : orig[util_1.promisify.custom]) !== `undefined`) { replacement[util_1.promisify.custom] = orig[util_1.promisify.custom]; } }; /** Callback implementations */ { setupFn(patchedFs, `exists`, (p, ...args) => { const hasCallback = typeof args[args.length - 1] === `function`; const callback = hasCallback ? args.pop() : () => { }; process.nextTick(() => { fakeFs.existsPromise(p).then(exists => { callback(exists); }, () => { callback(false); }); }); }); setupFn(patchedFs, `read`, (p, buffer, ...args) => { const hasCallback = typeof args[args.length - 1] === `function`; const callback = hasCallback ? args.pop() : () => { }; process.nextTick(() => { fakeFs.readPromise(p, buffer, ...args).then(bytesRead => { callback(null, bytesRead, buffer); }, error => { // https://github.com/nodejs/node/blob/1317252dfe8824fd9cfee125d2aaa94004db2f3b/lib/fs.js#L655-L658 // Known issue: bytesRead could theoretically be > than 0, but we currently always return 0 callback(error, 0, buffer); }); }); }); for (const fnName of ASYNC_IMPLEMENTATIONS) { const origName = fnName.replace(/Promise$/, ``); if (typeof patchedFs[origName] === `undefined`) continue; const fakeImpl = fakeFs[fnName]; if (typeof fakeImpl === `undefined`) continue; const wrapper = (...args) => { const hasCallback = typeof args[args.length - 1] === `function`; const callback = hasCallback ? args.pop() : () => { }; process.nextTick(() => { fakeImpl.apply(fakeFs, args).then((result) => { callback(null, result); }, (error) => { callback(error); }); }); }; setupFn(patchedFs, origName, wrapper); } patchedFs.realpath.native = patchedFs.realpath; } /** Sync implementations */ { setupFn(patchedFs, `existsSync`, (p) => { try { return fakeFs.existsSync(p); } catch (error) { return false; } }); for (const fnName of SYNC_IMPLEMENTATIONS) { const origName = fnName; if (typeof patchedFs[origName] === `undefined`) continue; const fakeImpl = fakeFs[fnName]; if (typeof fakeImpl === `undefined`) continue; setupFn(patchedFs, origName, fakeImpl.bind(fakeFs)); } patchedFs.realpathSync.native = patchedFs.realpathSync; } /** Promise implementations */ { // `fs.promises` is a getter that returns a reference to require(`fs/promises`), // so we can just patch `fs.promises` and both will be updated const origEmitWarning = process.emitWarning; process.emitWarning = () => { }; let patchedFsPromises; try { patchedFsPromises = patchedFs.promises; } finally { process.emitWarning = origEmitWarning; } if (typeof patchedFsPromises !== `undefined`) { // `fs.promises.exists` doesn't exist for (const fnName of ASYNC_IMPLEMENTATIONS) { const origName = fnName.replace(/Promise$/, ``); if (typeof patchedFsPromises[origName] === `undefined`) continue; const fakeImpl = fakeFs[fnName]; if (typeof fakeImpl === `undefined`) continue; // Open is a bit particular with fs.promises: it returns a file handle // instance instead of the traditional file descriptor number if (fnName === `open`) continue; setupFn(patchedFsPromises, origName, fakeImpl.bind(fakeFs)); } class FileHandle { constructor(fd) { this.fd = fd; } } for (const fnName of FILEHANDLE_IMPLEMENTATIONS) { const origName = fnName.replace(/Promise$/, ``); const fakeImpl = fakeFs[fnName]; if (typeof fakeImpl === `undefined`) continue; setupFn(FileHandle.prototype, origName, function (...args) { return fakeImpl.call(fakeFs, this.fd, ...args); }); } setupFn(patchedFsPromises, `open`, async (...args) => { // @ts-expect-error const fd = await fakeFs.openPromise(...args); return new FileHandle(fd); }); // `fs.promises.realpath` doesn't have a `native` property } } /** util.promisify implementations */ { // Override the promisified version of `fs.read` to return an object as per // https://github.com/nodejs/node/blob/dc79f3f37caf6f25b8efee4623bec31e2c20f595/lib/fs.js#L559-L560 // and // https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L293 // @ts-expect-error patchedFs.read[util_1.promisify.custom] = async (p, buffer, ...args) => { const res = fakeFs.readPromise(p, buffer, ...args); return { bytesRead: await res, buffer }; }; } } exports.patchFs = patchFs; function extendFs(realFs, fakeFs) { const patchedFs = Object.create(realFs); patchFs(patchedFs, fakeFs); return patchedFs; } exports.extendFs = extendFs; /***/ }), /***/ 7194: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toFilename = exports.convertPath = exports.ppath = exports.npath = exports.Filename = exports.PortablePath = void 0; const tslib_1 = __webpack_require__(70655); const path_1 = tslib_1.__importDefault(__webpack_require__(85622)); var PathType; (function (PathType) { PathType[PathType["File"] = 0] = "File"; PathType[PathType["Portable"] = 1] = "Portable"; PathType[PathType["Native"] = 2] = "Native"; })(PathType || (PathType = {})); exports.PortablePath = { root: `/`, dot: `.`, }; exports.Filename = { nodeModules: `node_modules`, manifest: `package.json`, lockfile: `yarn.lock`, virtual: `__virtual__`, /** * @deprecated */ pnpJs: `.pnp.js`, pnpCjs: `.pnp.cjs`, rc: `.yarnrc.yml`, }; exports.npath = Object.create(path_1.default); exports.ppath = Object.create(path_1.default.posix); exports.npath.cwd = () => process.cwd(); exports.ppath.cwd = () => toPortablePath(process.cwd()); exports.ppath.resolve = (...segments) => { if (segments.length > 0 && exports.ppath.isAbsolute(segments[0])) { return path_1.default.posix.resolve(...segments); } else { return path_1.default.posix.resolve(exports.ppath.cwd(), ...segments); } }; const contains = function (pathUtils, from, to) { from = pathUtils.normalize(from); to = pathUtils.normalize(to); if (from === to) return `.`; if (!from.endsWith(pathUtils.sep)) from = (from + pathUtils.sep); if (to.startsWith(from)) { return to.slice(from.length); } else { return null; } }; exports.npath.fromPortablePath = fromPortablePath; exports.npath.toPortablePath = toPortablePath; exports.npath.contains = (from, to) => contains(exports.npath, from, to); exports.ppath.contains = (from, to) => contains(exports.ppath, from, to); const WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/; const UNC_WINDOWS_PATH_REGEXP = /^\\\\(\.\\)?(.*)$/; const PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/; const UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/; // Path should look like "/N:/berry/scripts/plugin-pack.js" // And transform to "N:\berry\scripts\plugin-pack.js" function fromPortablePath(p) { if (process.platform !== `win32`) return p; if (p.match(PORTABLE_PATH_REGEXP)) p = p.replace(PORTABLE_PATH_REGEXP, `$1`); else if (p.match(UNC_PORTABLE_PATH_REGEXP)) p = p.replace(UNC_PORTABLE_PATH_REGEXP, (match, p1, p2) => `\\\\${p1 ? `.\\` : ``}${p2}`); else return p; return p.replace(/\//g, `\\`); } // Path should look like "N:/berry/scripts/plugin-pack.js" // And transform to "/N:/berry/scripts/plugin-pack.js" function toPortablePath(p) { if (process.platform !== `win32`) return p; if (p.match(WINDOWS_PATH_REGEXP)) p = p.replace(WINDOWS_PATH_REGEXP, `/$1`); else if (p.match(UNC_WINDOWS_PATH_REGEXP)) p = p.replace(UNC_WINDOWS_PATH_REGEXP, (match, p1, p2) => `/unc/${p1 ? `.dot/` : ``}${p2}`); return p.replace(/\\/g, `/`); } function convertPath(targetPathUtils, sourcePath) { return (targetPathUtils === exports.npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath)); } exports.convertPath = convertPath; function toFilename(filename) { if (exports.npath.parse(filename).dir !== `` || exports.ppath.parse(filename).dir !== ``) throw new Error(`Invalid filename: "${filename}"`); return filename; } exports.toFilename = toFilename; /***/ }), /***/ 62576: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.areStatsEqual = exports.convertToBigIntStats = exports.clearStats = exports.makeEmptyStats = exports.makeDefaultStats = exports.BigIntStatsEntry = exports.StatEntry = exports.DirEntry = void 0; const tslib_1 = __webpack_require__(70655); const nodeUtils = tslib_1.__importStar(__webpack_require__(31669)); const constants_1 = __webpack_require__(92775); class DirEntry { constructor() { this.name = ``; this.mode = 0; } isBlockDevice() { return false; } isCharacterDevice() { return false; } isDirectory() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; } isFIFO() { return false; } isFile() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; } isSocket() { return false; } isSymbolicLink() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; } } exports.DirEntry = DirEntry; class StatEntry { constructor() { this.uid = 0; this.gid = 0; this.size = 0; this.blksize = 0; this.atimeMs = 0; this.mtimeMs = 0; this.ctimeMs = 0; this.birthtimeMs = 0; this.atime = new Date(0); this.mtime = new Date(0); this.ctime = new Date(0); this.birthtime = new Date(0); this.dev = 0; this.ino = 0; this.mode = constants_1.S_IFREG | 0o644; this.nlink = 1; this.rdev = 0; this.blocks = 1; } isBlockDevice() { return false; } isCharacterDevice() { return false; } isDirectory() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFDIR; } isFIFO() { return false; } isFile() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFREG; } isSocket() { return false; } isSymbolicLink() { return (this.mode & constants_1.S_IFMT) === constants_1.S_IFLNK; } } exports.StatEntry = StatEntry; class BigIntStatsEntry { constructor() { this.uid = BigInt(0); this.gid = BigInt(0); this.size = BigInt(0); this.blksize = BigInt(0); this.atimeMs = BigInt(0); this.mtimeMs = BigInt(0); this.ctimeMs = BigInt(0); this.birthtimeMs = BigInt(0); this.atimeNs = BigInt(0); this.mtimeNs = BigInt(0); this.ctimeNs = BigInt(0); this.birthtimeNs = BigInt(0); this.atime = new Date(0); this.mtime = new Date(0); this.ctime = new Date(0); this.birthtime = new Date(0); this.dev = BigInt(0); this.ino = BigInt(0); this.mode = BigInt(constants_1.S_IFREG | 0o644); this.nlink = BigInt(1); this.rdev = BigInt(0); this.blocks = BigInt(1); } isBlockDevice() { return false; } isCharacterDevice() { return false; } isDirectory() { return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFDIR); } isFIFO() { return false; } isFile() { return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFREG); } isSocket() { return false; } isSymbolicLink() { return (this.mode & BigInt(constants_1.S_IFMT)) === BigInt(constants_1.S_IFLNK); } } exports.BigIntStatsEntry = BigIntStatsEntry; function makeDefaultStats() { return new StatEntry(); } exports.makeDefaultStats = makeDefaultStats; function makeEmptyStats() { return clearStats(makeDefaultStats()); } exports.makeEmptyStats = makeEmptyStats; /** * Mutates the provided stats object to zero it out then returns it for convenience */ function clearStats(stats) { for (const key in stats) { if (Object.prototype.hasOwnProperty.call(stats, key)) { const element = stats[key]; if (typeof element === `number`) { // @ts-expect-error Typescript can't tell that stats[key] is a number stats[key] = 0; } else if (typeof element === `bigint`) { // @ts-expect-error Typescript can't tell that stats[key] is a bigint stats[key] = BigInt(0); } else if (nodeUtils.types.isDate(element)) { // @ts-expect-error Typescript can't tell that stats[key] is a bigint stats[key] = new Date(0); } } } return stats; } exports.clearStats = clearStats; function convertToBigIntStats(stats) { const bigintStats = new BigIntStatsEntry(); for (const key in stats) { if (Object.prototype.hasOwnProperty.call(stats, key)) { const element = stats[key]; if (typeof element === `number`) { // @ts-expect-error Typescript isn't able to tell this is valid bigintStats[key] = BigInt(element); } else if (nodeUtils.types.isDate(element)) { // @ts-expect-error Typescript isn't able to tell this is valid bigintStats[key] = new Date(element); } } } bigintStats.atimeNs = bigintStats.atimeMs * BigInt(1e6); bigintStats.mtimeNs = bigintStats.mtimeMs * BigInt(1e6); bigintStats.ctimeNs = bigintStats.ctimeMs * BigInt(1e6); bigintStats.birthtimeNs = bigintStats.birthtimeMs * BigInt(1e6); return bigintStats; } exports.convertToBigIntStats = convertToBigIntStats; function areStatsEqual(a, b) { if (a.atimeMs !== b.atimeMs) return false; if (a.birthtimeMs !== b.birthtimeMs) return false; if (a.blksize !== b.blksize) return false; if (a.blocks !== b.blocks) return false; if (a.ctimeMs !== b.ctimeMs) return false; if (a.dev !== b.dev) return false; if (a.gid !== b.gid) return false; if (a.ino !== b.ino) return false; if (a.isBlockDevice() !== b.isBlockDevice()) return false; if (a.isCharacterDevice() !== b.isCharacterDevice()) return false; if (a.isDirectory() !== b.isDirectory()) return false; if (a.isFIFO() !== b.isFIFO()) return false; if (a.isFile() !== b.isFile()) return false; if (a.isSocket() !== b.isSocket()) return false; if (a.isSymbolicLink() !== b.isSymbolicLink()) return false; if (a.mode !== b.mode) return false; if (a.mtimeMs !== b.mtimeMs) return false; if (a.nlink !== b.nlink) return false; if (a.rdev !== b.rdev) return false; if (a.size !== b.size) return false; if (a.uid !== b.uid) return false; const aN = a; const bN = b; if (aN.atimeNs !== bN.atimeNs) return false; if (aN.mtimeNs !== bN.mtimeNs) return false; if (aN.ctimeNs !== bN.ctimeNs) return false; if (aN.birthtimeNs !== bN.birthtimeNs) return false; return true; } exports.areStatsEqual = areStatsEqual; /***/ }), /***/ 34513: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.xfs = void 0; const tslib_1 = __webpack_require__(70655); const os_1 = tslib_1.__importDefault(__webpack_require__(12087)); const NodeFS_1 = __webpack_require__(78633); const path_1 = __webpack_require__(7194); function getTempName(prefix) { const tmpdir = path_1.npath.toPortablePath(os_1.default.tmpdir()); const hash = Math.ceil(Math.random() * 0x100000000).toString(16).padStart(8, `0`); return path_1.ppath.join(tmpdir, `${prefix}${hash}`); } const tmpdirs = new Set(); let cleanExitRegistered = false; function registerCleanExit() { if (cleanExitRegistered) return; cleanExitRegistered = true; process.once(`exit`, () => { exports.xfs.rmtempSync(); }); } exports.xfs = Object.assign(new NodeFS_1.NodeFS(), { detachTemp(p) { tmpdirs.delete(p); }, mktempSync(cb) { registerCleanExit(); while (true) { const p = getTempName(`xfs-`); try { this.mkdirSync(p); } catch (error) { if (error.code === `EEXIST`) { continue; } else { throw error; } } const realP = this.realpathSync(p); tmpdirs.add(realP); if (typeof cb !== `undefined`) { try { return cb(realP); } finally { if (tmpdirs.has(realP)) { tmpdirs.delete(realP); try { this.removeSync(realP); } catch (_a) { // Too bad if there's an error } } } } else { return realP; } } }, async mktempPromise(cb) { registerCleanExit(); while (true) { const p = getTempName(`xfs-`); try { await this.mkdirPromise(p); } catch (error) { if (error.code === `EEXIST`) { continue; } else { throw error; } } const realP = await this.realpathPromise(p); tmpdirs.add(realP); if (typeof cb !== `undefined`) { try { return await cb(realP); } finally { if (tmpdirs.has(realP)) { tmpdirs.delete(realP); try { await this.removePromise(realP); } catch (_a) { // Too bad if there's an error } } } } else { return realP; } } }, async rmtempPromise() { await Promise.all(Array.from(tmpdirs.values()).map(async (p) => { try { await exports.xfs.removePromise(p, { maxRetries: 0 }); tmpdirs.delete(p); } catch (_a) { // Too bad if there's an error } })); }, rmtempSync() { for (const p of tmpdirs) { try { exports.xfs.removeSync(p); tmpdirs.delete(p); } catch (_a) { // Too bad if there's an error } } }, }); /***/ }), /***/ 7861: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var frozenFs = Object.assign({}, __webpack_require__(35747)); var Module = typeof Module !== "undefined" ? Module : {}; var moduleOverrides = {}; var key; for (key in Module) { if (Module.hasOwnProperty(key)) { moduleOverrides[key] = Module[key]; } } var arguments_ = []; var thisProgram = "./this.program"; var quit_ = function(status, toThrow) { throw toThrow; }; var ENVIRONMENT_IS_WORKER = false; var ENVIRONMENT_IS_NODE = true; var scriptDirectory = ""; function locateFile(path) { if (Module["locateFile"]) { return Module["locateFile"](path, scriptDirectory); } return scriptDirectory + path; } var read_, readBinary; var nodeFS; var nodePath; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = __webpack_require__(85622).dirname(scriptDirectory) + "/"; } else { scriptDirectory = __dirname + "/"; } read_ = function shell_read(filename, binary) { var ret = tryParseAsDataURI(filename); if (ret) { return binary ? ret : ret.toString(); } if (!nodeFS) nodeFS = frozenFs; if (!nodePath) nodePath = __webpack_require__(85622); filename = nodePath["normalize"](filename); return nodeFS["readFileSync"](filename, binary ? null : "utf8"); }; readBinary = function readBinary(filename) { var ret = read_(filename, true); if (!ret.buffer) { ret = new Uint8Array(ret); } assert(ret.buffer); return ret; }; if (process["argv"].length > 1) { thisProgram = process["argv"][1].replace(/\\/g, "/"); } arguments_ = process["argv"].slice(2); if (true) { module["exports"] = Module; } quit_ = function(status) { process["exit"](status); }; Module["inspect"] = function() { return "[Emscripten Module object]"; }; } else { } var out = Module["print"] || console.log.bind(console); var err = Module["printErr"] || console.warn.bind(console); for (key in moduleOverrides) { if (moduleOverrides.hasOwnProperty(key)) { Module[key] = moduleOverrides[key]; } } moduleOverrides = null; if (Module["arguments"]) arguments_ = Module["arguments"]; if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; if (Module["quit"]) quit_ = Module["quit"]; var STACK_ALIGN = 16; function alignMemory(size, factor) { if (!factor) factor = STACK_ALIGN; return Math.ceil(size / factor) * factor; } var tempRet0 = 0; var setTempRet0 = function(value) { tempRet0 = value; }; var wasmBinary; if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; if (typeof WebAssembly !== "object") { abort("no native wasm support detected"); } function getValue(ptr, type, noSafe) { type = type || "i8"; if (type.charAt(type.length - 1) === "*") type = "i32"; switch (type) { case "i1": return HEAP8[ptr >> 0]; case "i8": return HEAP8[ptr >> 0]; case "i16": return HEAP16[ptr >> 1]; case "i32": return HEAP32[ptr >> 2]; case "i64": return HEAP32[ptr >> 2]; case "float": return HEAPF32[ptr >> 2]; case "double": return HEAPF64[ptr >> 3]; default: abort("invalid type for getValue: " + type); } return null; } var wasmMemory; var ABORT = false; var EXITSTATUS; function assert(condition, text) { if (!condition) { abort("Assertion failed: " + text); } } function getCFunc(ident) { var func = Module["_" + ident]; assert( func, "Cannot call unknown function " + ident + ", make sure it is exported" ); return func; } function ccall(ident, returnType, argTypes, args, opts) { var toC = { string: function(str) { var ret = 0; if (str !== null && str !== undefined && str !== 0) { var len = (str.length << 2) + 1; ret = stackAlloc(len); stringToUTF8(str, ret, len); } return ret; }, array: function(arr) { var ret = stackAlloc(arr.length); writeArrayToMemory(arr, ret); return ret; } }; function convertReturnValue(ret) { if (returnType === "string") return UTF8ToString(ret); if (returnType === "boolean") return Boolean(ret); return ret; } var func = getCFunc(ident); var cArgs = []; var stack = 0; if (args) { for (var i = 0; i < args.length; i++) { var converter = toC[argTypes[i]]; if (converter) { if (stack === 0) stack = stackSave(); cArgs[i] = converter(args[i]); } else { cArgs[i] = args[i]; } } } var ret = func.apply(null, cArgs); ret = convertReturnValue(ret); if (stack !== 0) stackRestore(stack); return ret; } function cwrap(ident, returnType, argTypes, opts) { argTypes = argTypes || []; var numericArgs = argTypes.every(function(type) { return type === "number"; }); var numericRet = returnType !== "string"; if (numericRet && numericArgs && !opts) { return getCFunc(ident); } return function() { return ccall(ident, returnType, argTypes, arguments, opts); }; } var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined; function UTF8ArrayToString(heap, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr; if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { return UTF8Decoder.decode(heap.subarray(idx, endPtr)); } else { var str = ""; while (idx < endPtr) { var u0 = heap[idx++]; if (!(u0 & 128)) { str += String.fromCharCode(u0); continue; } var u1 = heap[idx++] & 63; if ((u0 & 224) == 192) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } var u2 = heap[idx++] & 63; if ((u0 & 240) == 224) { u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; } else { u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heap[idx++] & 63); } if (u0 < 65536) { str += String.fromCharCode(u0); } else { var ch = u0 - 65536; str += String.fromCharCode(55296 | (ch >> 10), 56320 | (ch & 1023)); } } } return str; } function UTF8ToString(ptr, maxBytesToRead) { return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; } function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { if (!(maxBytesToWrite > 0)) return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; for (var i = 0; i < str.length; ++i) { var u = str.charCodeAt(i); if (u >= 55296 && u <= 57343) { var u1 = str.charCodeAt(++i); u = (65536 + ((u & 1023) << 10)) | (u1 & 1023); } if (u <= 127) { if (outIdx >= endIdx) break; heap[outIdx++] = u; } else if (u <= 2047) { if (outIdx + 1 >= endIdx) break; heap[outIdx++] = 192 | (u >> 6); heap[outIdx++] = 128 | (u & 63); } else if (u <= 65535) { if (outIdx + 2 >= endIdx) break; heap[outIdx++] = 224 | (u >> 12); heap[outIdx++] = 128 | ((u >> 6) & 63); heap[outIdx++] = 128 | (u & 63); } else { if (outIdx + 3 >= endIdx) break; heap[outIdx++] = 240 | (u >> 18); heap[outIdx++] = 128 | ((u >> 12) & 63); heap[outIdx++] = 128 | ((u >> 6) & 63); heap[outIdx++] = 128 | (u & 63); } } heap[outIdx] = 0; return outIdx - startIdx; } function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); } function lengthBytesUTF8(str) { var len = 0; for (var i = 0; i < str.length; ++i) { var u = str.charCodeAt(i); if (u >= 55296 && u <= 57343) u = (65536 + ((u & 1023) << 10)) | (str.charCodeAt(++i) & 1023); if (u <= 127) ++len; else if (u <= 2047) len += 2; else if (u <= 65535) len += 3; else len += 4; } return len; } function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); if (ret) stringToUTF8Array(str, HEAP8, ret, size); return ret; } function writeArrayToMemory(array, buffer) { HEAP8.set(array, buffer); } function alignUp(x, multiple) { if (x % multiple > 0) { x += multiple - (x % multiple); } return x; } var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; function updateGlobalBufferAndViews(buf) { buffer = buf; Module["HEAP8"] = HEAP8 = new Int8Array(buf); Module["HEAP16"] = HEAP16 = new Int16Array(buf); Module["HEAP32"] = HEAP32 = new Int32Array(buf); Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf); Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf); Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf); Module["HEAPF32"] = HEAPF32 = new Float32Array(buf); Module["HEAPF64"] = HEAPF64 = new Float64Array(buf); } var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 16777216; var wasmTable; var __ATPRERUN__ = []; var __ATINIT__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; function preRun() { if (Module["preRun"]) { if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; while (Module["preRun"].length) { addOnPreRun(Module["preRun"].shift()); } } callRuntimeCallbacks(__ATPRERUN__); } function initRuntime() { runtimeInitialized = true; if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); TTY.init(); callRuntimeCallbacks(__ATINIT__); } function postRun() { if (Module["postRun"]) { if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; while (Module["postRun"].length) { addOnPostRun(Module["postRun"].shift()); } } callRuntimeCallbacks(__ATPOSTRUN__); } function addOnPreRun(cb) { __ATPRERUN__.unshift(cb); } function addOnInit(cb) { __ATINIT__.unshift(cb); } function addOnPostRun(cb) { __ATPOSTRUN__.unshift(cb); } var runDependencies = 0; var runDependencyWatcher = null; var dependenciesFulfilled = null; function getUniqueRunDependency(id) { return id; } function addRunDependency(id) { runDependencies++; if (Module["monitorRunDependencies"]) { Module["monitorRunDependencies"](runDependencies); } } function removeRunDependency(id) { runDependencies--; if (Module["monitorRunDependencies"]) { Module["monitorRunDependencies"](runDependencies); } if (runDependencies == 0) { if (runDependencyWatcher !== null) { clearInterval(runDependencyWatcher); runDependencyWatcher = null; } if (dependenciesFulfilled) { var callback = dependenciesFulfilled; dependenciesFulfilled = null; callback(); } } } Module["preloadedImages"] = {}; Module["preloadedAudios"] = {}; function abort(what) { if (Module["onAbort"]) { Module["onAbort"](what); } what += ""; err(what); ABORT = true; EXITSTATUS = 1; what = "abort(" + what + "). Build with -s ASSERTIONS=1 for more info."; var e = new WebAssembly.RuntimeError(what); throw e; } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { return filename.startsWith(dataURIPrefix); } var wasmBinaryFile = "data:application/octet-stream;base64,AGFzbQEAAAABlAInYAF/AX9gA39/fwF/YAF/AGACf38Bf2ACf38AYAV/f39/fwF/YAR/f39/AX9gA39/fwBgBH9+f38Bf2AAAX9gBX9/f35/AX5gA39+fwF/YAF/AX5gAn9+AX9gBH9/fn8BfmADf35/AX5gA39/fgF/YAR/f35/AX9gBn9/f39/fwF/YAR/f39/AGADf39+AX5gAn5/AX9gA398fwBgBH9/f38BfmADf39/AX5gBn98f39/fwF/YAV/f35/fwF/YAV/fn9/fwF/YAV/f39/fwBgAn9+AGACf38BfmACf3wAYAh/fn5/f39+fwF/YAV/f39+fwBgAABgBX5+f35/AX5gAnx/AXxgAn9+AX5gBX9/f39/AX4CeRQBYQFhAAIBYQFiAAABYQFjAAMBYQFkAAYBYQFlAAEBYQFmAAABYQFnAAYBYQFoAAABYQFpAAMBYQFqAAMBYQFrAAMBYQFsAAMBYQFtAAABYQFuAAUBYQFvAAEBYQFwAAMBYQFxAAEBYQFyAAABYQFzAAEBYQF0AAADggKAAgcCAgQAAQECAgANBAQOBwICAhwLEw0AAA0dFAwMAAcCDBAeAgMCAwIAAgEABwgUBBUIBgADAAwABAgIAgEGBgABAB8XAQEDAhMCAwUFEQICIA8GAgMYAQgCAQAABwUBGAAaAxIBAAcEAyERCCIHAQsVAQMABQMDAwAFBAACIwYAAQEAGw0bFw0BBAALCwMDDAwAAwAHJAMBBA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QRBqJAAgAAt/AQN/IAAhAQJAIABBA3EEQANAIAEtAABFDQIgAUEBaiIBQQNxDQALCwNAIAEiAkEEaiEBIAIoAgAiA0F/cyADQYGChAhrcUGAgYKEeHFFDQALIANB/wFxRQRAIAIgAGsPCwNAIAItAAEhAyACQQFqIgEhAiADDQALCyABIABrC2EBAX8jAEEQayICIAA2AgggAiABNwMAAkAgAikDACACKAIIKQMIVgRAIAIoAghBADoAACACQX82AgwMAQsgAigCCEEBOgAAIAIoAgggAikDADcDECACQQA2AgwLIAIoAgwL7wEBAX8jAEEgayICJAAgAiAANgIYIAIgATcDECACIAIoAhhCCBAeNgIMAkAgAigCDEUEQCACQX82AhwMAQsgAigCDCACKQMQQv8BgzwAACACKAIMIAIpAxBCCIhC/wGDPAABIAIoAgwgAikDEEIQiEL/AYM8AAIgAigCDCACKQMQQhiIQv8BgzwAAyACKAIMIAIpAxBCIIhC/wGDPAAEIAIoAgwgAikDEEIoiEL/AYM8AAUgAigCDCACKQMQQjCIQv8BgzwABiACKAIMIAIpAxBCOIhC/wGDPAAHIAJBADYCHAsgAigCHBogAkEgaiQAC4cDAQF/IwBBMGsiAyQAIAMgADYCJCADIAE2AiAgAyACNwMYAkAgAygCJC0AKEEBcQRAIANCfzcDKAwBCwJAAkAgAygCJCgCIEUNACADKQMYQv///////////wBWDQAgAykDGFANASADKAIgDQELIAMoAiRBDGpBEkEAEBQgA0J/NwMoDAELIAMoAiQtADVBAXEEQCADQn83AygMAQsCfyMAQRBrIgAgAygCJDYCDCAAKAIMLQA0QQFxCwRAIANCADcDKAwBCyADKQMYUARAIANCADcDKAwBCyADQgA3AxADQCADKQMQIAMpAxhUBEAgAyADKAIkIAMoAiAgAykDEKdqIAMpAxggAykDEH1BARAhIgI3AwggAkIAUwRAIAMoAiRBAToANSADKQMQUARAIANCfzcDKAwECyADIAMpAxA3AygMAwsgAykDCFAEQCADKAIkQQE6ADQFIAMgAykDCCADKQMQfDcDEAwCCwsLIAMgAykDEDcDKAsgAykDKCECIANBMGokACACCzYBAX8jAEEQayIBIAA2AgwCfiABKAIMLQAAQQFxBEAgASgCDCkDCCABKAIMKQMQfQwBC0IACwuyAQIBfwF+IwBBEGsiASQAIAEgADYCBCABIAEoAgRCCBAeNgIAAkAgASgCAEUEQCABQgA3AwgMAQsgASABKAIALQAArSABKAIALQAHrUI4hiABKAIALQAGrUIwhnwgASgCAC0ABa1CKIZ8IAEoAgAtAAStQiCGfCABKAIALQADrUIYhnwgASgCAC0AAq1CEIZ8IAEoAgAtAAGtQgiGfHw3AwgLIAEpAwghAiABQRBqJAAgAgumAQEBfyMAQRBrIgEkACABIAA2AggCQCABKAIIKAIgRQRAIAEoAghBDGpBEkEAEBQgAUF/NgIMDAELIAEoAggiACAAKAIgQQFrNgIgIAEoAggoAiBFBEAgASgCCEEAQgBBAhAhGiABKAIIKAIABEAgASgCCCgCABAxQQBIBEAgASgCCEEMakEUQQAQFAsLCyABQQA2AgwLIAEoAgwhACABQRBqJAAgAAvwAgICfwF+AkAgAkUNACAAIAJqIgNBAWsgAToAACAAIAE6AAAgAkEDSQ0AIANBAmsgAToAACAAIAE6AAEgA0EDayABOgAAIAAgAToAAiACQQdJDQAgA0EEayABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUEEayAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBCGsgADYCACABQQxrIAA2AgAgAkEZSQ0AIAMgADYCGCADIAA2AhQgAyAANgIQIAMgADYCDCABQRBrIAA2AgAgAUEUayAANgIAIAFBGGsgADYCACABQRxrIAA2AgAgAiADQQRxQRhyIgFrIgJBIEkNACAArUKBgICAEH4hBSABIANqIQEDQCABIAU3AxggASAFNwMQIAEgBTcDCCABIAU3AwAgAUEgaiEBIAJBIGsiAkEfSw0ACwsL3AEBAX8jAEEQayIBJAAgASAANgIMIAEoAgwEQCABKAIMKAIoBEAgASgCDCgCKEEANgIoIAEoAgwo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BAXE6AIUBIAMtAIcBQQFxBEAgAyADQSBqQhwQKTYCHCADKAIcRQRAIAMoAqgBQQhqQQ5BABAUIAMoApABECMgA0F/NgKsAQwCCwJAIAMoAqABQYACcQRAAkAgAygCoAFBgAhxDQAgAygCpAEpAyBC/////w9WDQAgAygCpAEpAyhC/////w9YDQILIAMoAhwgAygCpAEpAygQLSADKAIcIAMoAqQBKQMgEC0MAQsCQAJAIAMoAqABQYAIcQ0AIAMoAqQBKQMgQv////8PVg0AIAMoAqQBKQMoQv////8PVg0AIAMoAqQBKQNIQv////8PWA0BCyADKAKkASkDKEL/////D1oEQCADKAIcIAMoAqQBKQMoEC0LIAMoAqQBKQMgQv////8PWgRAIAMoAhwgAygCpAEpAyAQLQsgAygCpAEpA0hC/////w9aBEAgAygCHCADKAKkASkDSBAtCwsLAn8jAEEQayIAIAMoAhw2AgwgACgCDC0AAEEBcUULBEAgAygCqAFBCGpBFEEAEBQgAygCHBAWIAMoApABECMgA0F/NgKsAQwCCyADQQECfyMAQRBrIgAgAygCHDYCDAJ+IAAoAgwtAABBAXEEQCAAKAIMKQMQDAELQgALp0H//wNxCyADQSBqQYAGEFE2AowBIAMoAhwQFiADKAKMASADKAKQATYCACADIAMoAowBNgKQAQsgAy0AhQFBAXEEQCADIANBFWpCBxApNgIQIAMoAhBFBEAgAygCqAFBCGpBDkEAEBQgAygCkAEQIyADQX82AqwBDAILIAMoAhBBAhAfIAMoAhBBvRJBAhBAIAMoAhAgAygCpAEvAVJB/wFxEI4BIAMoAhAgAygCpAEoAhBB//8DcRAfAn8jAEEQayIAIAMoAhA2AgwgACgCDC0AAEEBcUULBEAgAygCqAFBCGpBFEEAEBQgAygCEBAWIAMoApABECMgA0F/NgKsAQwCCyADQYGyAkEHIANBFWpBgAYQUTYCDCADKAIQEBYgAygCDCADKAKQATYCACADIAMoAgw2ApABCyADIANB0ABqQi4QKSIANgJMIABFBEAgAygCqAFBCGpBDkEAEBQgAygCkAEQIyADQX82AqwBDAELIAMoA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AhRBAWo2AhQMAQsLIAAoAggQR0EBcUUEQCAAKAIgQRRBABAUIAAoAggQFiAAQX82AiwMAQsgACgCCBAWIAAgACgCHDYCLAsgACgCLCECIABBMGokACADIAIiADYCBCAAQQBIBEAgA0IANwMoDAELIAMpAwggAygCBK18Qv///////////wBWBEAgAygCFEEEQRYQFCADQgA3AygMAQsgAyADKQMIIAMoAgStfDcDKAsgAykDKCEBIANBMGokACABC20BAX8jAEEgayIEJAAgBCAANgIYIAQgATYCFCAEIAI2AhAgBCADNgIMAkAgBCgCGEUEQCAEQQA2AhwMAQsgBCAEKAIUIAQoAhAgBCgCDCAEKAIYQQhqEJIBNgIcCyAEKAIcIQAgBEEgaiQAIAALVQEBfyMAQRBrIgEkACABIAA2AgwCQAJAIAEoAgwoAiRBAUYNACABKAIMKAIkQQJGDQAMAQsgASgCDEEAQgBBChAhGiABKAIMQQA2AiQLIAFBEGokAAumAQEBfyMAQRBrIgIkACACIAA2AgggAiABNgIEAkAgAigCCC0AKEEBcQRAIAJBfzYCDAwBCyACKAIIKAIABEAgAigCCCgCACACKAIEEGhBAEgEQCACKAIIQQxqIAIoAggoAgAQFyACQX82AgwMAgsLIAIoAgggAkEEakIEQRMQIUIAUwRAIAJBfzYCDAwBCyACQQA2AgwLIAIoAgwhACACQRBqJAAgAAuNCAIBfwF+IwBBkAFrIgMkACADIAA2AoQBIAMgATYCgAEgAyACNgJ8IAMQTwJAIAMoAoABKQMIQgBSBEAgAyADKAKAASgCACgCACkDSDcDYCADIAMoAoABKAIAKAIAKQNINwNoDAELIANCADcDYCADQgA3A2gLIANCADcDcAJAA0AgAykDcCADKAKAASkDCFQEQCADKAKAASgCACADKQNwp0EEdGooAgApA0ggAykDaFQEQCADIAMoAoABKAIAIAMpA3CnQQR0aigCACkDSDcDaAsgAykDaCADKAKAASkDIFYEQCADKAJ8QRNBABAUIANCfzcDiAEMAwsgAyADKAKAASgCACADKQNwp0EEdGooAgApA0ggAygCgAEoAgAgAykDcKdBBHRqK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RAQbSbAUEAIABrNgIAQX8hAAsgA0EQaiQAIAALMwEBfwJ/IAAQByIBQWFGBEAgABARIQELIAFBgWBPCwR/QbSbAUEAIAFrNgIAQX8FIAELC2kBAn8CQCAAKAIUIAAoAhxNDQAgAEEAQQAgACgCJBEBABogACgCFA0AQX8PCyAAKAIEIgEgACgCCCICSQRAIAAgASACa6xBASAAKAIoEQ8AGgsgAEEANgIcIABCADcDECAAQgA3AgRBAAvaAwEGfyMAQRBrIgUkACAFIAI2AgwjAEGgAWsiBCQAIARBCGpBkIcBQZABEBkaIAQgADYCNCAEIAA2AhwgBEF+IABrIgNB/////wcgA0H/////B0kbIgY2AjggBCAAIAZqIgA2AiQgBCAANgIYIARBCGohACMAQdABayIDJAAgAyACNgLMASADQaABakEAQSgQMiADIAMoAswBNgLIAQJAQQAgASADQcgBaiADQdAAaiADQaABahBxQQBIDQAgACgCTEEATiEHIAAoAgAhAiAALABKQQBMBEAgACACQV9xNgIACyACQSBxIQgCfyAAKAIwBEAgACABIANByAFqIANB0ABqIANBoAFqEHEMAQsgAEHQADYCMCAAIANB0ABqNgIQIAAgAzYCHCAAIAM2AhQgACgCLCECIAAgAzYCLCAAIAEgA0HIAWogA0HQAGogA0GgAWoQcSACRQ0AGiAAQQBBACAAKAIkEQEAGiAAQQA2AjAgACACNgIsIABBADYCHCAAQQA2AhAgACgCFBogAEEANgIUQQALGiAAIAAoAgAgCHI2AgAgB0UNAAsgA0HQAWokACAGBEAgBCgCHCIAIAAgBCgCGEZrQQA6AAALIARBoAFqJAAgBUEQaiQAC4wSAg9/AX4jAEHQAGsiBSQAIAUgATYCTCAFQTdqIRMgBUE4aiEQQQAhAQNAAkAgDUEASA0AQf////8HIA1rIAFIBEBBtJsBQT02AgBBfyENDAELIAEgDWohDQsgBSgCTCIHIQECQAJAAkACQAJAAkACQAJAIAUCfwJAIActAAAiBgRAA0ACQAJAIAZB/wFxIgZFBEAgASEGDAELIAZBJUcNASABIQYDQCABLQABQSVHDQEgBSABQ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2Chqai0AACADKAIcQdwWaiADKAIMQQJ0aigCACADKAIcQdgoamotAABKDQAMAQsgAygCHEHcFmogAygCFEECdGogAygCHEHcFmogAygCDEECdGooAgA2AgAgAyADKAIMNgIUIAMgAygCDEEBdDYCDAwBCwsgAygCHEHcFmogAygCFEECdGogAygCEDYCAAvXEwEDfyMAQTBrIgIkACACIAA2AiwgAiABNgIoIAIgAigCKCgCADYCJCACIAIoAigoAggoAgA2AiAgAiACKAIoKAIIKAIMNgIcIAJBfzYCECACKAIsQQA2AtAoIAIoAixBvQQ2AtQoIAJBADYCGANAIAIoAhggAigCHEgEQAJAIAIoAiQgAigCGEECdGovAQAEQCACIAIoAhgiATYCECACKAIsQdwWaiEDIAIoAiwiBCgC0ChBAWohACAEIAA2AtAoIABBAnQgA2ogATYCACACKAIYIAIoAixB2ChqakEAOgAADAELIAIoAiQgAigCGEECdGpBADsBAgsgAiACKAIYQQFqNgIYDAELCwNAIAIoAiwoAtAoQQJIBEACQCACKAIQQQJIBEAgAiACKAIQQQFqIgA2AhAMAQtBACEACyACKAIsQdwWaiEDIAIoAiwiBCgC0ChBAWohASAEIAE2AtAoIAFBAnQgA2ogADYCACACIAA2AgwgAigCJCACKAIMQQJ0akEBOwEAIAIoAgwgAigCLEHYKGpqQQA6AAAgAigCLCIAIAAoAqgtQQFrNgKoLSACKAIgBEAgAigCLCIAIAAoAqwtIAIoAiAgAigCDEECdGovAQJrNgKsLQsMAQsLIAIoAiggAigCEDYCBCACIAIoAiwoAtAoQQJtNgIYA0AgAigCGEEBTgRAIAIoAiwgAigCJCACKAIYEHogAiACKAIYQQFrNgIYDAELCyACIAIoAhw2AgwDQCACIAIoAiwoAuAWNgIYIAIoAixB3BZqIQEgAigCLCIDKALQKCEAIAMgAEEBazYC0CggAigCLCAAQQJ0IAFqKAIANgLgFiACKAIsIAIoAiRBARB6IAIgAigCLCgC4BY2AhQgAigCGCEBIAIoAixB3BZqIQMgAigCLCIEKALUKEEBayEAIAQgADYC1CggAEECdCADaiABNgIAIAIoAhQhASACKAIsQdwWaiEDIAIoAiwiBCgC1ChBAWshACAEIAA2AtQoIABBAnQgA2ogATYCACACKAIkIAIoAgxBAnRqIAIoAiQgAigCGEECdGovAQAgAigCJCACKAIUQQJ0ai8BAGo7AQAgAigCDCACKAIsQdgoamoCfyACKAIYIAIoAixB2Chqai0AACACKAIUIAIoAixB2Chqai0AAE4EQCACKAIYIAIoAixB2Chqai0AAAwBCyACKAIUIAIoAixB2Chqai0AAAtBAWo6AAAgAigCJCACKAIUQQJ0aiACKAIMIgA7AQIgAigCJCACKAIYQQJ0aiAAOwECIAIgAigCDCIAQQFqNgIMIAIoAiwgADYC4BYgAigCLCACKAIkQQEQeiACKAIsKALQKEECTg0ACyACKAIsKALgFiEBIAIoAixB3BZqIQMgAigCLCIEKALUKEEBayEAIAQgADYC1CggAEECdCADaiABNgIAIAIoAighASMAQUBqIgAgAigCLDYCPCAAIAE2AjggACAAKAI4KAIANgI0IAAgACgCOCgCBDYCMCAAIAAoAjgoAggoAgA2AiwgACAAKAI4KAIIKAIENgIoIAAgACgCOCgCCCgCCDYCJCAAIAAoAjgoAggoAhA2AiAgAEEANgIEIABBADYCEANAIAAoAhBBD0wEQCAAKAI8QbwWaiAAKAIQQQF0akEAOwEAIAAgACgCEEEBajYCEAwBCwsgACgCNCAAKAI8QdwWaiAAKAI8KALUKEECdGooAgBBAnRqQQA7AQIgACAAKAI8KALUKEEBajYCHANAIAAoAhxBvQRIBEAgACAAKAI8QdwWaiAAKAIcQQJ0aigCADYCGCAAIAAoAjQgACgCNCAAKAIYQQJ0ai8BAkECdGovAQJBAWo2AhAgACgCECAAKAIgSgRAIAAgACgCIDYCECAAIAAoAgRBAWo2AgQLIAAoAjQgACgCGEECdGogACgCEDsBAiAAKAIYIAAoAjBMBEAgACgCPCAAKAIQQQF0akG8FmoiASABLwEAQQFqOwEAIABBADYCDCAAKAIYIAAoAiROBEAgACAAKAIoIAAoAhggACgCJGtBAnRqKAIANgIMCyA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AAKAIMKAIEC0GABhBRNgIAIAMoAgQQFiADIAMoAgA2AhwLIAMoAhwhACADQSBqJAAgAAu0AgEBfyMAQTBrIgMkACADIAA2AiggAyABNwMgIAMgAjYCHAJAIAMpAyBQBEAgA0EBOgAvDAELIAMgAygCKCkDECADKQMgfDcDCAJAIAMpAwggAykDIFoEQCADKQMIQv////8AWA0BCyADKAIcQQ5BABAUIANBADoALwwBCyADIAMoAigoAgAgAykDCKdBBHQQSCIANgIEIABFBEAgAygCHEEOQQAQFCADQQA6AC8MAQsgAygCKCADKAIENgIAIAMgAygCKCkDCDcDEANAIAMpAxAgAykDCFpFBEAgAygCKCgCACADKQMQp0EEdGoQkAEgAyADKQMQQgF8NwMQDAELCyADKAIoIAMpAwgiATcDECADKAIoIAE3AwggA0EBOgAvCyADLQAvQQFxIQAgA0EwaiQAIAALzAEBAX8jAEEgayICJAAgAiAANwMQIAIgATYCDCACQTAQGCIBNgIIAkAgAUUEQCACKAIMQQ5BABAUIAJBADYCHAwBCyACKAIIQQA2AgAgAigCCEIANwMQIAIoAghCADcDCCACKAIIQgA3AyAgAigCCEIANwMYIAIoAghBADYCKCACKAIIQQA6ACwgAigCCCACKQMQIAIoAgwQgwFBAXFFBEAgAigCCBAkIAJBADYCHAwBCyACIAIoAgg2AhwLIAIoAhwhASACQSBqJAAgAQvWAgEBfyMAQSBrIgMkACADIAA2AhggAyABNgIUIAMgAjYCECADIANBDGpCBBApNgIIAkAgAygCCEUEQCADQX82AhwMAQsDQCADKAIUBEAgAygCFCgCBCADKAIQcUGABnEEQCADKAIIQgAQLBogAygCCCADKAIULwEIEB8gAygCCCADKAIULwEKEB8CfyMAQRBrIgAgAygCCDYCDCAAKAIMLQAAQQFxRQsEQCADKAIYQQhqQRRBABAUIAMoAggQFiADQX82AhwMBAsgAygCGCADQQxqQgQQNUEASARAIAMoAggQFiADQX82AhwMBAsgAygCFC8BCgRAIAMoAhggAygCFCgCDCADKAIULwEKrRA1QQBIBEAgAygCCBAWIANBf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RrKAAAQdCWmThHDQAgACgCZCAAKQMwQhR9ECwaIAAoAmgoAgAhBSAAKAJkIQYgACkDWCEJIAAoAmgoAhQhByAAKAJUIQgjAEGwAWsiASQAIAEgBTYCqAEgASAGNgKkASABIAk3A5gBIAEgBzYClAEgASAINgKQASMAQRBrIgUgASgCpAE2AgwgAQJ+IAUoAgwtAABBAXEEQCAFKAIMKQMQDAELQgALNwMYIAEoAqQBQgQQHhogASABKAKkARAdQf//A3E2AhAgASABKAKkARAdQf//A3E2AgggASABKAKkARAwNwM4AkAgASkDOEL///////////8AVgRAIAEoApABQQRBFhAUIAFBADYCrAEMAQsgASkDOEI4fCABKQMYIAEpA5gBfFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELAkACQCABKQM4IAEpA5gBVA0AIAEpAzhCOHwgASkDmAECfiMAQRBrIgUgASgCpAE2AgwgBSgCDCkDCAt8Vg0AIAEoAqQBIAEpAzggASkDmAF9ECwaIAFBADoAFwwBCyABKAKoASABKQM4QQAQJ0EASARAIAEoApABIAEoAqgBEBcgAUEANgKsAQwCCyABIAEoAqgBQjggAUFAayABKAKQARBBIgU2AqQBIAVFBEAgAUEANgKsAQwCCyABQQE6ABcLIAEoAqQBQgQQHigAAEHQlpkwRwRAIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELIAEgASgCpAEQMDcDMAJAIAEoApQBQQRxRQ0AIAEpAzAgASkDOHxCDHwgASkDmAEgASkDGHxRDQAgASgCkAFBFUEAEBQgAS0AF0EBcQRAIAEoAqQBEBYLIAFBADYCrAEMAQsgASgCpAFCBBAeGiABIAEoAqQBECo2AgwgASABKAKkARAqNgIEIAEoAhBB//8DRgRAIAEgASgCDDYCEAsgASgCCEH//wNGBEAgASABKAIENgIICwJAIAEoApQBQQRxRQ0AIAEoAgggASgCBEYEQCABKAIQIAEoAgxGDQELIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELAkAgASgCEEUEQCABKAIIRQ0BCyABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDA3AyggASABKAKkARAwNwMgIAEpAyggASkDIFIEQCABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDA3AzAgASABKAKkARAwNwOAAQJ/IwBBEGsiBSABKAKkATYCDCAFKAIMLQAAQQFxRQsEQCABKAKQAUEUQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABLQAXQQFxBEAgASgCpAEQFgsCQCABKQOAAUL///////////8AWARAIAEpA4ABIAEpA4ABIAEpAzB8WA0BCyABKAKQAUEEQRYQFCABQQA2AqwBDAELIAEpA4ABIAEpAzB8IAEpA5gBIAEpAzh8VgRAIAEoApABQRVBABAUIAFBADYCrAEMAQsCQCABKAKUAUEEcUUNACABKQOAASABKQMwfCABKQOYASABKQM4fFENACABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEpAyggASkDMEIugFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEgASkDKCABKAKQARCEASIFNgKMASAFRQRAIAFBADYCrAEMAQsgASgCjAFBAToALCABKAKMASABKQMwNwMYIAEoAowBIAEpA4ABNwMgIAEgASgCjAE2AqwBCyABKAKsASEFIAFBsAFqJAAgACAFNgJQDAELIAAoAmQgACkDMBAsGiAAKAJkIQUgACkDWCEJIAAoAmgoAhQhBiAAKAJUIQcjAEHQAGsiASQAIAEgBTYCSCABIAk3A0AgASAGNgI8IAEgBzYCOAJAIAEoAkgQL0IWVARAIAEoAjhBFUEAEBQgAUEANgJMDAELIwBBEGsiBSABKAJINgIMIAECfiAFKAIMLQAAQQFxBEAgBSgCDCkDEAwBC0IACzcDCCABKAJIQgQQHhogASgCSBAqBEAgASgCOEEBQQAQFCABQQA2AkwMAQsgASABKAJIEB1B//8Dca03AyggASABKAJIEB1B//8Dca03AyAgASkDICABKQMoUgRAIAEoAjh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qQYICajYCDCACIAIoAiwgAigCIEEBa2otAAA6AAsgAiACKAIsIAIoAiBqLQAAOgAKIAIoAjgoAnggAigCOCgCjAFPBEAgAiACKAIwQQJ2NgIwCyACKAIcIAIoAjgoAnRLBEAgAiACKAI4KAJ0NgIcCwNAAkAgAiACKAI4KAI4IAIoAjRqNgIoAkAgAigCKCACKAIgai0AACACLQAKRw0AIAIoAiggAigCIEEBa2otAAAgAi0AC0cNACACKAIoLQAAIAIoAiwtAABHDQAgAiACKAIoIgBBAWo2AiggAC0AASACKAIsLQABRwRADAELIAIgAigCLEECajYCLCACIAIoAihBAWo2AigDQCACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AigCf0EAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACKAIsIAIoAgxJC0EBcQ0ACyACQYICIAIoAgwgAigCLGtrNgIkIAIgAigCDEGCAms2AiwgAigCJCACKAIgSgRAIAIoAjggAigCNDYCcCACIAIoAiQ2AiAgAigCJCACKAIcTg0CIAIgAigCLCACKAIgQQFrai0AADoACyACIAIoAiwgAigCIGotAAA6AAoLCyACIAIoAhQgAigCNCACKAIQcUEBdGovAQAiATYCNEEAIQAgASACKAIYSwR/IAIgAigCMEEBayIANgIwIABBAEcFQQALQQFxDQELCwJAIAIoAiAgAigCOCgCdE0EQCACIAIoAiA2AjwMAQsgAiACKAI4KAJ0NgI8CyACKAI8C5IQAQF/IwBBMGsiAiQAIAIgADYCKCACIAE2AiQgAgJ/IAIoAigoAiwgAigCKCgCDEEFa0kEQCACKAIoKAIsDAELIAIoAigoAgxBBWsLNgIgIAJBADYCECACIAIoAigoAgAoAgQ2AgwDQAJAIAJB//8DNgIcIAIgAigCKCgCvC1BKmpBA3U2AhQgAigCKCgCACgCECACKAIUSQ0AIAIgAigCKCgCACgCECACKAIUazYCFCACIAIoAigoAmwgAigCKCgCXGs2AhggAigCHCACKAIYIAIoAigoAgAoAgRqSwRAIAIgAigCGCACKAIoKAIAKAIEajYCHAsgAigCHCACKAIUSwRAIAIgAigCFDYCHAsCQCACKAIcIAIoAiBPDQACQCACKAIcRQRAIAIoAiRBBEcNAQsgAigCJEUNACACKAIcIAIoAhggAigCKCgCACgCBGpGDQELDAELQQAhACACIAIoAiRBBEYEfyACKAIcIAIoAhggAigCKCgCACgCBGpGBUEAC0EBcTYCECACKAIoQQBBACACKAIQEFwgAigCKCgCCCACKAIoKAIUQQRraiACKAIcOgAAIAIoAigoAgggAigCKCgCFEEDa2ogAigCHEEIdjoAACACKAIoKAIIIAIoAigoAhRBAmtqIAIoAhxBf3M6AAAgAigCKCgCCCACKAIoKAIUQQFraiACKAIcQX9zQQh2OgAAIAIoAigoAgAQHCACKAIYBEAgAigCGCACKAIcSwRAIAIgAigCHDYCGAsgAigCKCgCACgCDCACKAIoKAI4IAIoAigoAlxqIAIoAhgQGRogAigCKCgCACIAIAIoAhggACgCDGo2AgwgAigCKCgCACIAIAAoAhAgAigCGGs2AhAgAigCKCgCACIAIAIoAhggACgCFGo2AhQgAigCKCIAIAIoAhggACgCXGo2AlwgAiACKAIcIAIoAhhrNgIcCyACKAIcBEAgAigCKCgCACACKAIoKAIAKAIMIAIoAhwQeBogAigCKCgCACIAIAI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IAIoAigoAmxqIAIoAhQQeBogAigCKCIAIAIoAhQgACgCbGo2AmwLIAIoAigoAsAtIAIoAigoAmxJBEAgAigCKCACKAIoKAJsNgLALQsgAiACKAIoKAK8LUEqakEDdTYCFCACIAIoAigoAgwgAigCFGtB//8DSwR/Qf//AwUgAigCKCgCDCACKAIUaws2AhQgAgJ/IAIoAhQgAigCKCgCLEsEQCACKAIoKAIsDAELIAIoAhQLNgIgIAIgAigCKCgCbCACKAIoKAJcazYCGAJAIAIoAhggAigCIEkEQCACKAIYRQRAIAIoAiRBBEcNAgsgAigCJEUNASACKAIoKAIAKAIEDQEgAigCGCACKAIUSw0BCyACAn8gAigCGCACKAIUSwRAIAIoAhQMAQsgAigCGAs2AhwgAgJ/QQAgAigCJEEERw0AGkEAIAIoAigoAgAoAgQNABogAigCHCACKAIYRgtBAXE2AhAgAigCKCACKAIoKAI4IAIoAigoAlxqIAIoAhwgAigCEBBcIAIoAigiACACKAIcIAAoAlxqNgJcIAIoAigoAgAQHAsgAkECQQAgAigCEBs2AiwLIAIoAiwhACACQTBqJAAgAAuyAgEBfyMAQRBrIgEkACABIAA2AggCQCABKAIIEHkEQCABQX42AgwMAQsgASABKAIIKAIcKAIENgIEIAEoAggoAhwoAggEQCABKAIIKAIoIAEoAggoAhwoAgggASgCCCgCJBEEAAsgASgCCCgCHCgCRARAIAEoAggoAiggASgCCCgCHCgCRCABKAIIKAIkEQQACyABKAIIKAIcKAJABEAgASgCCCgCKCABKAIIKAIcKAJAIAEoAggoAiQRBAALIAEoAggoAhwoAjgEQCABKAIIKAIoIAEoAggoAhwoAjggASgCCCgCJBEEAAsgASgCCCgCKCABKAIIKAIcIAEoAggoAiQRBAAgASgCCEEANgIcIAFBfUEAIAEoAgRB8QBGGzYCDAsgASgCDCEAIAFBEGokACAAC+sXAQJ/IwBB8ABrIgMgADYCbCADIAE2AmggAyACNgJkIANBfzYCXCADIAMoAmgvAQI2AlQgA0EANgJQIANBBzYCTCADQQQ2AkggAygCVEU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A0AgASAALQAAIgI6AAAgAkUNAyABQQFqIQEgAEEBaiIAQQNxDQALCyAAKAIAIgJBf3MgAkGBgoQIa3FBgIGChHhxDQADQCABIAI2AgAgACgCBCECIAFBBGohASAAQQRqIQAgAkGBgoQIayACQX9zcUGAgYKEeHFFDQALCyABIAAtAAAiAjoAACACRQ0AA0AgASAALQABIgI6AAEgAUEBaiEBIABBAWohACACDQALCyADKAIMIAMoAhhqQS86AAAgAygCDCADKAIYQQFqakEAOgAACyADIAMoAiRBAEIAQQAQfiIANgIIIABFBEAgAygCDBAVIANCfzcDKAwBCyADIAMoAiQCfyADKAIMBEAgAygCDAwBCyADKAIgCyADKAIIIAMoAhwQmgE3AxAgAygCDBAVAkAgAykDEEIAUwRAIAMoAggQGwwBCyADKAIkIAMpAxBBAEEDQYCA/I8EEJkBQQBIBEAgAygCJCADKQMQEJgBGiADQn83AygMAgsLIAMgAykDEDcDKAsgAykDKCEEIANBMGokACAEQiCIpwsQACAEpwsRACAAIAGtIAKtQiCGhBCYAQt/AgF/AX4jAEEgayIDJAAgAyAANgIYIAMgATYCFCADIAI2AhAgAyADKAIYIAMoAhQgAygCEBBzIgQ3AwgCQCAEQgBTBEAgA0EANgIcDAELIAMgAygCGCADKQMIIAMoAhAgAygCGCgCHBCtATYCHAsgAygCHCEAIANBIGokACAAC8QBAQF/IwBBMGsiASQAIAEgADYCKCABQQA2AiQgAUIANwMYAkADQCABKQMYIAEoAigpAzBUBEAgASABKAIoIAEpAxhBACABQRdqIAFBEGoQlwE2AgwgASgCDEF/RgRAIAFBfzYCLAwDBQJAIAEtABdBA0cNACABKAIQQRB2QYDgA3FBgMACRw0AIAEgASgCJEEBajYCJAsgASABKQMYQgF8NwMYDAILAAsLIAEgASgCJDYCLAsgASgCLCEAIAFBMGokACAACxAAIwAgAGtBcHEiACQAIAALBgAgACQACwQAIwALggECAX8BfiMAQSBrIgQkACAEIAA2AhggBCABNgIUIAQgAjYCECAEIAM2AgwgBCAEKAIYIAQoAhQg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FBEGoQcCABQQA2AqQBIAEgAUEgajYCoAEMAQsgASABKAKoASgCAEECdEGAE2ooAgA2AqQBAkACQAJAAkAgASgCqAEoAgBBAnRBkBRqKAIAQQFrDgIAAQILIAEoAqgBKAIEIQJBkJkBKAIAIQRBACEAAkACQANAIAIgAEGgiAFqLQAARwRAQdcAIQMgAEEBaiIAQdcARw0BDAILCyAAIgMNAEGAiQEhAgwBC0GAiQEhAANAIAAtAAAhBSAAQQFqIgIhACAFDQAgAiEAIANBAWsiAw0ACwsgBCgCFBogASACNgKgAQwCCyMAQRBrIgAgASgCqAEoAgQ2AgwgAUEAIAAoAgxrQQJ0QajZAGooAgA2AqABDAELIAFBADYCoAELCwJAIAEoAqABRQRAIAEgASgCpAE2AqwBDAELIAEgASgCoAEQKwJ/IAEoAqQBBEAgASgCpAEQK0ECagwBC0EAC2pBAWoQGCIANgIcIABFBEAgAUG4EygCADYCrAEMAQsgASgCHCEAAn8gASgCpAEEQCABKAKkAQwBC0H6EgshA0HfEkH6EiABKAKkARshAiABIAEoAqABNgIIIAEgAjYCBCABIAM2AgAgAEG+CiABEHAgASgCqAEgASgCHDYCCCABIAEoAhw2AqwBCyABKAKsASEAIAFBsAFqJAAgAAszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQGRogACAAKAIUIAFqNgIUIAILjwUCBn4BfyABIAEoAgBBD2pBcHEiAUEQajYCACAAAnwgASkDACEDIAEpAwghBiMAQSBrIggkAAJAIAZC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBkIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAiFQgBSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBkIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+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QFqNgIYAn9BACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCGCABKAIUSQtBAXENAAsgASgCKEGCAiABKAIUIAEoAhhrazYCYCABKAIoKAJgIAEoAigoAnRLBEAgASgCKCABKAIoKAJ0NgJgCwsLAkAgASgCKCgCYEEDTwRAIAEgASgCKCgCYEEDazoAEyABQQE7ARAgASgCKCICKAKkLSACKAKgLUEBdGogAS8BEDsBACABLQATIQMgASgCKCICKAKYLSEEIAIgAigCoC0iAkEBajYCoC0gAiAEaiADOgAAIAEgAS8BEEEBazsBECABKAIoIAEtABNB0N0Aai0AAEECdGpBmAlqIgIgAi8BAEEBajsBACABKAIoQYgTagJ/IAEvARBBgAJJBEAgAS8BEC0A0FkMAQsgAS8BEEEHdkGAAmotANBZC0ECdGoiAiACLwEAQQFqOwEAIAEgASgCKCgCoC0gASgCKCgCnC1BAWtGNgIgIAEoAigiAiACKAJ0IAEoAigoAmBrNgJ0IAEoAigiAiABKAIoKAJgIAIoAmxqNgJsIAEoAihBADYCYAwBCyABIAEoAigiAigCOCACKAJsai0AADoADyABKAIoIgIoAqQtIAIoAqAtQQF0akEAOwEAIAEtAA8hAyABKAIoIgIoApgtIQQgAiACKAKgLSICQQFqNgKgLSACIARqIAM6AAAgASgCKCABLQAPQQJ0aiICIAIvAZQBQQFqOwGUASABIAEoAigoAqAtIAEoAigoApwtQQFrRjYCICABKAIoIgIgAigCdEEBazYCdCABKAIoIgIgAigCbE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oAiw2AjwgASABKAJUKAIwNgI4IAEgASgCVCgCNDYCNCABIAEoAlQoAjg2AjAgASABKAJUKAI8NgIsIAEgASgCVCgCQDYCKCABIAEoAlQoAlA2AiQgASABKAJUKAJUNgIgIAFBASABKAJUKAJYdEEBazYCHCABQQEgASgCVCgCXHRBAWs2AhgDQCABKAIoQQ9JBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABIAEoAlAiAkEBajYCUCABIAEoAiwgAi0AACABKAIodGo2AiwgASABKAIoQQhqNgIoCyABIAEoAiQgASgCLCABKAIccUECdGooAQA2ARACQAJAA0AgASABLQARNgIMIAEgASgCLCABKAIMdjYCLCABIAEoAiggASgCDGs2AiggASABLQAQNgIMIAEoAgxFBEAgAS8BEiECIAEgASgCSCIDQQFqNgJIIAMgAjoAAAwCCyABKAIMQRBxBEAgASABLwESNgIIIAEgASgCDEEPcTYCDCABKAIMBEAgASgCKCABKAIMSQRAIAEgASgCUCICQQFqNgJQIAEgASgCLCACLQAAIAEoAih0ajYCLCABIAEoAihBCGo2AigLIAEgASgCCCABKAIsQQEgASgCDHRBAWtxajYCCCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoCyABKAIoQQ9JBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABIAEoAlAiAkEBajYCUCABIAEoAiwgAi0AACABKAIodGo2AiwgASABKAIoQQhqNgIoCyABIAEoAiAgASgCLCABKAIYcUECdGooAQA2ARACQANAIAEgAS0AETYCDCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgAS0AEDYCDCABKAIMQRBxBEAgASABLwESNgIEIAEgASgCDEEPcTYCDCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKAsLIAEgASgCBCABKAIsQQEgASgCDHRBAWtxajYCBCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgASgCSCABKAJEazYCDAJAIAEoAgQgASgCDEsEQCABIAEoAgQgASgCDGs2AgwgASgCDCABKAI4SwRAIAEoAlQoAsQ3BEAgASgCXEHdDDYCGCABKAJUQdH+ADYCBAwKCwsgASABKAIwNgIAAkAgASgCNEUEQCABIAEoAgAgASgCPCABKAIMa2o2AgAgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAkggASgCBGs2AgALDAELAkAgASgCNCABKAIMSQRAIAEgASgCACABKAI8IAEoAjRqIAEoAgxrajYCACABIAEoAgwgASgCNGs2AgwgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAjA2AgAgASgCNCABKAIISQRAIAEgASgCNDYCDCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsMAQsgASABKAIAIAEoAjQgASgCDGtqNgIAIAEoAgwgASgCCEkEQCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsLA0AgASgCCEECSwRAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCCEEDazYCCAwBCwsMAQsgASABKAJIIAEoAgRrNgIAA0AgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIIQQNrNgIIIAEoAghBAksNAAsLIAEoAggEQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEoAghBAUsEQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAACwsMAgsgASgCDEHAAHFFBEAgASABKAIgIAEvARIgASgCLEEBIAEoAgx0QQFrcWpBAnRqKAEANgEQDAELCyABKAJcQYUPNgIYIAEoAlRB0f4ANgIEDAQLDAILIAEoAgxBwABxRQRAIAEgASgCJCABLwESIAEoAixBASABKAIMdEEBa3FqQQJ0aigBADYBEAwBCwsgASgCDEEgcQRAIAEoAlRBv/4ANgIEDAILIAEoAlxB6Q42AhggASgCVEHR/gA2AgQMAQsgASgCUCABKAJMSQR/IAEoAkggASgCQEkFQQALQQFxDQELCyABIAEoAihBA3Y2AgggASABKAJQIAEoAghrNgJQIAEgASgCKCABKAIIQQN0azYCKCABIAEoAixBASABKAIodEEBa3E2AiwgASgCXCABKAJQNgIAIAEoAlwgASgCSDYCDCABKAJcAn8gASgCUCABKAJMSQRAIAEoAkwgASgCUGtBBWoMAQtBBSABKAJQIAEoAkxraws2AgQgASgCXAJ/IAEoAkggASgCQEkEQCABKAJAIAEoAkhrQYECagwBC0GBAiABKAJIIAEoAkBraws2AhAgASgCVCABKAIsNgI8IAEoAlQgASgCKDYCQCAAIAAoAlgoAgw2AkggACAAKAJYKAIQNgJAIAAgACgCWCgCADYCTCAAI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AAAAAAAAABAREgAIBwkGCgULBAwDDQIOAQ8AQYTtAAtpAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAKAAAADAAAAA4AAAAQAAAAFAAAABgAAAAcAAAAIAAAACgAAAAwAAAAOAAAAEAAAABQAAAAYAAAAHAAAACAAAAAoAAAAMAAAADgAEGE7gALegEAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAQAAAAGAAAACAAAAAwAAAAAABAACAAQAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAAIAAAADAAAABAAAAAYAAAMS4yLjExAEGI7wALbQcAAAAEAAQACAAEAAgAAAAEAAUAEAAIAAgAAAAEAAYAIAAgAAgAAAAEAAQAEAAQAAkAAAAIABAAIAAgAAkAAAAIABAAgACAAAkAAAAIACAAgAAAAQkAAAAgAIAAAgEABAkAAAAgAAIBAgEAEAkAQYDwAAulAgMABAAFAAYABwAIAAkACgALAA0ADwARABMAFwAbAB8AIwArADMAOwBDAFMAYwBzAIMAowDDAOMAAgEAAAAAAAAQABAAEAAQABAAEAAQABAAEQARABEAEQASABIAEgASABMAEwATABMAFAAUABQAFAAVABUAFQAVABAATQDKAAAAAQACAAMABAAFAAcACQANABEAGQAhADEAQQBhAIEAwQABAYEBAQIBAwEEAQYBCAEMARABGAEgATABQAFgAAAAABAAEAAQABAAEQARABIAEgATABMAFAAUABUAFQAWABYAFwAXABgAGAAZABkAGgAaABsAGwAcABwAHQAdAEAAQAAQABEAEgAAAAgABwAJAAYACgAFAAsABAAMAAMADQACAA4AAQAPAEGw8gALwRFgBwAAAAhQAAAIEAAUCHMAEgcfAAAIcAAACDAAAAnAABAHCgAACGAAAAggAAAJoAAACAAAAAiAAAAIQAAACeAAEAcGAAAIWAAACBgAAAmQABMHOwAACHgAAAg4AAAJ0AARBxEAAAhoAAAIKAAACbAAAAgIAAAIiAAACEgAAAnwABAHBAAACFQAAAgUABUI4wATBysAAAh0AAAIN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0ZWQAQ2Fubm90IHNlbmQgYWZ0ZXIgc29ja2V0IHNodXRkb3duAE9wZXJhdGlvbiBhbHJlYWR5IGluIHByb2dyZXNzAE9wZXJhdGlvbiBpbiBwcm9ncmVzcwBTdGFsZSBmaWxlIGhhbmRsZQBSZW1vdGUgSS9PIGVycm9yAFF1b3RhIGV4Y2VlZGVkAE5vIG1lZGl1bSBmb3VuZABXcm9uZyBtZWRpdW0gdHlwZQBObyBlcnJvciBpbmZvcm1hdGlvbgBBkJcBC1JQUFAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAAAEAAAAIAAAAlEsAALRLAEGQmQELAgxQAEHImQELCR8AAADkTAAAAwBB5JkBC4wBLfRRWM+MscBG9rXLKTEDxwRbcDC0Xf0geH+LmthZKVBoSImrp1YDbP+3zYg/1He0K6WjcPG65Kj8QYP92W/hinovLXSWBx8NCV4Ddixw90ClLKdvV0GoqnTfoFhkA0rHxDxTrq9fGAQVseNtKIarDKS/Q/DpUIE5VxZSN/////////////////////8="; if (!isDataURI(wasmBinaryFile)) { wasmBinaryFile = locateFile(wasmBinaryFile); } function getBinary(file) { try { if (file == wasmBinaryFile && wasmBinary) { return new Uint8Array(wasmBinary); } var binary = tryParseAsDataURI(file); if (binary) { return binary; } if (readBinary) { return readBinary(file); } else { throw "sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"; } } catch (err) { abort(err); } } function instantiateSync(file, info) { var instance; var module; var binary; try { binary = getBinary(file); module = new WebAssembly.Module(binary); instance = new WebAssembly.Instance(module, info); } catch (e) { var str = e.toString(); err("failed to compile wasm module: " + str); if (str.includes("imported Memory") || str.includes("memory import")) { err( "Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)." ); } throw e; } return [instance, module]; } function createWasm() { var info = { a: asmLibraryArg }; function receiveInstance(instance, module) { var exports = instance.exports; Module["asm"] = exports; wasmMemory = Module["asm"]["u"]; updateGlobalBufferAndViews(wasmMemory.buffer); wasmTable = Module["asm"]["za"]; addOnInit(Module["asm"]["v"]); removeRunDependency("wasm-instantiate"); } addRunDependency("wasm-instantiate"); if (Module["instantiateWasm"]) { try { var exports = Module["instantiateWasm"](info, receiveInstance); return exports; } catch (e) { err("Module.instantiateWasm callback failed with error: " + e); return false; } } var result = instantiateSync(wasmBinaryFile, info); receiveInstance(result[0]); return Module["asm"]; } var tempDouble; var tempI64; function callRuntimeCallbacks(callbacks) { while (callbacks.length > 0) { var callback = callbacks.shift(); if (typeof callback == "function") { callback(Module); continue; } var func = callback.func; if (typeof func === "number") { if (callback.arg === undefined) { wasmTable.get(func)(); } else { wasmTable.get(func)(callback.arg); } } else { func(callback.arg === undefined ? null : callback.arg); } } } function _gmtime_r(time, tmPtr) { var date = new Date(HEAP32[time >> 2] * 1e3); HEAP32[tmPtr >> 2] = date.getUTCSeconds(); HEAP32[(tmPtr + 4) >> 2] = date.getUTCMinutes(); HEAP32[(tmPtr + 8) >> 2] = date.getUTCHours(); HEAP32[(tmPtr + 12) >> 2] = date.getUTCDate(); HEAP32[(tmPtr + 16) >> 2] = date.getUTCMonth(); HEAP32[(tmPtr + 20) >> 2] = date.getUTCFullYear() - 1900; HEAP32[(tmPtr + 24) >> 2] = date.getUTCDay(); HEAP32[(tmPtr + 36) >> 2] = 0; HEAP32[(tmPtr + 32) >> 2] = 0; var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = ((date.getTime() - start) / (1e3 * 60 * 60 * 24)) | 0; HEAP32[(tmPtr + 28) >> 2] = yday; if (!_gmtime_r.GMTString) _gmtime_r.GMTString = allocateUTF8("GMT"); HEAP32[(tmPtr + 40) >> 2] = _gmtime_r.GMTString; return tmPtr; } function ___gmtime_r(a0, a1) { return _gmtime_r(a0, a1); } var PATH = { splitPath: function(filename) { var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; return splitPathRe.exec(filename).slice(1); }, normalizeArray: function(parts, allowAboveRoot) { var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === ".") { parts.splice(i, 1); } else if (last === "..") { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } if (allowAboveRoot) { for (; up; up--) { parts.unshift(".."); } } return parts; }, normalize: function(path) { var isAbsolute = path.charAt(0) === "/", trailingSlash = path.substr(-1) === "/"; path = PATH.normalizeArray( path.split("/").filter(function(p) { return !!p; }), !isAbsolute ).join("/"); if (!path && !isAbsolute) { path = "."; } if (path && trailingSlash) { path += "/"; } return (isAbsolute ? "/" : "") + path; }, dirname: function(path) { var result = PATH.splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { return "."; } if (dir) { dir = dir.substr(0, dir.length - 1); } return root + dir; }, basename: function(path) { if (path === "/") return "/"; path = PATH.normalize(path); path = path.replace(/\/$/, ""); var lastSlash = path.lastIndexOf("/"); if (lastSlash === -1) return path; return path.substr(lastSlash + 1); }, extname: function(path) { return PATH.splitPath(path)[3]; }, join: function() { var paths = Array.prototype.slice.call(arguments, 0); return PATH.normalize(paths.join("/")); }, join2: function(l, r) { return PATH.normalize(l + "/" + r); } }; function getRandomDevice() { if ( typeof crypto === "object" && typeof crypto["getRandomValues"] === "function" ) { var randomBuffer = new Uint8Array(1); return function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; }; } else if (ENVIRONMENT_IS_NODE) { try { var crypto_module = __webpack_require__(76417); return function() { return crypto_module["randomBytes"](1)[0]; }; } catch (e) {} } return function() { abort("randomDevice"); }; } var PATH_FS = { resolve: function() { var resolvedPath = "", resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = i >= 0 ? arguments[i] : FS.cwd(); if (typeof path !== "string") { throw new TypeError("Arguments to path.resolve must be strings"); } else if (!path) { return ""; } resolvedPath = path + "/" + resolvedPath; resolvedAbsolute = path.charAt(0) === "/"; } resolvedPath = PATH.normalizeArray( resolvedPath.split("/").filter(function(p) { return !!p; }), !resolvedAbsolute ).join("/"); return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; }, relative: function(from, to) { from = PATH_FS.resolve(from).substr(1); to = PATH_FS.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== "") break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== "") break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split("/")); var toParts = trim(to.split("/")); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push(".."); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join("/"); } }; var TTY = { ttys: [], init: function() {}, shutdown: function() {}, register: function(dev, ops) { TTY.ttys[dev] = { input: [], output: [], ops: ops }; FS.registerDevice(dev, TTY.stream_ops); }, stream_ops: { open: function(stream) { var tty = TTY.ttys[stream.node.rdev]; if (!tty) { throw new FS.ErrnoError(43); } stream.tty = tty; stream.seekable = false; }, close: function(stream) { stream.tty.ops.flush(stream.tty); }, flush: function(stream) { stream.tty.ops.flush(stream.tty); }, read: function(stream, buffer, offset, length, pos) { if (!stream.tty || !stream.tty.ops.get_char) { throw new FS.ErrnoError(60); } var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = stream.tty.ops.get_char(stream.tty); } catch (e) { throw new FS.ErrnoError(29); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(6); } if (result === null || result === undefined) break; bytesRead++; buffer[offset + i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; }, write: function(stream, buffer, offset, length, pos) { if (!stream.tty || !stream.tty.ops.put_char) { throw new FS.ErrnoError(60); } try { for (var i = 0; i < length; i++) { stream.tty.ops.put_char(stream.tty, buffer[offset + i]); } } catch (e) { throw new FS.ErrnoError(29); } if (length) { stream.node.timestamp = Date.now(); } return i; } }, default_tty_ops: { get_char: function(tty) { if (!tty.input.length) { var result = null; if (ENVIRONMENT_IS_NODE) { var BUFSIZE = 256; var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE); var bytesRead = 0; try { bytesRead = nodeFS.readSync( process.stdin.fd, buf, 0, BUFSIZE, null ); } catch (e) { if (e.toString().includes("EOF")) bytesRead = 0; else throw e; } if (bytesRead > 0) { result = buf.slice(0, bytesRead).toString("utf-8"); } else { result = null; } } else if ( typeof window != "undefined" && typeof window.prompt == "function" ) { result = window.prompt("Input: "); if (result !== null) { result += "\n"; } } else if (typeof readline == "function") { result = readline(); if (result !== null) { result += "\n"; } } if (!result) { return null; } tty.input = intArrayFromString(result, true); } return tty.input.shift(); }, put_char: function(tty, val) { if (val === null || val === 10) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); } }, flush: function(tty) { if (tty.output && tty.output.length > 0) { out(UTF8ArrayToString(tty.output, 0)); tty.output = []; } } }, default_tty1_ops: { put_char: function(tty, val) { if (val === null || val === 10) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } else { if (val != 0) tty.output.push(val); } }, flush: function(tty) { if (tty.output && tty.output.length > 0) { err(UTF8ArrayToString(tty.output, 0)); tty.output = []; } } } }; function mmapAlloc(size) { var alignedSize = alignMemory(size, 65536); var ptr = _malloc(alignedSize); while (size < alignedSize) HEAP8[ptr + size++] = 0; return ptr; } var MEMFS = { ops_table: null, mount: function(mount) { return MEMFS.createNode(null, "/", 16384 | 511, 0); }, createNode: function(parent, name, mode, dev) { if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { throw new FS.ErrnoError(63); } if (!MEMFS.ops_table) { MEMFS.ops_table = { dir: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, lookup: MEMFS.node_ops.lookup, mknod: MEMFS.node_ops.mknod, rename: MEMFS.node_ops.rename, unlink: MEMFS.node_ops.unlink, rmdir: MEMFS.node_ops.rmdir, readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: { llseek: MEMFS.stream_ops.llseek, read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, allocate: MEMFS.stream_ops.allocate, mmap: MEMFS.stream_ops.mmap, msync: MEMFS.stream_ops.msync } }, link: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, readlink: MEMFS.node_ops.readlink }, stream: {} }, chrdev: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: FS.chrdev_stream_ops } }; } var node = FS.createNode(parent, name, mode, dev); if (FS.isDir(node.mode)) { node.node_ops = MEMFS.ops_table.dir.node; node.stream_ops = MEMFS.ops_table.dir.stream; node.contents = {}; } else if (FS.isFile(node.mode)) { node.node_ops = MEMFS.ops_table.file.node; node.stream_ops = MEMFS.ops_table.file.stream; node.usedBytes = 0; node.contents = null; } else if (FS.isLink(node.mode)) { node.node_ops = MEMFS.ops_table.link.node; node.stream_ops = MEMFS.ops_table.link.stream; } else if (FS.isChrdev(node.mode)) { node.node_ops = MEMFS.ops_table.chrdev.node; node.stream_ops = MEMFS.ops_table.chrdev.stream; } node.timestamp = Date.now(); if (parent) { parent.contents[name] = node; parent.timestamp = node.timestamp; } return node; }, getFileDataAsTypedArray: function(node) { if (!node.contents) return new Uint8Array(0); if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); return new Uint8Array(node.contents); }, expandFileStorage: function(node, newCapacity) { var prevCapacity = node.contents ? node.contents.length : 0; if (prevCapacity >= newCapacity) return; var CAPACITY_DOUBLING_MAX = 1024 * 1024; newCapacity = Math.max( newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125)) >>> 0 ); if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); var oldContents = node.contents; node.contents = new Uint8Array(newCapacity); if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); }, resizeFileStorage: function(node, newSize) { if (node.usedBytes == newSize) return; if (newSize == 0) { node.contents = null; node.usedBytes = 0; } else { var oldContents = node.contents; node.contents = new Uint8Array(newSize); if (oldContents) { node.contents.set( oldContents.subarray(0, Math.min(newSize, node.usedBytes)) ); } node.usedBytes = newSize; } }, node_ops: { getattr: function(node) { var attr = {}; attr.dev = FS.isChrdev(node.mode) ? node.id : 1; attr.ino = node.id; attr.mode = node.mode; attr.nlink = 1; attr.uid = 0; attr.gid = 0; attr.rdev = node.rdev; if (FS.isDir(node.mode)) { attr.size = 4096; } else if (FS.isFile(node.mode)) { attr.size = node.usedBytes; } else if (FS.isLink(node.mode)) { attr.size = node.link.length; } else { attr.size = 0; } attr.atime = new Date(node.timestamp); attr.mtime = new Date(node.timestamp); attr.ctime = new Date(node.timestamp); attr.blksize = 4096; attr.blocks = Math.ceil(attr.size / attr.blksize); return attr; }, setattr: function(node, attr) { if (attr.mode !== undefined) { node.mode = attr.mode; } if (attr.timestamp !== undefined) { node.timestamp = attr.timestamp; } if (attr.size !== undefined) { MEMFS.resizeFileStorage(node, attr.size); } }, lookup: function(parent, name) { throw FS.genericErrors[44]; }, mknod: function(parent, name, mode, dev) { return MEMFS.createNode(parent, name, mode, dev); }, rename: function(old_node, new_dir, new_name) { if (FS.isDir(old_node.mode)) { var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) {} if (new_node) { for (var i in new_node.contents) { throw new FS.ErrnoError(55); } } } delete old_node.parent.contents[old_node.name]; old_node.parent.timestamp = Date.now(); old_node.name = new_name; new_dir.contents[new_name] = old_node; new_dir.timestamp = old_node.parent.timestamp; old_node.parent = new_dir; }, unlink: function(parent, name) { delete parent.contents[name]; parent.timestamp = Date.now(); }, rmdir: function(parent, name) { var node = FS.lookupNode(parent, name); for (var i in node.contents) { throw new FS.ErrnoError(55); } delete parent.contents[name]; parent.timestamp = Date.now(); }, readdir: function(node) { var entries = [".", ".."]; for (var key in node.contents) { if (!node.contents.hasOwnProperty(key)) { continue; } entries.push(key); } return entries; }, symlink: function(parent, newname, oldpath) { var node = MEMFS.createNode(parent, newname, 511 | 40960, 0); node.link = oldpath; return node; }, readlink: function(node) { if (!FS.isLink(node.mode)) { throw new FS.ErrnoError(28); } return node.link; } }, stream_ops: { read: function(stream, buffer, offset, length, position) { var contents = stream.node.contents; if (position >= stream.node.usedBytes) return 0; var size = Math.min(stream.node.usedBytes - position, length); if (size > 8 && contents.subarray) { buffer.set(contents.subarray(position, position + size), offset); } else { for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; } return size; }, write: function(stream, buffer, offset, length, position, canOwn) { if (buffer.buffer === HEAP8.buffer) { canOwn = false; } if (!length) return 0; var node = stream.node; node.timestamp = Date.now(); if (buffer.subarray && (!node.contents || node.contents.subarray)) { if (canOwn) { node.contents = buffer.subarray(offset, offset + length); node.usedBytes = length; return length; } else if (node.usedBytes === 0 && position === 0) { node.contents = buffer.slice(offset, offset + length); node.usedBytes = length; return length; } else if (position + length <= node.usedBytes) { node.contents.set(buffer.subarray(offset, offset + length), position); return length; } } MEMFS.expandFileStorage(node, position + length); if (node.contents.subarray && buffer.subarray) { node.contents.set(buffer.subarray(offset, offset + length), position); } else { for (var i = 0; i < length; i++) { node.contents[position + i] = buffer[offset + i]; } } node.usedBytes = Math.max(node.usedBytes, position + length); return length; }, llseek: function(stream, offset, whence) { var position = offset; if (whence === 1) { position += stream.position; } else if (whence === 2) { if (FS.isFile(stream.node.mode)) { position += stream.node.usedBytes; } } if (position < 0) { throw new FS.ErrnoError(28); } return position; }, allocate: function(stream, offset, length) { MEMFS.expandFileStorage(stream.node, offset + length); stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); }, mmap: function(stream, address, length, position, prot, flags) { if (address !== 0) { throw new FS.ErrnoError(28); } if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } var ptr; var allocated; var contents = stream.node.contents; if (!(flags & 2) && contents.buffer === buffer) { allocated = false; ptr = contents.byteOffset; } else { if (position > 0 || position + length < contents.length) { if (contents.subarray) { contents = contents.subarray(position, position + length); } else { contents = Array.prototype.slice.call( contents, position, position + length ); } } allocated = true; ptr = mmapAlloc(length); if (!ptr) { throw new FS.ErrnoError(48); } HEAP8.set(contents, ptr); } return { ptr: ptr, allocated: allocated }; }, msync: function(stream, buffer, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } if (mmapFlags & 2) { return 0; } var bytesWritten = MEMFS.stream_ops.write( stream, buffer, 0, length, offset, false ); return 0; } } }; var ERRNO_CODES = { EPERM: 63, ENOENT: 44, ESRCH: 71, EINTR: 27, EIO: 29, ENXIO: 60, E2BIG: 1, ENOEXEC: 45, EBADF: 8, ECHILD: 12, EAGAIN: 6, EWOULDBLOCK: 6, ENOMEM: 48, EACCES: 2, EFAULT: 21, ENOTBLK: 105, EBUSY: 10, EEXIST: 20, EXDEV: 75, ENODEV: 43, ENOTDIR: 54, EISDIR: 31, EINVAL: 28, ENFILE: 41, EMFILE: 33, ENOTTY: 59, ETXTBSY: 74, EFBIG: 22, ENOSPC: 51, ESPIPE: 70, EROFS: 69, EMLINK: 34, EPIPE: 64, EDOM: 18, ERANGE: 68, ENOMSG: 49, EIDRM: 24, ECHRNG: 106, EL2NSYNC: 156, EL3HLT: 107, EL3RST: 108, ELNRNG: 109, EUNATCH: 110, ENOCSI: 111, EL2HLT: 112, EDEADLK: 16, ENOLCK: 46, EBADE: 113, EBADR: 114, EXFULL: 115, ENOANO: 104, EBADRQC: 103, EBADSLT: 102, EDEADLOCK: 16, EBFONT: 101, ENOSTR: 100, ENODATA: 116, ETIME: 117, ENOSR: 118, ENONET: 119, ENOPKG: 120, EREMOTE: 121, ENOLINK: 47, EADV: 122, ESRMNT: 123, ECOMM: 124, EPROTO: 65, EMULTIHOP: 36, EDOTDOT: 125, EBADMSG: 9, ENOTUNIQ: 126, EBADFD: 127, EREMCHG: 128, ELIBACC: 129, ELIBBAD: 130, ELIBSCN: 131, ELIBMAX: 132, ELIBEXEC: 133, ENOSYS: 52, ENOTEMPTY: 55, ENAMETOOLONG: 37, ELOOP: 32, EOPNOTSUPP: 138, EPFNOSUPPORT: 139, ECONNRESET: 15, ENOBUFS: 42, EAFNOSUPPORT: 5, EPROTOTYPE: 67, ENOTSOCK: 57, ENOPROTOOPT: 50, ESHUTDOWN: 140, ECONNREFUSED: 14, EADDRINUSE: 3, ECONNABORTED: 13, ENETUNREACH: 40, ENETDOWN: 38, ETIMEDOUT: 73, EHOSTDOWN: 142, EHOSTUNREACH: 23, EINPROGRESS: 26, EALREADY: 7, EDESTADDRREQ: 17, EMSGSIZE: 35, EPROTONOSUPPORT: 66, ESOCKTNOSUPPORT: 137, EADDRNOTAVAIL: 4, ENETRESET: 39, EISCONN: 30, ENOTCONN: 53, ETOOMANYREFS: 141, EUSERS: 136, EDQUOT: 19, ESTALE: 72, ENOTSUP: 138, ENOMEDIUM: 148, EILSEQ: 25, EOVERFLOW: 61, ECANCELED: 11, ENOTRECOVERABLE: 56, EOWNERDEAD: 62, ESTRPIPE: 135 }; var NODEFS = { isWindows: false, staticInit: function() { NODEFS.isWindows = !!process.platform.match(/^win/); var flags = { fs: fs.constants }; if (flags["fs"]) { flags = flags["fs"]; } NODEFS.flagsForNodeMap = { 1024: flags["O_APPEND"], 64: flags["O_CREAT"], 128: flags["O_EXCL"], 256: flags["O_NOCTTY"], 0: flags["O_RDONLY"], 2: flags["O_RDWR"], 4096: flags["O_SYNC"], 512: flags["O_TRUNC"], 1: flags["O_WRONLY"] }; }, bufferFrom: function(arrayBuffer) { return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); }, convertNodeCode: function(e) { var code = e.code; return ERRNO_CODES[code]; }, mount: function(mount) { return NODEFS.createNode(null, "/", NODEFS.getMode(mount.opts.root), 0); }, createNode: function(parent, name, mode, dev) { if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { throw new FS.ErrnoError(28); } var node = FS.createNode(parent, name, mode); node.node_ops = NODEFS.node_ops; node.stream_ops = NODEFS.stream_ops; return node; }, getMode: function(path) { var stat; try { stat = fs.lstatSync(path); if (NODEFS.isWindows) { stat.mode = stat.mode | ((stat.mode & 292) >> 2); } } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } return stat.mode; }, realPath: function(node) { var parts = []; while (node.parent !== node) { parts.push(node.name); node = node.parent; } parts.push(node.mount.opts.root); parts.reverse(); return PATH.join.apply(null, parts); }, flagsForNode: function(flags) { flags &= ~2097152; flags &= ~2048; flags &= ~32768; flags &= ~524288; var newFlags = 0; for (var k in NODEFS.flagsForNodeMap) { if (flags & k) { newFlags |= NODEFS.flagsForNodeMap[k]; flags ^= k; } } if (!flags) { return newFlags; } else { throw new FS.ErrnoError(28); } }, node_ops: { getattr: function(node) { var path = NODEFS.realPath(node); var stat; try { stat = fs.lstatSync(path); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } if (NODEFS.isWindows && !stat.blksize) { stat.blksize = 4096; } if (NODEFS.isWindows && !stat.blocks) { stat.blocks = ((stat.size + stat.blksize - 1) / stat.blksize) | 0; } return { dev: stat.dev, ino: stat.ino, mode: stat.mode, nlink: stat.nlink, uid: stat.uid, gid: stat.gid, rdev: stat.rdev, size: stat.size, atime: stat.atime, mtime: stat.mtime, ctime: stat.ctime, blksize: stat.blksize, blocks: stat.blocks }; }, setattr: function(node, attr) { var path = NODEFS.realPath(node); try { if (attr.mode !== undefined) { fs.chmodSync(path, attr.mode); node.mode = attr.mode; } if (attr.timestamp !== undefined) { var date = new Date(attr.timestamp); fs.utimesSync(path, date, date); } if (attr.size !== undefined) { fs.truncateSync(path, attr.size); } } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, lookup: function(parent, name) { var path = PATH.join2(NODEFS.realPath(parent), name); var mode = NODEFS.getMode(path); return NODEFS.createNode(parent, name, mode); }, mknod: function(parent, name, mode, dev) { var node = NODEFS.createNode(parent, name, mode, dev); var path = NODEFS.realPath(node); try { if (FS.isDir(node.mode)) { fs.mkdirSync(path, node.mode); } else { fs.writeFileSync(path, "", { mode: node.mode }); } } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } return node; }, rename: function(oldNode, newDir, newName) { var oldPath = NODEFS.realPath(oldNode); var newPath = PATH.join2(NODEFS.realPath(newDir), newName); try { fs.renameSync(oldPath, newPath); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } oldNode.name = newName; }, unlink: function(parent, name) { var path = PATH.join2(NODEFS.realPath(parent), name); try { fs.unlinkSync(path); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, rmdir: function(parent, name) { var path = PATH.join2(NODEFS.realPath(parent), name); try { fs.rmdirSync(path); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, readdir: function(node) { var path = NODEFS.realPath(node); try { return fs.readdirSync(path); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, symlink: function(parent, newName, oldPath) { var newPath = PATH.join2(NODEFS.realPath(parent), newName); try { fs.symlinkSync(oldPath, newPath); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, readlink: function(node) { var path = NODEFS.realPath(node); try { path = fs.readlinkSync(path); path = NODEJS_PATH.relative( NODEJS_PATH.resolve(node.mount.opts.root), path ); return path; } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } } }, stream_ops: { open: function(stream) { var path = NODEFS.realPath(stream.node); try { if (FS.isFile(stream.node.mode)) { stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags)); } } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, close: function(stream) { try { if (FS.isFile(stream.node.mode) && stream.nfd) { fs.closeSync(stream.nfd); } } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, read: function(stream, buffer, offset, length, position) { if (length === 0) return 0; try { return fs.readSync( stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position ); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, write: function(stream, buffer, offset, length, position) { try { return fs.writeSync( stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position ); } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } }, llseek: function(stream, offset, whence) { var position = offset; if (whence === 1) { position += stream.position; } else if (whence === 2) { if (FS.isFile(stream.node.mode)) { try { var stat = fs.fstatSync(stream.nfd); position += stat.size; } catch (e) { throw new FS.ErrnoError(NODEFS.convertNodeCode(e)); } } } if (position < 0) { throw new FS.ErrnoError(28); } return position; }, mmap: function(stream, address, length, position, prot, flags) { if (address !== 0) { throw new FS.ErrnoError(28); } if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } var ptr = mmapAlloc(length); NODEFS.stream_ops.read(stream, HEAP8, ptr, length, position); return { ptr: ptr, allocated: true }; }, msync: function(stream, buffer, offset, length, mmapFlags) { if (!FS.isFile(stream.node.mode)) { throw new FS.ErrnoError(43); } if (mmapFlags & 2) { return 0; } var bytesWritten = NODEFS.stream_ops.write( stream, buffer, 0, length, offset, false ); return 0; } } }; var NODERAWFS = { lookupPath: function(path) { return { path: path, node: { mode: NODEFS.getMode(path) } }; }, createStandardStreams: function() { FS.streams[0] = { fd: 0, nfd: 0, position: 0, path: "", flags: 0, tty: true, seekable: false }; for (var i = 1; i < 3; i++) { FS.streams[i] = { fd: i, nfd: i, position: 0, path: "", flags: 577, tty: true, seekable: false }; } }, cwd: function() { return process.cwd(); }, chdir: function() { process.chdir.apply(void 0, arguments); }, mknod: function(path, mode) { if (FS.isDir(path)) { fs.mkdirSync(path, mode); } else { fs.writeFileSync(path, "", { mode: mode }); } }, mkdir: function() { fs.mkdirSync.apply(void 0, arguments); }, symlink: function() { fs.symlinkSync.apply(void 0, arguments); }, rename: function() { fs.renameSync.apply(void 0, arguments); }, rmdir: function() { fs.rmdirSync.apply(void 0, arguments); }, readdir: function() { fs.readdirSync.apply(void 0, arguments); }, unlink: function() { fs.unlinkSync.apply(void 0, arguments); }, readlink: function() { return fs.readlinkSync.apply(void 0, arguments); }, stat: function() { return fs.statSync.apply(void 0, arguments); }, lstat: function() { return fs.lstatSync.apply(void 0, arguments); }, chmod: function() { fs.chmodSync.apply(void 0, arguments); }, fchmod: function() { fs.fchmodSync.apply(void 0, arguments); }, chown: function() { fs.chownSync.apply(void 0, arguments); }, fchown: function() { fs.fchownSync.apply(void 0, arguments); }, truncate: function() { fs.truncateSync.apply(void 0, arguments); }, ftruncate: function(fd, len) { if (len < 0) { throw new FS.ErrnoError(28); } fs.ftruncateSync.apply(void 0, arguments); }, utime: function() { fs.utimesSync.apply(void 0, arguments); }, open: function(path, flags, mode, suggestFD) { if (typeof flags === "string") { flags = VFS.modeStringToFlags(flags); } var nfd = fs.openSync(path, NODEFS.flagsForNode(flags), mode); var fd = suggestFD != null ? suggestFD : FS.nextfd(nfd); var stream = { fd: fd, nfd: nfd, position: 0, path: path, flags: flags, seekable: true }; FS.streams[fd] = stream; return stream; }, close: function(stream) { if (!stream.stream_ops) { fs.closeSync(stream.nfd); } FS.closeStream(stream.fd); }, llseek: function(stream, offset, whence) { if (stream.stream_ops) { return VFS.llseek(stream, offset, whence); } var position = offset; if (whence === 1) { position += stream.position; } else if (whence === 2) { position += fs.fstatSync(stream.nfd).size; } else if (whence !== 0) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } if (position < 0) { throw new FS.ErrnoError(ERRNO_CODES.EINVAL); } stream.position = position; return position; }, read: function(stream, buffer, offset, length, position) { if (stream.stream_ops) { return VFS.read(stream, buffer, offset, length, position); } var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; var bytesRead = fs.readSync( stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position ); if (!seeking) stream.position += bytesRead; return bytesRead; }, write: function(stream, buffer, offset, length, position) { if (stream.stream_ops) { return VFS.write(stream, buffer, offset, length, position); } if (stream.flags & +"1024") { FS.llseek(stream, 0, +"2"); } var seeking = typeof position !== "undefined"; if (!seeking && stream.seekable) position = stream.position; var bytesWritten = fs.writeSync( stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position ); if (!seeking) stream.position += bytesWritten; return bytesWritten; }, allocate: function() { throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP); }, mmap: function(stream, address, length, position, prot, flags) { if (stream.stream_ops) { return VFS.mmap(stream, address, length, position, prot, flags); } if (address !== 0) { throw new FS.ErrnoError(28); } var ptr = mmapAlloc(length); FS.read(stream, HEAP8, ptr, length, position); return { ptr: ptr, allocated: true }; }, msync: function(stream, buffer, offset, length, mmapFlags) { if (stream.stream_ops) { return VFS.msync(stream, buffer, offset, length, mmapFlags); } if (mmapFlags & 2) { return 0; } FS.write(stream, buffer, 0, length, offset); return 0; }, munmap: function() { return 0; }, ioctl: function() { throw new FS.ErrnoError(ERRNO_CODES.ENOTTY); } }; var FS = { root: null, mounts: [], devices: {}, streams: [], nextInode: 1, nameTable: null, currentPath: "/", initialized: false, ignorePermissions: true, trackingDelegate: {}, tracking: { openFlags: { READ: 1, WRITE: 2 } }, ErrnoError: null, genericErrors: {}, filesystems: null, syncFSRequests: 0, lookupPath: function(path, opts) { path = PATH_FS.resolve(FS.cwd(), path); opts = opts || {}; if (!path) return { path: "", node: null }; var defaults = { follow_mount: true, recurse_count: 0 }; for (var key in defaults) { if (opts[key] === undefined) { opts[key] = defaults[key]; } } if (opts.recurse_count > 8) { throw new FS.ErrnoError(32); } var parts = PATH.normalizeArray( path.split("/").filter(function(p) { return !!p; }), false ); var current = FS.root; var current_path = "/"; for (var i = 0; i < parts.length; i++) { var islast = i === parts.length - 1; if (islast && opts.parent) { break; } current = FS.lookupNode(current, parts[i]); current_path = PATH.join2(current_path, parts[i]); if (FS.isMountpoint(current)) { if (!islast || (islast && opts.follow_mount)) { current = current.mounted.root; } } if (!islast || opts.follow) { var count = 0; while (FS.isLink(current.mode)) { var link = FS.readlink(current_path); current_path = PATH_FS.resolve(PATH.dirname(current_path), link); var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count }); current = lookup.node; if (count++ > 40) { throw new FS.ErrnoError(32); } } } } return { path: current_path, node: current }; }, getPath: function(node) { var path; while (true) { if (FS.isRoot(node)) { var mount = node.mount.mountpoint; if (!path) return mount; return mount[mount.length - 1] !== "/" ? mount + "/" + path : mount + path; } path = path ? node.name + "/" + path : node.name; node = node.parent; } }, hashName: function(parentid, name) { var hash = 0; for (var i = 0; i < name.length; i++) { hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; } return ((parentid + hash) >>> 0) % FS.nameTable.length; }, hashAddNode: function(node) { var hash = FS.hashName(node.parent.id, node.name); node.name_next = FS.nameTable[hash]; FS.nameTable[hash] = node; }, hashRemoveNode: function(node) { var hash = FS.hashName(node.parent.id, node.name); if (FS.nameTable[hash] === node) { FS.nameTable[hash] = node.name_next; } else { var current = FS.nameTable[hash]; while (current) { if (current.name_next === node) { current.name_next = node.name_next; break; } current = current.name_next; } } }, lookupNode: function(parent, name) { var errCode = FS.mayLookup(parent); if (errCode) { throw new FS.ErrnoError(errCode, parent); } var hash = FS.hashName(parent.id, name); for (var node = FS.nameTable[hash]; node; node = node.name_next) { var nodeName = node.name; if (node.parent.id === parent.id && nodeName === name) { return node; } } return FS.lookup(parent, name); }, createNode: function(parent, name, mode, rdev) { var node = new FS.FSNode(parent, name, mode, rdev); FS.hashAddNode(node); return node; }, destroyNode: function(node) { FS.hashRemoveNode(node); }, isRoot: function(node) { return node === node.parent; }, isMountpoint: function(node) { return !!node.mounted; }, isFile: function(mode) { return (mode & 61440) === 32768; }, isDir: function(mode) { return (mode & 61440) === 16384; }, isLink: function(mode) { return (mode & 61440) === 40960; }, isChrdev: function(mode) { return (mode & 61440) === 8192; }, isBlkdev: function(mode) { return (mode & 61440) === 24576; }, isFIFO: function(mode) { return (mode & 61440) === 4096; }, isSocket: function(mode) { return (mode & 49152) === 49152; }, flagModes: { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, modeStringToFlags: function(str) { var flags = FS.flagModes[str]; if (typeof flags === "undefined") { throw new Error("Unknown file open mode: " + str); } return flags; }, flagsToPermissionString: function(flag) { var perms = ["r", "w", "rw"][flag & 3]; if (flag & 512) { perms += "w"; } return perms; }, nodePermissions: function(node, perms) { if (FS.ignorePermissions) { return 0; } if (perms.includes("r") && !(node.mode & 292)) { return 2; } else if (perms.includes("w") && !(node.mode & 146)) { return 2; } else if (perms.includes("x") && !(node.mode & 73)) { return 2; } return 0; }, mayLookup: function(dir) { var errCode = FS.nodePermissions(dir, "x"); if (errCode) return errCode; if (!dir.node_ops.lookup) return 2; return 0; }, mayCreate: function(dir, name) { try { var node = FS.lookupNode(dir, name); return 20; } catch (e) {} return FS.nodePermissions(dir, "wx"); }, mayDelete: function(dir, name, isdir) { var node; try { node = FS.lookupNode(dir, name); } catch (e) { return e.errno; } var errCode = FS.nodePermissions(dir, "wx"); if (errCode) { return errCode; } if (isdir) { if (!FS.isDir(node.mode)) { return 54; } if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { return 10; } } else { if (FS.isDir(node.mode)) { return 31; } } return 0; }, mayOpen: function(node, flags) { if (!node) { return 44; } if (FS.isLink(node.mode)) { return 32; } else if (FS.isDir(node.mode)) { if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) { return 31; } } return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); }, MAX_OPEN_FDS: 4096, nextfd: function(fd_start, fd_end) { fd_start = fd_start || 0; fd_end = fd_end || FS.MAX_OPEN_FDS; for (var fd = fd_start; fd <= fd_end; fd++) { if (!FS.streams[fd]) { return fd; } } throw new FS.ErrnoError(33); }, getStream: function(fd) { return FS.streams[fd]; }, createStream: function(stream, fd_start, fd_end) { if (!FS.FSStream) { FS.FSStream = function() {}; FS.FSStream.prototype = { object: { get: function() { return this.node; }, set: function(val) { this.node = val; } }, isRead: { get: function() { return (this.flags & 2097155) !== 1; } }, isWrite: { get: function() { return (this.flags & 2097155) !== 0; } }, isAppend: { get: function() { return this.flags & 1024; } } }; } var newStream = new FS.FSStream(); for (var p in stream) { newStream[p] = stream[p]; } stream = newStream; var fd = FS.nextfd(fd_start, fd_end); stream.fd = fd; FS.streams[fd] = stream; return stream; }, closeStream: function(fd) { FS.streams[fd] = null; }, chrdev_stream_ops: { open: function(stream) { var device = FS.getDevice(stream.node.rdev); stream.stream_ops = device.stream_ops; if (stream.stream_ops.open) { stream.stream_ops.open(stream); } }, llseek: function() { throw new FS.ErrnoError(70); } }, major: function(dev) { return dev >> 8; }, minor: function(dev) { return dev & 255; }, makedev: function(ma, mi) { return (ma << 8) | mi; }, registerDevice: function(dev, ops) { FS.devices[dev] = { stream_ops: ops }; }, getDevice: function(dev) { return FS.devices[dev]; }, getMounts: function(mount) { var mounts = []; var check = [mount]; while (check.length) { var m = check.pop(); mounts.push(m); check.push.apply(check, m.mounts); } return mounts; }, syncfs: function(populate, callback) { if (typeof populate === "function") { callback = populate; populate = false; } FS.syncFSRequests++; if (FS.syncFSRequests > 1) { err( "warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work" ); } var mounts = FS.getMounts(FS.root.mount); var completed = 0; function doCallback(errCode) { FS.syncFSRequests--; return callback(errCode); } function done(errCode) { if (errCode) { if (!done.errored) { done.errored = true; return doCallback(errCode); } return; } if (++completed >= mounts.length) { doCallback(null); } } mounts.forEach(function(mount) { if (!mount.type.syncfs) { return done(null); } mount.type.syncfs(mount, populate, done); }); }, mount: function(type, opts, mountpoint) { var root = mountpoint === "/"; var pseudo = !mountpoint; var node; if (root && FS.root) { throw new FS.ErrnoError(10); } else if (!root && !pseudo) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); mountpoint = lookup.path; node = lookup.node; if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } if (!FS.isDir(node.mode)) { throw new FS.ErrnoError(54); } } var mount = { type: type, opts: opts, mountpoint: mountpoint, mounts: [] }; var mountRoot = type.mount(mount); mountRoot.mount = mount; mount.root = mountRoot; if (root) { FS.root = mountRoot; } else if (node) { node.mounted = mount; if (node.mount) { node.mount.mounts.push(mount); } } return mountRoot; }, unmount: function(mountpoint) { var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); if (!FS.isMountpoint(lookup.node)) { throw new FS.ErrnoError(28); } var node = lookup.node; var mount = node.mounted; var mounts = FS.getMounts(mount); Object.keys(FS.nameTable).forEach(function(hash) { var current = FS.nameTable[hash]; while (current) { var next = current.name_next; if (mounts.includes(current.mount)) { FS.destroyNode(current); } current = next; } }); node.mounted = null; var idx = node.mount.mounts.indexOf(mount); node.mount.mounts.splice(idx, 1); }, lookup: function(parent, name) { return parent.node_ops.lookup(parent, name); }, mknod: function(path, mode, dev) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); if (!name || name === "." || name === "..") { throw new FS.ErrnoError(28); } var errCode = FS.mayCreate(parent, name); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.mknod) { throw new FS.ErrnoError(63); } return parent.node_ops.mknod(parent, name, mode, dev); }, create: function(path, mode) { mode = mode !== undefined ? mode : 438; mode &= 4095; mode |= 32768; return FS.mknod(path, mode, 0); }, mkdir: function(path, mode) { mode = mode !== undefined ? mode : 511; mode &= 511 | 512; mode |= 16384; return FS.mknod(path, mode, 0); }, mkdirTree: function(path, mode) { var dirs = path.split("/"); var d = ""; for (var i = 0; i < dirs.length; ++i) { if (!dirs[i]) continue; d += "/" + dirs[i]; try { FS.mkdir(d, mode); } catch (e) { if (e.errno != 20) throw e; } } }, mkdev: function(path, mode, dev) { if (typeof dev === "undefined") { dev = mode; mode = 438; } mode |= 8192; return FS.mknod(path, mode, dev); }, symlink: function(oldpath, newpath) { if (!PATH_FS.resolve(oldpath)) { throw new FS.ErrnoError(44); } var lookup = FS.lookupPath(newpath, { parent: true }); var parent = lookup.node; if (!parent) { throw new FS.ErrnoError(44); } var newname = PATH.basename(newpath); var errCode = FS.mayCreate(parent, newname); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.symlink) { throw new FS.ErrnoError(63); } return parent.node_ops.symlink(parent, newname, oldpath); }, rename: function(old_path, new_path) { var old_dirname = PATH.dirname(old_path); var new_dirname = PATH.dirname(new_path); var old_name = PATH.basename(old_path); var new_name = PATH.basename(new_path); var lookup, old_dir, new_dir; lookup = FS.lookupPath(old_path, { parent: true }); old_dir = lookup.node; lookup = FS.lookupPath(new_path, { parent: true }); new_dir = lookup.node; if (!old_dir || !new_dir) throw new FS.ErrnoError(44); if (old_dir.mount !== new_dir.mount) { throw new FS.ErrnoError(75); } var old_node = FS.lookupNode(old_dir, old_name); var relative = PATH_FS.relative(old_path, new_dirname); if (relative.charAt(0) !== ".") { throw new FS.ErrnoError(28); } relative = PATH_FS.relative(new_path, old_dirname); if (relative.charAt(0) !== ".") { throw new FS.ErrnoError(55); } var new_node; try { new_node = FS.lookupNode(new_dir, new_name); } catch (e) {} if (old_node === new_node) { return; } var isdir = FS.isDir(old_node.mode); var errCode = FS.mayDelete(old_dir, old_name, isdir); if (errCode) { throw new FS.ErrnoError(errCode); } errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); if (errCode) { throw new FS.ErrnoError(errCode); } if (!old_dir.node_ops.rename) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { throw new FS.ErrnoError(10); } if (new_dir !== old_dir) { errCode = FS.nodePermissions(old_dir, "w"); if (errCode) { throw new FS.ErrnoError(errCode); } } try { if (FS.trackingDelegate["willMovePath"]) { FS.trackingDelegate["willMovePath"](old_path, new_path); } } catch (e) { err( "FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message ); } FS.hashRemoveNode(old_node); try { old_dir.node_ops.rename(old_node, new_dir, new_name); } catch (e) { throw e; } finally { FS.hashAddNode(old_node); } try { if (FS.trackingDelegate["onMovePath"]) FS.trackingDelegate["onMovePath"](old_path, new_path); } catch (e) { err( "FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message ); } }, rmdir: function(path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var errCode = FS.mayDelete(parent, name, true); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.rmdir) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } try { if (FS.trackingDelegate["willDeletePath"]) { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { err( "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message ); } parent.node_ops.rmdir(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { err( "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message ); } }, readdir: function(path) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; if (!node.node_ops.readdir) { throw new FS.ErrnoError(54); } return node.node_ops.readdir(node); }, unlink: function(path) { var lookup = FS.lookupPath(path, { parent: true }); var parent = lookup.node; var name = PATH.basename(path); var node = FS.lookupNode(parent, name); var errCode = FS.mayDelete(parent, name, false); if (errCode) { throw new FS.ErrnoError(errCode); } if (!parent.node_ops.unlink) { throw new FS.ErrnoError(63); } if (FS.isMountpoint(node)) { throw new FS.ErrnoError(10); } try { if (FS.trackingDelegate["willDeletePath"]) { FS.trackingDelegate["willDeletePath"](path); } } catch (e) { err( "FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message ); } parent.node_ops.unlink(parent, name); FS.destroyNode(node); try { if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path); } catch (e) { err( "FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message ); } }, readlink: function(path) { var lookup = FS.lookupPath(path); var link = lookup.node; if (!link) { throw new FS.ErrnoError(44); } if (!link.node_ops.readlink) { throw new FS.ErrnoError(28); } return PATH_FS.resolve( FS.getPath(link.parent), link.node_ops.readlink(link) ); }, stat: function(path, dontFollow) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; if (!node) { throw new FS.ErrnoError(44); } if (!node.node_ops.getattr) { throw new FS.ErrnoError(63); } return node.node_ops.getattr(node); }, lstat: function(path) { return FS.stat(path, true); }, chmod: function(path, mode, dontFollow) { var node; if (typeof path === "string") { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } node.node_ops.setattr(node, { mode: (mode & 4095) | (node.mode & ~4095), timestamp: Date.now() }); }, lchmod: function(path, mode) { FS.chmod(path, mode, true); }, fchmod: function(fd, mode) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } FS.chmod(stream.node, mode); }, chown: function(path, uid, gid, dontFollow) { var node; if (typeof path === "string") { var lookup = FS.lookupPath(path, { follow: !dontFollow }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } node.node_ops.setattr(node, { timestamp: Date.now() }); }, lchown: function(path, uid, gid) { FS.chown(path, uid, gid, true); }, fchown: function(fd, uid, gid) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } FS.chown(stream.node, uid, gid); }, truncate: function(path, len) { if (len < 0) { throw new FS.ErrnoError(28); } var node; if (typeof path === "string") { var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; } else { node = path; } if (!node.node_ops.setattr) { throw new FS.ErrnoError(63); } if (FS.isDir(node.mode)) { throw new FS.ErrnoError(31); } if (!FS.isFile(node.mode)) { throw new FS.ErrnoError(28); } var errCode = FS.nodePermissions(node, "w"); if (errCode) { throw new FS.ErrnoError(errCode); } node.node_ops.setattr(node, { size: len, timestamp: Date.now() }); }, ftruncate: function(fd, len) { var stream = FS.getStream(fd); if (!stream) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(28); } FS.truncate(stream.node, len); }, utime: function(path, atime, mtime) { var lookup = FS.lookupPath(path, { follow: true }); var node = lookup.node; node.node_ops.setattr(node, { timestamp: Math.max(atime, mtime) }); }, open: function(path, flags, mode, fd_start, fd_end) { if (path === "") { throw new FS.ErrnoError(44); } flags = typeof flags === "string" ? FS.modeStringToFlags(flags) : flags; mode = typeof mode === "undefined" ? 438 : mode; if (flags & 64) { mode = (mode & 4095) | 32768; } else { mode = 0; } var node; if (typeof path === "object") { node = path; } else { path = PATH.normalize(path); try { var lookup = FS.lookupPath(path, { follow: !(flags & 131072) }); node = lookup.node; } catch (e) {} } var created = false; if (flags & 64) { if (node) { if (flags & 128) { throw new FS.ErrnoError(20); } } else { node = FS.mknod(path, mode, 0); created = true; } } if (!node) { throw new FS.ErrnoError(44); } if (FS.isChrdev(node.mode)) { flags &= ~512; } if (flags & 65536 && !FS.isDir(node.mode)) { throw new FS.ErrnoError(54); } if (!created) { var errCode = FS.mayOpen(node, flags); if (errCode) { throw new FS.ErrnoError(errCode); } } if (flags & 512) { FS.truncate(node, 0); } flags &= ~(128 | 512 | 131072); var stream = FS.createStream( { node: node, path: FS.getPath(node), flags: flags, seekable: true, position: 0, stream_ops: node.stream_ops, ungotten: [], error: false }, fd_start, fd_end ); if (stream.stream_ops.open) { stream.stream_ops.open(stream); } if (Module["logReadFiles"] && !(flags & 1)) { if (!FS.readFiles) FS.readFiles = {}; if (!(path in FS.readFiles)) { FS.readFiles[path] = 1; err("FS.trackingDelegate error on read file: " + path); } } try { if (FS.trackingDelegate["onOpenFile"]) { var trackingFlags = 0; if ((flags & 2097155) !== 1) { trackingFlags |= FS.tracking.openFlags.READ; } if ((flags & 2097155) !== 0) { trackingFlags |= FS.tracking.openFlags.WRITE; } FS.trackingDelegate["onOpenFile"](path, trackingFlags); } } catch (e) { err( "FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message ); } return stream; }, close: function(stream) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (stream.getdents) stream.getdents = null; try { if (stream.stream_ops.close) { stream.stream_ops.close(stream); } } catch (e) { throw e; } finally { FS.closeStream(stream.fd); } stream.fd = null; }, isClosed: function(stream) { return stream.fd === null; }, llseek: function(stream, offset, whence) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (!stream.seekable || !stream.stream_ops.llseek) { throw new FS.ErrnoError(70); } if (whence != 0 && whence != 1 && whence != 2) { throw new FS.ErrnoError(28); } stream.position = stream.stream_ops.llseek(stream, offset, whence); stream.ungotten = []; return stream.position; }, read: function(stream, buffer, offset, length, position) { if (length < 0 || position < 0) { throw new FS.ErrnoError(28); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(8); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(31); } if (!stream.stream_ops.read) { throw new FS.ErrnoError(28); } var seeking = typeof position !== "undefined"; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(70); } var bytesRead = stream.stream_ops.read( stream, buffer, offset, length, position ); if (!seeking) stream.position += bytesRead; return bytesRead; }, write: function(stream, buffer, offset, length, position, canOwn) { if (length < 0 || position < 0) { throw new FS.ErrnoError(28); } if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(8); } if (FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(31); } if (!stream.stream_ops.write) { throw new FS.ErrnoError(28); } if (stream.seekable && stream.flags & 1024) { FS.llseek(stream, 0, 2); } var seeking = typeof position !== "undefined"; if (!seeking) { position = stream.position; } else if (!stream.seekable) { throw new FS.ErrnoError(70); } var bytesWritten = stream.stream_ops.write( stream, buffer, offset, length, position, canOwn ); if (!seeking) stream.position += bytesWritten; try { if (stream.path && FS.trackingDelegate["onWriteToFile"]) FS.trackingDelegate["onWriteToFile"](stream.path); } catch (e) { err( "FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message ); } return bytesWritten; }, allocate: function(stream, offset, length) { if (FS.isClosed(stream)) { throw new FS.ErrnoError(8); } if (offset < 0 || length <= 0) { throw new FS.ErrnoError(28); } if ((stream.flags & 2097155) === 0) { throw new FS.ErrnoError(8); } if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { throw new FS.ErrnoError(43); } if (!stream.stream_ops.allocate) { throw new FS.ErrnoError(138); } stream.stream_ops.allocate(stream, offset, length); }, mmap: function(stream, address, length, position, prot, flags) { if ( (prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2 ) { throw new FS.ErrnoError(2); } if ((stream.flags & 2097155) === 1) { throw new FS.ErrnoError(2); } if (!stream.stream_ops.mmap) { throw new FS.ErrnoError(43); } return stream.stream_ops.mmap( stream, address, length, position, prot, flags ); }, msync: function(stream, buffer, offset, length, mmapFlags) { if (!stream || !stream.stream_ops.msync) { return 0; } return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); }, munmap: function(stream) { return 0; }, ioctl: function(stream, cmd, arg) { if (!stream.stream_ops.ioctl) { throw new FS.ErrnoError(59); } return stream.stream_ops.ioctl(stream, cmd, arg); }, readFile: function(path, opts) { opts = opts || {}; opts.flags = opts.flags || 0; opts.encoding = opts.encoding || "binary"; if (opts.encoding !== "utf8" && opts.encoding !== "binary") { throw new Error('Invalid encoding type "' + opts.encoding + '"'); } var ret; var stream = FS.open(path, opts.flags); var stat = FS.stat(path); var length = stat.size; var buf = new Uint8Array(length); FS.read(stream, buf, 0, length, 0); if (opts.encoding === "utf8") { ret = UTF8ArrayToString(buf, 0); } else if (opts.encoding === "binary") { ret = buf; } FS.close(stream); return ret; }, writeFile: function(path, data, opts) { opts = opts || {}; opts.flags = opts.flags || 577; var stream = FS.open(path, opts.flags, opts.mode); if (typeof data === "string") { var buf = new Uint8Array(lengthBytesUTF8(data) + 1); var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); } else if (ArrayBuffer.isView(data)) { FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); } else { throw new Error("Unsupported data type"); } FS.close(stream); }, cwd: function() { return FS.currentPath; }, chdir: function(path) { var lookup = FS.lookupPath(path, { follow: true }); if (lookup.node === null) { throw new FS.ErrnoError(44); } if (!FS.isDir(lookup.node.mode)) { throw new FS.ErrnoError(54); } var errCode = FS.nodePermissions(lookup.node, "x"); if (errCode) { throw new FS.ErrnoError(errCode); } FS.currentPath = lookup.path; }, createDefaultDirectories: function() { FS.mkdir("/tmp"); FS.mkdir("/home"); FS.mkdir("/home/web_user"); }, createDefaultDevices: function() { FS.mkdir("/dev"); FS.registerDevice(FS.makedev(1, 3), { read: function() { return 0; }, write: function(stream, buffer, offset, length, pos) { return length; } }); FS.mkdev("/dev/null", FS.makedev(1, 3)); TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); FS.mkdev("/dev/tty", FS.makedev(5, 0)); FS.mkdev("/dev/tty1", FS.makedev(6, 0)); var random_device = getRandomDevice(); FS.createDevice("/dev", "random", random_device); FS.createDevice("/dev", "urandom", random_device); FS.mkdir("/dev/shm"); FS.mkdir("/dev/shm/tmp"); }, createSpecialDirectories: function() { FS.mkdir("/proc"); var proc_self = FS.mkdir("/proc/self"); FS.mkdir("/proc/self/fd"); FS.mount( { mount: function() { var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); node.node_ops = { lookup: function(parent, name) { var fd = +name; var stream = FS.getStream(fd); if (!stream) throw new FS.ErrnoError(8); var ret = { parent: null, mount: { mountpoint: "fake" }, node_ops: { readlink: function() { return stream.path; } } }; ret.parent = ret; return ret; } }; return node; } }, {}, "/proc/self/fd" ); }, createStandardStreams: function() { if (Module["stdin"]) { FS.createDevice("/dev", "stdin", Module["stdin"]); } else { FS.symlink("/dev/tty", "/dev/stdin"); } if (Module["stdout"]) { FS.createDevice("/dev", "stdout", null, Module["stdout"]); } else { FS.symlink("/dev/tty", "/dev/stdout"); } if (Module["stderr"]) { FS.createDevice("/dev", "stderr", null, Module["stderr"]); } else { FS.symlink("/dev/tty1", "/dev/stderr"); } var stdin = FS.open("/dev/stdin", 0); var stdout = FS.open("/dev/stdout", 1); var stderr = FS.open("/dev/stderr", 1); }, ensureErrnoError: function() { if (FS.ErrnoError) return; FS.ErrnoError = function ErrnoError(errno, node) { this.node = node; this.setErrno = function(errno) { this.errno = errno; }; this.setErrno(errno); this.message = "FS error"; }; FS.ErrnoError.prototype = new Error(); FS.ErrnoError.prototype.constructor = FS.ErrnoError; [44].forEach(function(code) { FS.genericErrors[code] = new FS.ErrnoError(code); FS.genericErrors[code].stack = ""; }); }, staticInit: function() { FS.ensureErrnoError(); FS.nameTable = new Array(4096); FS.mount(MEMFS, {}, "/"); FS.createDefaultDirectories(); FS.createDefaultDevices(); FS.createSpecialDirectories(); FS.filesystems = { MEMFS: MEMFS, NODEFS: NODEFS }; }, init: function(input, output, error) { FS.init.initialized = true; FS.ensureErrnoError(); Module["stdin"] = input || Module["stdin"]; Module["stdout"] = output || Module["stdout"]; Module["stderr"] = error || Module["stderr"]; FS.createStandardStreams(); }, quit: function() { FS.init.initialized = false; var fflush = Module["_fflush"]; if (fflush) fflush(0); for (var i = 0; i < FS.streams.length; i++) { var stream = FS.streams[i]; if (!stream) { continue; } FS.close(stream); } }, getMode: function(canRead, canWrite) { var mode = 0; if (canRead) mode |= 292 | 73; if (canWrite) mode |= 146; return mode; }, findObject: function(path, dontResolveLastLink) { var ret = FS.analyzePath(path, dontResolveLastLink); if (ret.exists) { return ret.object; } else { return null; } }, analyzePath: function(path, dontResolveLastLink) { try { var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); path = lookup.path; } catch (e) {} var ret = { isRoot: false, exists: false, error: 0, name: null, path: null, object: null, parentExists: false, parentPath: null, parentObject: null }; try { var lookup = FS.lookupPath(path, { parent: true }); ret.parentExists = true; ret.parentPath = lookup.path; ret.parentObject = lookup.node; ret.name = PATH.basename(path); lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); ret.exists = true; ret.path = lookup.path; ret.object = lookup.node; ret.name = lookup.node.name; ret.isRoot = lookup.path === "/"; } catch (e) { ret.error = e.errno; } return ret; }, createPath: function(parent, path, canRead, canWrite) { parent = typeof parent === "string" ? parent : FS.getPath(parent); var parts = path.split("/").reverse(); while (parts.length) { var part = parts.pop(); if (!part) continue; var current = PATH.join2(parent, part); try { FS.mkdir(current); } catch (e) {} parent = current; } return current; }, createFile: function(parent, name, properties, canRead, canWrite) { var path = PATH.join2( typeof parent === "string" ? parent : FS.getPath(parent), name ); var mode = FS.getMode(canRead, canWrite); return FS.create(path, mode); }, createDataFile: function(parent, name, data, canRead, canWrite, canOwn) { var path = name ? PATH.join2( typeof parent === "string" ? parent : FS.getPath(parent), name ) : parent; var mode = FS.getMode(canRead, canWrite); var node = FS.create(path, mode); if (data) { if (typeof data === "string") { var arr = new Array(data.length); for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); data = arr; } FS.chmod(node, mode | 146); var stream = FS.open(node, 577); FS.write(stream, data, 0, data.length, 0, canOwn); FS.close(stream); FS.chmod(node, mode); } return node; }, createDevice: function(parent, name, input, output) { var path = PATH.join2( typeof parent === "string" ? parent : FS.getPath(parent), name ); var mode = FS.getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; var dev = FS.makedev(FS.createDevice.major++, 0); FS.registerDevice(dev, { open: function(stream) { stream.seekable = false; }, close: function(stream) { if (output && output.buffer && output.buffer.length) { output(10); } }, read: function(stream, buffer, offset, length, pos) { var bytesRead = 0; for (var i = 0; i < length; i++) { var result; try { result = input(); } catch (e) { throw new FS.ErrnoError(29); } if (result === undefined && bytesRead === 0) { throw new FS.ErrnoError(6); } if (result === null || result === undefined) break; bytesRead++; buffer[offset + i] = result; } if (bytesRead) { stream.node.timestamp = Date.now(); } return bytesRead; }, write: function(stream, buffer, offset, length, pos) { for (var i = 0; i < length; i++) { try { output(buffer[offset + i]); } catch (e) { throw new FS.ErrnoError(29); } } if (length) { stream.node.timestamp = Date.now(); } return i; } }); return FS.mkdev(path, mode, dev); }, forceLoadFile: function(obj) { if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; if (typeof XMLHttpRequest !== "undefined") { throw new Error( "Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread." ); } else if (read_) { try { obj.contents = intArrayFromString(read_(obj.url), true); obj.usedBytes = obj.contents.length; } catch (e) { throw new FS.ErrnoError(29); } } else { throw new Error("Cannot load without read() or XMLHttpRequest."); } }, createLazyFile: function(parent, name, url, canRead, canWrite) { function LazyUint8Array() { this.lengthKnown = false; this.chunks = []; } LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) { if (idx > this.length - 1 || idx < 0) { return undefined; } var chunkOffset = idx % this.chunkSize; var chunkNum = (idx / this.chunkSize) | 0; return this.getter(chunkNum)[chunkOffset]; }; LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter( getter ) { this.getter = getter; }; LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() { var xhr = new XMLHttpRequest(); xhr.open("HEAD", url, false); xhr.send(null); if (!((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); var datalength = Number(xhr.getResponseHeader("Content-length")); var header; var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; var chunkSize = 1024 * 1024; if (!hasByteServing) chunkSize = datalength; var doXHR = function(from, to) { if (from > to) throw new Error( "invalid range (" + from + ", " + to + ") or no bytes requested!" ); if (to > datalength - 1) throw new Error( "only " + datalength + " bytes available! programmer error!" ); var xhr = new XMLHttpRequest(); xhr.open("GET", url, false); if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); if (typeof Uint8Array != "undefined") xhr.responseType = "arraybuffer"; if (xhr.overrideMimeType) { xhr.overrideMimeType("text/plain; charset=x-user-defined"); } xhr.send(null); if (!((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); if (xhr.response !== undefined) { return new Uint8Array(xhr.response || []); } else { return intArrayFromString(xhr.responseText || "", true); } }; var lazyArray = this; lazyArray.setDataGetter(function(chunkNum) { var start = chunkNum * chunkSize; var end = (chunkNum + 1) * chunkSize - 1; end = Math.min(end, datalength - 1); if (typeof lazyArray.chunks[chunkNum] === "undefined") { lazyArray.chunks[chunkNum] = doXHR(start, end); } if (typeof lazyArray.chunks[chunkNum] === "undefined") throw new Error("doXHR failed!"); return lazyArray.chunks[chunkNum]; }); if (usesGzip || !datalength) { chunkSize = datalength = 1; datalength = this.getter(0).length; chunkSize = datalength; out( "LazyFiles on gzip forces download of the whole file when length is accessed" ); } this._length = datalength; this._chunkSize = chunkSize; this.lengthKnown = true; }; if (typeof XMLHttpRequest !== "undefined") { if (!ENVIRONMENT_IS_WORKER) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"; var lazyArray = new LazyUint8Array(); Object.defineProperties(lazyArray, { length: { get: function() { if (!this.lengthKnown) { this.cacheLength(); } return this._length; } }, chunkSize: { get: function() { if (!this.lengthKnown) { this.cacheLength(); } return this._chunkSize; } } }); var properties = { isDevice: false, contents: lazyArray }; } else { var properties = { isDevice: false, url: url }; } var node = FS.createFile(parent, name, properties, canRead, canWrite); if (properties.contents) { node.contents = properties.contents; } else if (properties.url) { node.contents = null; node.url = properties.url; } Object.defineProperties(node, { usedBytes: { get: function() { return this.contents.length; } } }); var stream_ops = {}; var keys = Object.keys(node.stream_ops); keys.forEach(function(key) { var fn = node.stream_ops[key]; stream_ops[key] = function forceLoadLazyFile() { FS.forceLoadFile(node); return fn.apply(null, arguments); }; }); stream_ops.read = function stream_ops_read( stream, buffer, offset, length, position ) { FS.forceLoadFile(node); var contents = stream.node.contents; if (position >= contents.length) return 0; var size = Math.min(contents.length - position, length); if (contents.slice) { for (var i = 0; i < size; i++) { buffer[offset + i] = contents[position + i]; } } else { for (var i = 0; i < size; i++) { buffer[offset + i] = contents.get(position + i); } } return size; }; node.stream_ops = stream_ops; return node; }, createPreloadedFile: function( parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish ) { Browser.init(); var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; var dep = getUniqueRunDependency("cp " + fullname); function processData(byteArray) { function finish(byteArray) { if (preFinish) preFinish(); if (!dontCreateFile) { FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); } if (onload) onload(); removeRunDependency(dep); } var handled = false; Module["preloadPlugins"].forEach(function(plugin) { if (handled) return; if (plugin["canHandle"](fullname)) { plugin["handle"](byteArray, fullname, finish, function() { if (onerror) onerror(); removeRunDependency(dep); }); handled = true; } }); if (!handled) finish(byteArray); } addRunDependency(dep); if (typeof url == "string") { Browser.asyncLoad( url, function(byteArray) { processData(byteArray); }, onerror ); } else { processData(url); } }, indexedDB: function() { return ( window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB ); }, DB_NAME: function() { return "EM_FS_" + window.location.pathname; }, DB_VERSION: 20, DB_STORE_NAME: "FILE_DATA", saveFilesToDB: function(paths, onload, onerror) { onload = onload || function() {}; onerror = onerror || function() {}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = function openRequest_onupgradeneeded() { out("creating db"); var db = openRequest.result; db.createObjectStore(FS.DB_STORE_NAME); }; openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; var transaction = db.transaction([FS.DB_STORE_NAME], "readwrite"); var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var putRequest = files.put(FS.analyzePath(path).object.contents, path); putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish(); }; putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish(); }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; }, loadFilesFromDB: function(paths, onload, onerror) { onload = onload || function() {}; onerror = onerror || function() {}; var indexedDB = FS.indexedDB(); try { var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION); } catch (e) { return onerror(e); } openRequest.onupgradeneeded = onerror; openRequest.onsuccess = function openRequest_onsuccess() { var db = openRequest.result; try { var transaction = db.transaction([FS.DB_STORE_NAME], "readonly"); } catch (e) { onerror(e); return; } var files = transaction.objectStore(FS.DB_STORE_NAME); var ok = 0, fail = 0, total = paths.length; function finish() { if (fail == 0) onload(); else onerror(); } paths.forEach(function(path) { var getRequest = files.get(path); getRequest.onsuccess = function getRequest_onsuccess() { if (FS.analyzePath(path).exists) { FS.unlink(path); } FS.createDataFile( PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true ); ok++; if (ok + fail == total) finish(); }; getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish(); }; }); transaction.onerror = onerror; }; openRequest.onerror = onerror; } }; var SYSCALLS = { mappings: {}, DEFAULT_POLLMASK: 5, umask: 511, calculateAt: function(dirfd, path, allowEmpty) { if (path[0] === "/") { return path; } var dir; if (dirfd === -100) { dir = FS.cwd(); } else { var dirstream = FS.getStream(dirfd); if (!dirstream) throw new FS.ErrnoError(8); dir = dirstream.path; } if (path.length == 0) { if (!allowEmpty) { throw new FS.ErrnoError(44); } return dir; } return PATH.join2(dir, path); }, doStat: function(func, path, buf) { try { var stat = func(path); } catch (e) { if ( e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node)) ) { return -54; } throw e; } HEAP32[buf >> 2] = stat.dev; HEAP32[(buf + 4) >> 2] = 0; HEAP32[(buf + 8) >> 2] = stat.ino; HEAP32[(buf + 12) >> 2] = stat.mode; HEAP32[(buf + 16) >> 2] = stat.nlink; HEAP32[(buf + 20) >> 2] = stat.uid; HEAP32[(buf + 24) >> 2] = stat.gid; HEAP32[(buf + 28) >> 2] = stat.rdev; HEAP32[(buf + 32) >> 2] = 0; (tempI64 = [ stat.size >>> 0, ((tempDouble = stat.size), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ]), (HEAP32[(buf + 40) >> 2] = tempI64[0]), (HEAP32[(buf + 44) >> 2] = tempI64[1]); HEAP32[(buf + 48) >> 2] = 4096; HEAP32[(buf + 52) >> 2] = stat.blocks; HEAP32[(buf + 56) >> 2] = (stat.atime.getTime() / 1e3) | 0; HEAP32[(buf + 60) >> 2] = 0; HEAP32[(buf + 64) >> 2] = (stat.mtime.getTime() / 1e3) | 0; HEAP32[(buf + 68) >> 2] = 0; HEAP32[(buf + 72) >> 2] = (stat.ctime.getTime() / 1e3) | 0; HEAP32[(buf + 76) >> 2] = 0; (tempI64 = [ stat.ino >>> 0, ((tempDouble = stat.ino), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ]), (HEAP32[(buf + 80) >> 2] = tempI64[0]), (HEAP32[(buf + 84) >> 2] = tempI64[1]); return 0; }, doMsync: function(addr, stream, len, flags, offset) { var buffer = HEAPU8.slice(addr, addr + len); FS.msync(stream, buffer, offset, len, flags); }, doMkdir: function(path, mode) { path = PATH.normalize(path); if (path[path.length - 1] === "/") path = path.substr(0, path.length - 1); FS.mkdir(path, mode, 0); return 0; }, doMknod: function(path, mode, dev) { switch (mode & 61440) { case 32768: case 8192: case 24576: case 4096: case 49152: break; default: return -28; } FS.mknod(path, mode, dev); return 0; }, doReadlink: function(path, buf, bufsize) { if (bufsize <= 0) return -28; var ret = FS.readlink(path); var len = Math.min(bufsize, lengthBytesUTF8(ret)); var endChar = HEAP8[buf + len]; stringToUTF8(ret, buf, bufsize + 1); HEAP8[buf + len] = endChar; return len; }, doAccess: function(path, amode) { if (amode & ~7) { return -28; } var node; var lookup = FS.lookupPath(path, { follow: true }); node = lookup.node; if (!node) { return -44; } var perms = ""; if (amode & 4) perms += "r"; if (amode & 2) perms += "w"; if (amode & 1) perms += "x"; if (perms && FS.nodePermissions(node, perms)) { return -2; } return 0; }, doDup: function(path, flags, suggestFD) { var suggest = FS.getStream(suggestFD); if (suggest) FS.close(suggest); return FS.open(path, flags, 0, suggestFD, suggestFD).fd; }, doReadv: function(stream, iov, iovcnt, offset) { var ret = 0; for (var i = 0; i < iovcnt; i++) { var ptr = HEAP32[(iov + i * 8) >> 2]; var len = HEAP32[(iov + (i * 8 + 4)) >> 2]; var curr = FS.read(stream, HEAP8, ptr, len, offset); if (curr < 0) return -1; ret += curr; if (curr < len) break; } return ret; }, doWritev: function(stream, iov, iovcnt, offset) { var ret = 0; for (var i = 0; i < iovcnt; i++) { var ptr = HEAP32[(iov + i * 8) >> 2]; var len = HEAP32[(iov + (i * 8 + 4)) >> 2]; var curr = FS.write(stream, HEAP8, ptr, len, offset); if (curr < 0) return -1; ret += curr; } return ret; }, varargs: undefined, get: function() { SYSCALLS.varargs += 4; var ret = HEAP32[(SYSCALLS.varargs - 4) >> 2]; return ret; }, getStr: function(ptr) { var ret = UTF8ToString(ptr); return ret; }, getStreamFromFD: function(fd) { var stream = FS.getStream(fd); if (!stream) throw new FS.ErrnoError(8); return stream; }, get64: function(low, high) { return low; } }; function ___sys_chmod(path, mode) { try { path = SYSCALLS.getStr(path); FS.chmod(path, mode); return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function setErrNo(value) { HEAP32[___errno_location() >> 2] = value; return value; } function ___sys_fcntl64(fd, cmd, varargs) { SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(fd); switch (cmd) { case 0: { var arg = SYSCALLS.get(); if (arg < 0) { return -28; } var newStream; newStream = FS.open(stream.path, stream.flags, 0, arg); return newStream.fd; } case 1: case 2: return 0; case 3: return stream.flags; case 4: { var arg = SYSCALLS.get(); stream.flags |= arg; return 0; } case 12: { var arg = SYSCALLS.get(); var offset = 0; HEAP16[(arg + offset) >> 1] = 2; return 0; } case 13: case 14: return 0; case 16: case 8: return -28; case 9: setErrNo(28); return -1; default: { return -28; } } } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_fstat64(fd, buf) { try { var stream = SYSCALLS.getStreamFromFD(fd); return SYSCALLS.doStat(FS.stat, stream.path, buf); } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_ioctl(fd, op, varargs) { SYSCALLS.varargs = varargs; try { var stream = SYSCALLS.getStreamFromFD(fd); switch (op) { case 21509: case 21505: { if (!stream.tty) return -59; return 0; } case 21510: case 21511: case 21512: case 21506: case 21507: case 21508: { if (!stream.tty) return -59; return 0; } case 21519: { if (!stream.tty) return -59; var argp = SYSCALLS.get(); HEAP32[argp >> 2] = 0; return 0; } case 21520: { if (!stream.tty) return -59; return -28; } case 21531: { var argp = SYSCALLS.get(); return FS.ioctl(stream, op, argp); } case 21523: { if (!stream.tty) return -59; return 0; } case 21524: { if (!stream.tty) return -59; return 0; } default: abort("bad ioctl syscall " + op); } } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_open(path, flags, varargs) { SYSCALLS.varargs = varargs; try { var pathname = SYSCALLS.getStr(path); var mode = varargs ? SYSCALLS.get() : 0; var stream = FS.open(pathname, flags, mode); return stream.fd; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_rename(old_path, new_path) { try { old_path = SYSCALLS.getStr(old_path); new_path = SYSCALLS.getStr(new_path); FS.rename(old_path, new_path); return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_rmdir(path) { try { path = SYSCALLS.getStr(path); FS.rmdir(path); return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_stat64(path, buf) { try { path = SYSCALLS.getStr(path); return SYSCALLS.doStat(FS.stat, path, buf); } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function ___sys_unlink(path) { try { path = SYSCALLS.getStr(path); FS.unlink(path); return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return -e.errno; } } function _emscripten_memcpy_big(dest, src, num) { HEAPU8.copyWithin(dest, src, src + num); } function emscripten_realloc_buffer(size) { try { wasmMemory.grow((size - buffer.byteLength + 65535) >>> 16); updateGlobalBufferAndViews(wasmMemory.buffer); return 1; } catch (e) {} } function _emscripten_resize_heap(requestedSize) { var oldSize = HEAPU8.length; requestedSize = requestedSize >>> 0; var maxHeapSize = 2147483648; if (requestedSize > maxHeapSize) { return false; } for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); var newSize = Math.min( maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536) ); var replacement = emscripten_realloc_buffer(newSize); if (replacement) { return true; } } return false; } function _fd_close(fd) { try { var stream = SYSCALLS.getStreamFromFD(fd); FS.close(stream); return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_fdstat_get(fd, pbuf) { try { var stream = SYSCALLS.getStreamFromFD(fd); var type = stream.tty ? 2 : FS.isDir(stream.mode) ? 3 : FS.isLink(stream.mode) ? 7 : 4; HEAP8[pbuf >> 0] = type; return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_read(fd, iov, iovcnt, pnum) { try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doReadv(stream, iov, iovcnt); HEAP32[pnum >> 2] = num; return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { try { var stream = SYSCALLS.getStreamFromFD(fd); var HIGH_OFFSET = 4294967296; var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0); var DOUBLE_LIMIT = 9007199254740992; if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) { return -61; } FS.llseek(stream, offset, whence); (tempI64 = [ stream.position >>> 0, ((tempDouble = stream.position), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0) ]), (HEAP32[newOffset >> 2] = tempI64[0]), (HEAP32[(newOffset + 4) >> 2] = tempI64[1]); if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _fd_write(fd, iov, iovcnt, pnum) { try { var stream = SYSCALLS.getStreamFromFD(fd); var num = SYSCALLS.doWritev(stream, iov, iovcnt); HEAP32[pnum >> 2] = num; return 0; } catch (e) { if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e); return e.errno; } } function _setTempRet0(val) { setTempRet0(val); } function _time(ptr) { var ret = (Date.now() / 1e3) | 0; if (ptr) { HEAP32[ptr >> 2] = ret; } return ret; } function _tzset() { if (_tzset.called) return; _tzset.called = true; var currentYear = new Date().getFullYear(); var winter = new Date(currentYear, 0, 1); var summer = new Date(currentYear, 6, 1); var winterOffset = winter.getTimezoneOffset(); var summerOffset = summer.getTimezoneOffset(); var stdTimezoneOffset = Math.max(winterOffset, summerOffset); HEAP32[__get_timezone() >> 2] = stdTimezoneOffset * 60; HEAP32[__get_daylight() >> 2] = Number(winterOffset != summerOffset); function extractZone(date) { var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); return match ? match[1] : "GMT"; } var winterName = extractZone(winter); var summerName = extractZone(summer); var winterNamePtr = allocateUTF8(winterName); var summerNamePtr = allocateUTF8(summerName); if (summerOffset < winterOffset) { HEAP32[__get_tzname() >> 2] = winterNamePtr; HEAP32[(__get_tzname() + 4) >> 2] = summerNamePtr; } else { HEAP32[__get_tzname() >> 2] = summerNamePtr; HEAP32[(__get_tzname() + 4) >> 2] = winterNamePtr; } } function _timegm(tmPtr) { _tzset(); var time = Date.UTC( HEAP32[(tmPtr + 20) >> 2] + 1900, HEAP32[(tmPtr + 16) >> 2], HEAP32[(tmPtr + 12) >> 2], HEAP32[(tmPtr + 8) >> 2], HEAP32[(tmPtr + 4) >> 2], HEAP32[tmPtr >> 2], 0 ); var date = new Date(time); HEAP32[(tmPtr + 24) >> 2] = date.getUTCDay(); var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = ((date.getTime() - start) / (1e3 * 60 * 60 * 24)) | 0; HEAP32[(tmPtr + 28) >> 2] = yday; return (date.getTime() / 1e3) | 0; } var FSNode = function(parent, name, mode, rdev) { if (!parent) { parent = this; } this.parent = parent; this.mount = parent.mount; this.mounted = null; this.id = FS.nextInode++; this.name = name; this.mode = mode; this.node_ops = {}; this.stream_ops = {}; this.rdev = rdev; }; var readMode = 292 | 73; var writeMode = 146; Object.defineProperties(FSNode.prototype, { read: { get: function() { return (this.mode & readMode) === readMode; }, set: function(val) { val ? (this.mode |= readMode) : (this.mode &= ~readMode); } }, write: { get: function() { return (this.mode & writeMode) === writeMode; }, set: function(val) { val ? (this.mode |= writeMode) : (this.mode &= ~writeMode); } }, isFolder: { get: function() { return FS.isDir(this.mode); } }, isDevice: { get: function() { return FS.isChrdev(this.mode); } } }); FS.FSNode = FSNode; FS.staticInit(); if (ENVIRONMENT_IS_NODE) { var fs = frozenFs; var NODEJS_PATH = __webpack_require__(85622); NODEFS.staticInit(); } if (ENVIRONMENT_IS_NODE) { var _wrapNodeError = function(func) { return function() { try { return func.apply(this, arguments); } catch (e) { if (!e.code) throw e; throw new FS.ErrnoError(ERRNO_CODES[e.code]); } }; }; var VFS = Object.assign({}, FS); for (var _key in NODERAWFS) FS[_key] = _wrapNodeError(NODERAWFS[_key]); } else { throw new Error( "NODERAWFS is currently only supported on Node.js environment." ); } function intArrayFromString(stringy, dontAddNull, length) { var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; var u8array = new Array(len); var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); if (dontAddNull) u8array.length = numBytesWritten; return u8array; } var decodeBase64 = typeof atob === "function" ? atob : function(input) { var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); do { enc1 = keyStr.indexOf(input.charAt(i++)); enc2 = keyStr.indexOf(input.charAt(i++)); enc3 = keyStr.indexOf(input.charAt(i++)); enc4 = keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 !== 64) { output = output + String.fromCharCode(chr2); } if (enc4 !== 64) { output = output + String.fromCharCode(chr3); } } while (i < input.length); return output; }; function intArrayFromBase64(s) { if (typeof ENVIRONMENT_IS_NODE === "boolean" && ENVIRONMENT_IS_NODE) { var buf; try { buf = Buffer.from(s, "base64"); } catch (_) { buf = new Buffer(s, "base64"); } return new Uint8Array(buf["buffer"], buf["byteOffset"], buf["byteLength"]); } try { var decoded = decodeBase64(s); var bytes = new Uint8Array(decoded.length); for (var i = 0; i < decoded.length; ++i) { bytes[i] = decoded.charCodeAt(i); } return bytes; } catch (_) { throw new Error("Converting base64 string to bytes failed."); } } function tryParseAsDataURI(filename) { if (!isDataURI(filename)) { return; } return intArrayFromBase64(filename.slice(dataURIPrefix.length)); } var asmLibraryArg = { l: ___gmtime_r, p: ___sys_chmod, e: ___sys_fcntl64, k: ___sys_fstat64, o: ___sys_ioctl, q: ___sys_open, i: ___sys_rename, r: ___sys_rmdir, c: ___sys_stat64, h: ___sys_unlink, s: _emscripten_memcpy_big, t: _emscripten_resize_heap, f: _fd_close, j: _fd_fdstat_get, g: _fd_read, n: _fd_seek, d: _fd_write, a: _setTempRet0, b: _time, m: _timegm }; var asm = createWasm(); var ___wasm_call_ctors = (Module["___wasm_call_ctors"] = asm["v"]); var _zipstruct_stat = (Module["_zipstruct_stat"] = asm["w"]); var _zipstruct_statS = (Module["_zipstruct_statS"] = asm["x"]); var _zipstruct_stat_name = (Module["_zipstruct_stat_name"] = asm["y"]); var _zipstruct_stat_index = (Module["_zipstruct_stat_index"] = asm["z"]); var _zipstruct_stat_size = (Module["_zipstruct_stat_size"] = asm["A"]); var _zipstruct_stat_mtime = (Module["_zipstruct_stat_mtime"] = asm["B"]); var _zipstruct_stat_crc = (Module["_zipstruct_stat_crc"] = asm["C"]); var _zipstruct_error = (Module["_zipstruct_error"] = asm["D"]); var _zipstruct_errorS = (Module["_zipstruct_errorS"] = asm["E"]); var _zipstruct_error_code_zip = (Module["_zipstruct_error_code_zip"] = asm["F"]); var _zipstruct_stat_comp_size = (Module["_zipstruct_stat_comp_size"] = asm["G"]); var _zipstruct_stat_comp_method = (Module["_zipstruct_stat_comp_method"] = asm["H"]); var _zip_close = (Module["_zip_close"] = asm["I"]); var _zip_delete = (Module["_zip_delete"] = asm["J"]); var _zip_dir_add = (Module["_zip_dir_add"] = asm["K"]); var _zip_discard = (Module["_zip_discard"] = asm["L"]); var _zip_error_init_with_code = (Module["_zip_error_init_with_code"] = asm["M"]); var _zip_get_error = (Module["_zip_get_error"] = asm["N"]); var _zip_file_get_error = (Module["_zip_file_get_error"] = asm["O"]); var _zip_error_strerror = (Module["_zip_error_strerror"] = asm["P"]); var _zip_fclose = (Module["_zip_fclose"] = asm["Q"]); var _zip_file_add = (Module["_zip_file_add"] = asm["R"]); var _zip_file_get_external_attributes = (Module[ "_zip_file_get_external_attributes" ] = asm["S"]); var _zip_file_set_external_attributes = (Module[ "_zip_file_set_external_attributes" ] = asm["T"]); var _zip_file_set_mtime = (Module["_zip_file_set_mtime"] = asm["U"]); var _zip_fopen = (Module["_zip_fopen"] = asm["V"]); var _zip_fopen_index = (Module["_zip_fopen_index"] = asm["W"]); var _zip_fread = (Module["_zip_fread"] = asm["X"]); var _zip_get_name = (Module["_zip_get_name"] = asm["Y"]); var _zip_get_num_entries = (Module["_zip_get_num_entries"] = asm["Z"]); var _zip_name_locate = (Module["_zip_name_locate"] = asm["_"]); var _zip_open = (Module["_zip_open"] = asm["$"]); var _zip_open_from_source = (Module["_zip_open_from_source"] = asm["aa"]); var _zip_set_file_compression = (Module["_zip_set_file_compression"] = asm["ba"]); var _zip_source_buffer = (Module["_zip_source_buffer"] = asm["ca"]); var _zip_source_buffer_create = (Module["_zip_source_buffer_create"] = asm["da"]); var _zip_source_close = (Module["_zip_source_close"] = asm["ea"]); var _zip_source_error = (Module["_zip_source_error"] = asm["fa"]); var _zip_source_free = (Module["_zip_source_free"] = asm["ga"]); var _zip_source_keep = (Module["_zip_source_keep"] = asm["ha"]); var _zip_source_open = (Module["_zip_source_open"] = asm["ia"]); var _zip_source_read = (Module["_zip_source_read"] = asm["ja"]); var _zip_source_seek = (Module["_zip_source_seek"] = asm["ka"]); var _zip_source_set_mtime = (Module["_zip_source_set_mtime"] = asm["la"]); var _zip_source_tell = (Module["_zip_source_tell"] = asm["ma"]); var _zip_stat = (Module["_zip_stat"] = asm["na"]); var _zip_stat_index = (Module["_zip_stat_index"] = asm["oa"]); var _zip_ext_count_symlinks = (Module["_zip_ext_count_symlinks"] = asm["pa"]); var ___errno_location = (Module["___errno_location"] = asm["qa"]); var __get_tzname = (Module["__get_tzname"] = asm["ra"]); var __get_daylight = (Module["__get_daylight"] = asm["sa"]); var __get_timezone = (Module["__get_timezone"] = asm["ta"]); var stackSave = (Module["stackSave"] = asm["ua"]); var stackRestore = (Module["stackRestore"] = asm["va"]); var stackAlloc = (Module["stackAlloc"] = asm["wa"]); var _malloc = (Module["_malloc"] = asm["xa"]); var _free = (Module["_free"] = asm["ya"]); Module["cwrap"] = cwrap; Module["getValue"] = getValue; var calledRun; dependenciesFulfilled = function runCaller() { if (!calledRun) run(); if (!calledRun) dependenciesFulfilled = runCaller; }; function run(args) { args = args || arguments_; if (runDependencies > 0) { return; } preRun(); if (runDependencies > 0) { return; } function doRun() { if (calledRun) return; calledRun = true; Module["calledRun"] = true; if (ABORT) return; initRuntime(); if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); postRun(); } if (Module["setStatus"]) { Module["setStatus"]("Running..."); setTimeout(function() { setTimeout(function() { Module["setStatus"](""); }, 1); doRun(); }, 1); } else { doRun(); } } Module["run"] = run; if (Module["preInit"]) { if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; while (Module["preInit"].length > 0) { Module["preInit"].pop()(); } } run(); /***/ }), /***/ 86385: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.makeInterface = exports.Errors = void 0; const number64 = [ `number`, `number`, // high ]; var Errors; (function (Errors) { Errors[Errors["ZIP_ER_OK"] = 0] = "ZIP_ER_OK"; Errors[Errors["ZIP_ER_MULTIDISK"] = 1] = "ZIP_ER_MULTIDISK"; Errors[Errors["ZIP_ER_RENAME"] = 2] = "ZIP_ER_RENAME"; Errors[Errors["ZIP_ER_CLOSE"] = 3] = "ZIP_ER_CLOSE"; Errors[Errors["ZIP_ER_SEEK"] = 4] = "ZIP_ER_SEEK"; Errors[Errors["ZIP_ER_READ"] = 5] = "ZIP_ER_READ"; Errors[Errors["ZIP_ER_WRITE"] = 6] = "ZIP_ER_WRITE"; Errors[Errors["ZIP_ER_CRC"] = 7] = "ZIP_ER_CRC"; Errors[Errors["ZIP_ER_ZIPCLOSED"] = 8] = "ZIP_ER_ZIPCLOSED"; Errors[Errors["ZIP_ER_NOENT"] = 9] = "ZIP_ER_NOENT"; Errors[Errors["ZIP_ER_EXISTS"] = 10] = "ZIP_ER_EXISTS"; Errors[Errors["ZIP_ER_OPEN"] = 11] = "ZIP_ER_OPEN"; Errors[Errors["ZIP_ER_TMPOPEN"] = 12] = "ZIP_ER_TMPOPEN"; Errors[Errors["ZIP_ER_ZLIB"] = 13] = "ZIP_ER_ZLIB"; Errors[Errors["ZIP_ER_MEMORY"] = 14] = "ZIP_ER_MEMORY"; Errors[Errors["ZIP_ER_CHANGED"] = 15] = "ZIP_ER_CHANGED"; Errors[Errors["ZIP_ER_COMPNOTSUPP"] = 16] = "ZIP_ER_COMPNOTSUPP"; Errors[Errors["ZIP_ER_EOF"] = 17] = "ZIP_ER_EOF"; Errors[Errors["ZIP_ER_INVAL"] = 18] = "ZIP_ER_INVAL"; Errors[Errors["ZIP_ER_NOZIP"] = 19] = "ZIP_ER_NOZIP"; Errors[Errors["ZIP_ER_INTERNAL"] = 20] = "ZIP_ER_INTERNAL"; Errors[Errors["ZIP_ER_INCONS"] = 21] = "ZIP_ER_INCONS"; Errors[Errors["ZIP_ER_REMOVE"] = 22] = "ZIP_ER_REMOVE"; Errors[Errors["ZIP_ER_DELETED"] = 23] = "ZIP_ER_DELETED"; Errors[Errors["ZIP_ER_ENCRNOTSUPP"] = 24] = "ZIP_ER_ENCRNOTSUPP"; Errors[Errors["ZIP_ER_RDONLY"] = 25] = "ZIP_ER_RDONLY"; Errors[Errors["ZIP_ER_NOPASSWD"] = 26] = "ZIP_ER_NOPASSWD"; Errors[Errors["ZIP_ER_WRONGPASSWD"] = 27] = "ZIP_ER_WRONGPASSWD"; Errors[Errors["ZIP_ER_OPNOTSUPP"] = 28] = "ZIP_ER_OPNOTSUPP"; Errors[Errors["ZIP_ER_INUSE"] = 29] = "ZIP_ER_INUSE"; Errors[Errors["ZIP_ER_TELL"] = 30] = "ZIP_ER_TELL"; Errors[Errors["ZIP_ER_COMPRESSED_DATA"] = 31] = "ZIP_ER_COMPRESSED_DATA"; })(Errors = exports.Errors || (exports.Errors = {})); const makeInterface = (libzip) => ({ // Those are getters because they can change after memory growth get HEAP8() { return libzip.HEAP8; }, get HEAPU8() { return libzip.HEAPU8; }, errors: Errors, SEEK_SET: 0, SEEK_CUR: 1, SEEK_END: 2, ZIP_CHECKCONS: 4, ZIP_CREATE: 1, ZIP_EXCL: 2, ZIP_TRUNCATE: 8, ZIP_RDONLY: 16, ZIP_FL_OVERWRITE: 8192, ZIP_FL_COMPRESSED: 4, ZIP_OPSYS_DOS: 0x00, ZIP_OPSYS_AMIGA: 0x01, ZIP_OPSYS_OPENVMS: 0x02, ZIP_OPSYS_UNIX: 0x03, ZIP_OPSYS_VM_CMS: 0x04, ZIP_OPSYS_ATARI_ST: 0x05, ZIP_OPSYS_OS_2: 0x06, ZIP_OPSYS_MACINTOSH: 0x07, ZIP_OPSYS_Z_SYSTEM: 0x08, ZIP_OPSYS_CPM: 0x09, ZIP_OPSYS_WINDOWS_NTFS: 0x0a, ZIP_OPSYS_MVS: 0x0b, ZIP_OPSYS_VSE: 0x0c, ZIP_OPSYS_ACORN_RISC: 0x0d, ZIP_OPSYS_VFAT: 0x0e, ZIP_OPSYS_ALTERNATE_MVS: 0x0f, ZIP_OPSYS_BEOS: 0x10, ZIP_OPSYS_TANDEM: 0x11, ZIP_OPSYS_OS_400: 0x12, ZIP_OPSYS_OS_X: 0x13, ZIP_CM_DEFAULT: -1, ZIP_CM_STORE: 0, ZIP_CM_DEFLATE: 8, uint08S: libzip._malloc(1), uint16S: libzip._malloc(2), uint32S: libzip._malloc(4), uint64S: libzip._malloc(8), malloc: libzip._malloc, free: libzip._free, getValue: libzip.getValue, open: libzip.cwrap(`zip_open`, `number`, [`string`, `number`, `number`]), openFromSource: libzip.cwrap(`zip_open_from_source`, `number`, [`number`, `number`, `number`]), close: libzip.cwrap(`zip_close`, `number`, [`number`]), discard: libzip.cwrap(`zip_discard`, null, [`number`]), getError: libzip.cwrap(`zip_get_error`, `number`, [`number`]), getName: libzip.cwrap(`zip_get_name`, `string`, [`number`, `number`, `number`]), getNumEntries: libzip.cwrap(`zip_get_num_entries`, `number`, [`number`, `number`]), delete: libzip.cwrap(`zip_delete`, `number`, [`number`, `number`]), stat: libzip.cwrap(`zip_stat`, `number`, [`number`, `string`, `number`, `number`]), statIndex: libzip.cwrap(`zip_stat_index`, `number`, [`number`, ...number64, `number`, `number`]), fopen: libzip.cwrap(`zip_fopen`, `number`, [`number`, `string`, `number`]), fopenIndex: libzip.cwrap(`zip_fopen_index`, `number`, [`number`, ...number64, `number`]), fread: libzip.cwrap(`zip_fread`, `number`, [`number`, `number`, `number`, `number`]), fclose: libzip.cwrap(`zip_fclose`, `number`, [`number`]), dir: { add: libzip.cwrap(`zip_dir_add`, `number`, [`number`, `string`]), }, file: { add: libzip.cwrap(`zip_file_add`, `number`, [`number`, `string`, `number`, `number`]), getError: libzip.cwrap(`zip_file_get_error`, `number`, [`number`]), getExternalAttributes: libzip.cwrap(`zip_file_get_external_attributes`, `number`, [`number`, ...number64, `number`, `number`, `number`]), setExternalAttributes: libzip.cwrap(`zip_file_set_external_attributes`, `number`, [`number`, ...number64, `number`, `number`, `number`]), setMtime: libzip.cwrap(`zip_file_set_mtime`, `number`, [`number`, ...number64, `number`, `number`]), setCompression: libzip.cwrap(`zip_set_file_compression`, `number`, [`number`, ...number64, `number`, `number`]), }, ext: { countSymlinks: libzip.cwrap(`zip_ext_count_symlinks`, `number`, [`number`]), }, error: { initWithCode: libzip.cwrap(`zip_error_init_with_code`, null, [`number`, `number`]), strerror: libzip.cwrap(`zip_error_strerror`, `string`, [`number`]), }, name: { locate: libzip.cwrap(`zip_name_locate`, `number`, [`number`, `string`, `number`]), }, source: { fromUnattachedBuffer: libzip.cwrap(`zip_source_buffer_create`, `number`, [`number`, `number`, `number`, `number`]), fromBuffer: libzip.cwrap(`zip_source_buffer`, `number`, [`number`, `number`, ...number64, `number`]), free: libzip.cwrap(`zip_source_free`, null, [`number`]), keep: libzip.cwrap(`zip_source_keep`, null, [`number`]), open: libzip.cwrap(`zip_source_open`, `number`, [`number`]), close: libzip.cwrap(`zip_source_close`, `number`, [`number`]), seek: libzip.cwrap(`zip_source_seek`, `number`, [`number`, ...number64, `number`]), tell: libzip.cwrap(`zip_source_tell`, `number`, [`number`]), read: libzip.cwrap(`zip_source_read`, `number`, [`number`, `number`, `number`]), error: libzip.cwrap(`zip_source_error`, `number`, [`number`]), setMtime: libzip.cwrap(`zip_source_set_mtime`, `number`, [`number`, `number`]), }, struct: { stat: libzip.cwrap(`zipstruct_stat`, `number`, []), statS: libzip.cwrap(`zipstruct_statS`, `number`, []), statName: libzip.cwrap(`zipstruct_stat_name`, `string`, [`number`]), statIndex: libzip.cwrap(`zipstruct_stat_index`, `number`, [`number`]), statSize: libzip.cwrap(`zipstruct_stat_size`, `number`, [`number`]), statCompSize: libzip.cwrap(`zipstruct_stat_comp_size`, `number`, [`number`]), statCompMethod: libzip.cwrap(`zipstruct_stat_comp_method`, `number`, [`number`]), statMtime: libzip.cwrap(`zipstruct_stat_mtime`, `number`, [`number`]), statCrc: libzip.cwrap(`zipstruct_stat_crc`, `number`, [`number`]), error: libzip.cwrap(`zipstruct_error`, `number`, []), errorS: libzip.cwrap(`zipstruct_errorS`, `number`, []), errorCodeZip: libzip.cwrap(`zipstruct_error_code_zip`, `number`, [`number`]), }, }); exports.makeInterface = makeInterface; /***/ }), /***/ 40364: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getLibzipPromise = exports.getLibzipSync = void 0; const makeInterface_1 = __webpack_require__(86385); let mod = null; function getLibzipSync() { if (mod === null) mod = makeInterface_1.makeInterface(__webpack_require__(7861)); return mod; } exports.getLibzipSync = getLibzipSync; async function getLibzipPromise() { return getLibzipSync(); } exports.getLibzipPromise = getLibzipPromise; /***/ }), /***/ 7615: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_187__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __nested_webpack_require_187__.m = modules; /******/ /******/ // expose the module cache /******/ __nested_webpack_require_187__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __nested_webpack_require_187__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __nested_webpack_require_187__.d = function(exports, name, getter) { /******/ if(!__nested_webpack_require_187__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __nested_webpack_require_187__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __nested_webpack_require_187__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __nested_webpack_require_187__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __nested_webpack_require_187__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __nested_webpack_require_187__(__nested_webpack_require_187__.s = 14); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = __webpack_require__(85622); /***/ }), /* 1 */ /***/ (function(module, exports, __nested_webpack_require_2716__) { "use strict"; exports.__esModule = true; var _promise = __nested_webpack_require_2716__(173); var _promise2 = _interopRequireDefault(_promise); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (fn) { return function () { var gen = fn.apply(this, arguments); return new _promise2.default(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return _promise2.default.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }; /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = __webpack_require__(31669); /***/ }), /* 3 */ /***/ (function(module, exports) { module.exports = __webpack_require__(35747); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class MessageError extends Error { constructor(msg, code) { super(msg); this.code = code; } } exports.MessageError = MessageError; class ProcessSpawnError extends MessageError { constructor(msg, code, process) { super(msg, code); this.process = process; } } exports.ProcessSpawnError = ProcessSpawnError; class SecurityError extends MessageError {} exports.SecurityError = SecurityError; class ProcessTermError extends MessageError {} exports.ProcessTermError = ProcessTermError; class ResponseError extends Error { constructor(msg, responseCode) { super(msg); this.responseCode = responseCode; } } exports.ResponseError = ResponseError; /***/ }), /* 5 */ /***/ (function(module, exports, __nested_webpack_require_4709__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.makeTempDir = exports.hardlinksWork = exports.writeFilePreservingEol = exports.getFileSizeOnDisk = exports.walk = exports.symlink = exports.find = exports.readJsonAndFile = exports.readJson = exports.readFileAny = exports.hardlinkBulk = exports.copyBulk = exports.unlink = exports.glob = exports.link = exports.chmod = exports.lstat = exports.exists = exports.mkdirp = exports.stat = exports.access = exports.rename = exports.readdir = exports.realpath = exports.readlink = exports.writeFile = exports.open = exports.readFileBuffer = exports.lockQueue = exports.constants = undefined; var _asyncToGenerator2; function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__nested_webpack_require_4709__(1)); } let buildActionsForCopy = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { // let build = (() => { var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { const src = data.src, dest = data.dest, type = data.type; const onFresh = data.onFresh || noop; const onDone = data.onDone || noop; // TODO https://github.com/yarnpkg/yarn/issues/3751 // related to bundled dependencies handling if (files.has(dest.toLowerCase())) { reporter.verbose(`The case-insensitive file ${dest} shouldn't be copied twice in one bulk copy`); } else { files.add(dest.toLowerCase()); } if (type === 'symlink') { yield mkdirp((_path || _load_path()).default.dirname(dest)); onFresh(); actions.symlink.push({ dest, linkname: src }); onDone(); return; } if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { // ignored file return; } const srcStat = yield lstat(src); let srcFiles; if (srcStat.isDirectory()) { srcFiles = yield readdir(src); } let destStat; try { // try accessing the destination destStat = yield lstat(dest); } catch (e) { // proceed if destination doesn't exist, otherwise error if (e.code !== 'ENOENT') { throw e; } } // if destination exists if (destStat) { const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); const bothFiles = srcStat.isFile() && destStat.isFile(); // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving // us modes that aren't valid. investigate this, it's generally safe to proceed. /* if (srcStat.mode !== destStat.mode) { try { await access(dest, srcStat.mode); } catch (err) {} } */ if (bothFiles && artifactFiles.has(dest)) { // this file gets changed during build, likely by a custom install script. Don't bother checking it. onDone(); reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); return; } if (bothFiles && srcStat.size === destStat.size && (0, (_fsNormalized || _load_fsNormalized()).fileDatesEqual)(srcStat.mtime, destStat.mtime)) { // we can safely assume this is the same file onDone(); reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.size, +srcStat.mtime)); return; } if (bothSymlinks) { const srcReallink = yield readlink(src); if (srcReallink === (yield readlink(dest))) { // if both symlinks are the same then we can continue on onDone(); reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); return; } } if (bothFolders) { // mark files that aren't in this folder as possibly extraneous const destFiles = yield readdir(dest); invariant(srcFiles, 'src files not initialised'); for (var _iterator4 = destFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { var _ref6; if (_isArray4) { if (_i4 >= _iterator4.length) break; _ref6 = _iterator4[_i4++]; } else { _i4 = _iterator4.next(); if (_i4.done) break; _ref6 = _i4.value; } const file = _ref6; if (srcFiles.indexOf(file) < 0) { const loc = (_path || _load_path()).default.join(dest, file); possibleExtraneous.add(loc); if ((yield lstat(loc)).isDirectory()) { for (var _iterator5 = yield readdir(loc), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { var _ref7; if (_isArray5) { if (_i5 >= _iterator5.length) break; _ref7 = _iterator5[_i5++]; } else { _i5 = _iterator5.next(); if (_i5.done) break; _ref7 = _i5.value; } const file = _ref7; possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); } } } } } } if (destStat && destStat.isSymbolicLink()) { yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); destStat = null; } if (srcStat.isSymbolicLink()) { onFresh(); const linkname = yield readlink(src); actions.symlink.push({ dest, linkname }); onDone(); } else if (srcStat.isDirectory()) { if (!destStat) { reporter.verbose(reporter.lang('verboseFileFolder', dest)); yield mkdirp(dest); } const destParts = dest.split((_path || _load_path()).default.sep); while (destParts.length) { files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); destParts.pop(); } // push all files to queue invariant(srcFiles, 'src files not initialised'); let remaining = srcFiles.length; if (!remaining) { onDone(); } for (var _iterator6 = srcFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { var _ref8; if (_isArray6) { if (_i6 >= _iterator6.length) break; _ref8 = _iterator6[_i6++]; } else { _i6 = _iterator6.next(); if (_i6.done) break; _ref8 = _i6.value; } const file = _ref8; queue.push({ dest: (_path || _load_path()).default.join(dest, file), onFresh, onDone: function (_onDone) { function onDone() { return _onDone.apply(this, arguments); } onDone.toString = function () { return _onDone.toString(); }; return onDone; }(function () { if (--remaining === 0) { onDone(); } }), src: (_path || _load_path()).default.join(src, file) }); } } else if (srcStat.isFile()) { onFresh(); actions.file.push({ src, dest, atime: srcStat.atime, mtime: srcStat.mtime, mode: srcStat.mode }); onDone(); } else { throw new Error(`unsure how to copy this: ${src}`); } }); return function build(_x5) { return _ref5.apply(this, arguments); }; })(); const artifactFiles = new Set(events.artifactFiles || []); const files = new Set(); // initialise events for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref2; if (_isArray) { if (_i >= _iterator.length) break; _ref2 = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref2 = _i.value; } const item = _ref2; const onDone = item.onDone; item.onDone = function () { events.onProgress(item.dest); if (onDone) { onDone(); } }; } events.onStart(queue.length); // start building actions const actions = { file: [], symlink: [], link: [] }; // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items // at a time due to the requirement to push items onto the queue while (queue.length) { const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); yield Promise.all(items.map(build)); } // simulate the existence of some files to prevent considering them extraneous for (var _iterator2 = artifactFiles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { var _ref3; if (_isArray2) { if (_i2 >= _iterator2.length) break; _ref3 = _iterator2[_i2++]; } else { _i2 = _iterator2.next(); if (_i2.done) break; _ref3 = _i2.value; } const file = _ref3; if (possibleExtraneous.has(file)) { reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); possibleExtraneous.delete(file); } } for (var _iterator3 = possibleExtraneous, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { var _ref4; if (_isArray3) { if (_i3 >= _iterator3.length) break; _ref4 = _iterator3[_i3++]; } else { _i3 = _iterator3.next(); if (_i3.done) break; _ref4 = _i3.value; } const loc = _ref4; if (files.has(loc.toLowerCase())) { possibleExtraneous.delete(loc); } } return actions; }); return function buildActionsForCopy(_x, _x2, _x3, _x4) { return _ref.apply(this, arguments); }; })(); let buildActionsForHardlink = (() => { var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, events, possibleExtraneous, reporter) { // let build = (() => { var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { const src = data.src, dest = data.dest; const onFresh = data.onFresh || noop; const onDone = data.onDone || noop; if (files.has(dest.toLowerCase())) { // Fixes issue https://github.com/yarnpkg/yarn/issues/2734 // When bulk hardlinking we have A -> B structure that we want to hardlink to A1 -> B1, // package-linker passes that modules A1 and B1 need to be hardlinked, // the recursive linking algorithm of A1 ends up scheduling files in B1 to be linked twice which will case // an exception. onDone(); return; } files.add(dest.toLowerCase()); if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { // ignored file return; } const srcStat = yield lstat(src); let srcFiles; if (srcStat.isDirectory()) { srcFiles = yield readdir(src); } const destExists = yield exists(dest); if (destExists) { const destStat = yield lstat(dest); const bothSymlinks = srcStat.isSymbolicLink() && destStat.isSymbolicLink(); const bothFolders = srcStat.isDirectory() && destStat.isDirectory(); const bothFiles = srcStat.isFile() && destStat.isFile(); if (srcStat.mode !== destStat.mode) { try { yield access(dest, srcStat.mode); } catch (err) { // EINVAL access errors sometimes happen which shouldn't because node shouldn't be giving // us modes that aren't valid. investigate this, it's generally safe to proceed. reporter.verbose(err); } } if (bothFiles && artifactFiles.has(dest)) { // this file gets changed during build, likely by a custom install script. Don't bother checking it. onDone(); reporter.verbose(reporter.lang('verboseFileSkipArtifact', src)); return; } // correct hardlink if (bothFiles && srcStat.ino !== null && srcStat.ino === destStat.ino) { onDone(); reporter.verbose(reporter.lang('verboseFileSkip', src, dest, srcStat.ino)); return; } if (bothSymlinks) { const srcReallink = yield readlink(src); if (srcReallink === (yield readlink(dest))) { // if both symlinks are the same then we can continue on onDone(); reporter.verbose(reporter.lang('verboseFileSkipSymlink', src, dest, srcReallink)); return; } } if (bothFolders) { // mark files that aren't in this folder as possibly extraneous const destFiles = yield readdir(dest); invariant(srcFiles, 'src files not initialised'); for (var _iterator10 = destFiles, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { var _ref14; if (_isArray10) { if (_i10 >= _iterator10.length) break; _ref14 = _iterator10[_i10++]; } else { _i10 = _iterator10.next(); if (_i10.done) break; _ref14 = _i10.value; } const file = _ref14; if (srcFiles.indexOf(file) < 0) { const loc = (_path || _load_path()).default.join(dest, file); possibleExtraneous.add(loc); if ((yield lstat(loc)).isDirectory()) { for (var _iterator11 = yield readdir(loc), _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { var _ref15; if (_isArray11) { if (_i11 >= _iterator11.length) break; _ref15 = _iterator11[_i11++]; } else { _i11 = _iterator11.next(); if (_i11.done) break; _ref15 = _i11.value; } const file = _ref15; possibleExtraneous.add((_path || _load_path()).default.join(loc, file)); } } } } } } if (srcStat.isSymbolicLink()) { onFresh(); const linkname = yield readlink(src); actions.symlink.push({ dest, linkname }); onDone(); } else if (srcStat.isDirectory()) { reporter.verbose(reporter.lang('verboseFileFolder', dest)); yield mkdirp(dest); const destParts = dest.split((_path || _load_path()).default.sep); while (destParts.length) { files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); destParts.pop(); } // push all files to queue invariant(srcFiles, 'src files not initialised'); let remaining = srcFiles.length; if (!remaining) { onDone(); } for (var _iterator12 = srcFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { var _ref16; if (_isArray12) { if (_i12 >= _iterator12.length) break; _ref16 = _iterator12[_i12++]; } else { _i12 = _iterator12.next(); if (_i12.done) break; _ref16 = _i12.value; } const file = _ref16; queue.push({ onFresh, src: (_path || _load_path()).default.join(src, file), dest: (_path || _load_path()).default.join(dest, file), onDone: function (_onDone2) { function onDone() { return _onDone2.apply(this, arguments); } onDone.toString = function () { return _onDone2.toString(); }; return onDone; }(function () { if (--remaining === 0) { onDone(); } }) }); } } else if (srcStat.isFile()) { onFresh(); actions.link.push({ src, dest, removeDest: destExists }); onDone(); } else { throw new Error(`unsure how to copy this: ${src}`); } }); return function build(_x10) { return _ref13.apply(this, arguments); }; })(); const artifactFiles = new Set(events.artifactFiles || []); const files = new Set(); // initialise events for (var _iterator7 = queue, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { var _ref10; if (_isArray7) { if (_i7 >= _iterator7.length) break; _ref10 = _iterator7[_i7++]; } else { _i7 = _iterator7.next(); if (_i7.done) break; _ref10 = _i7.value; } const item = _ref10; const onDone = item.onDone || noop; item.onDone = function () { events.onProgress(item.dest); onDone(); }; } events.onStart(queue.length); // start building actions const actions = { file: [], symlink: [], link: [] }; // custom concurrency logic as we're always executing stacks of CONCURRENT_QUEUE_ITEMS queue items // at a time due to the requirement to push items onto the queue while (queue.length) { const items = queue.splice(0, CONCURRENT_QUEUE_ITEMS); yield Promise.all(items.map(build)); } // simulate the existence of some files to prevent considering them extraneous for (var _iterator8 = artifactFiles, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { var _ref11; if (_isArray8) { if (_i8 >= _iterator8.length) break; _ref11 = _iterator8[_i8++]; } else { _i8 = _iterator8.next(); if (_i8.done) break; _ref11 = _i8.value; } const file = _ref11; if (possibleExtraneous.has(file)) { reporter.verbose(reporter.lang('verboseFilePhantomExtraneous', file)); possibleExtraneous.delete(file); } } for (var _iterator9 = possibleExtraneous, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { var _ref12; if (_isArray9) { if (_i9 >= _iterator9.length) break; _ref12 = _iterator9[_i9++]; } else { _i9 = _iterator9.next(); if (_i9.done) break; _ref12 = _i9.value; } const loc = _ref12; if (files.has(loc.toLowerCase())) { possibleExtraneous.delete(loc); } } return actions; }); return function buildActionsForHardlink(_x6, _x7, _x8, _x9) { return _ref9.apply(this, arguments); }; })(); let copyBulk = exports.copyBulk = (() => { var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { const events = { onStart: _events && _events.onStart || noop, onProgress: _events && _events.onProgress || noop, possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), ignoreBasenames: _events && _events.ignoreBasenames || [], artifactFiles: _events && _events.artifactFiles || [] }; const actions = yield buildActionsForCopy(queue, events, events.possibleExtraneous, reporter); events.onStart(actions.file.length + actions.symlink.length + actions.link.length); const fileActions = actions.file; const currentlyWriting = new Map(); yield (_promise || _load_promise()).queue(fileActions, (() => { var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { let writePromise; while (writePromise = currentlyWriting.get(data.dest)) { yield writePromise; } reporter.verbose(reporter.lang('verboseFileCopy', data.src, data.dest)); const copier = (0, (_fsNormalized || _load_fsNormalized()).copyFile)(data, function () { return currentlyWriting.delete(data.dest); }); currentlyWriting.set(data.dest, copier); events.onProgress(data.dest); return copier; }); return function (_x14) { return _ref18.apply(this, arguments); }; })(), CONCURRENT_QUEUE_ITEMS); // we need to copy symlinks last as they could reference files we were copying const symlinkActions = actions.symlink; yield (_promise || _load_promise()).queue(symlinkActions, function (data) { const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); }); return function copyBulk(_x11, _x12, _x13) { return _ref17.apply(this, arguments); }; })(); let hardlinkBulk = exports.hardlinkBulk = (() => { var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (queue, reporter, _events) { const events = { onStart: _events && _events.onStart || noop, onProgress: _events && _events.onProgress || noop, possibleExtraneous: _events ? _events.possibleExtraneous : new Set(), artifactFiles: _events && _events.artifactFiles || [], ignoreBasenames: [] }; const actions = yield buildActionsForHardlink(queue, events, events.possibleExtraneous, reporter); events.onStart(actions.file.length + actions.symlink.length + actions.link.length); const fileActions = actions.link; yield (_promise || _load_promise()).queue(fileActions, (() => { var _ref20 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data) { reporter.verbose(reporter.lang('verboseFileLink', data.src, data.dest)); if (data.removeDest) { yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(data.dest); } yield link(data.src, data.dest); }); return function (_x18) { return _ref20.apply(this, arguments); }; })(), CONCURRENT_QUEUE_ITEMS); // we need to copy symlinks last as they could reference files we were copying const symlinkActions = actions.symlink; yield (_promise || _load_promise()).queue(symlinkActions, function (data) { const linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); }); return function hardlinkBulk(_x15, _x16, _x17) { return _ref19.apply(this, arguments); }; })(); let readFileAny = exports.readFileAny = (() => { var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (files) { for (var _iterator13 = files, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { var _ref22; if (_isArray13) { if (_i13 >= _iterator13.length) break; _ref22 = _iterator13[_i13++]; } else { _i13 = _iterator13.next(); if (_i13.done) break; _ref22 = _i13.value; } const file = _ref22; if (yield exists(file)) { return readFile(file); } } return null; }); return function readFileAny(_x19) { return _ref21.apply(this, arguments); }; })(); let readJson = exports.readJson = (() => { var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { return (yield readJsonAndFile(loc)).object; }); return function readJson(_x20) { return _ref23.apply(this, arguments); }; })(); let readJsonAndFile = exports.readJsonAndFile = (() => { var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { const file = yield readFile(loc); try { return { object: (0, (_map || _load_map()).default)(JSON.parse(stripBOM(file))), content: file }; } catch (err) { err.message = `${loc}: ${err.message}`; throw err; } }); return function readJsonAndFile(_x21) { return _ref24.apply(this, arguments); }; })(); let find = exports.find = (() => { var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { const parts = dir.split((_path || _load_path()).default.sep); while (parts.length) { const loc = parts.concat(filename).join((_path || _load_path()).default.sep); if (yield exists(loc)) { return loc; } else { parts.pop(); } } return false; }); return function find(_x22, _x23) { return _ref25.apply(this, arguments); }; })(); let symlink = exports.symlink = (() => { var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { try { const stats = yield lstat(dest); if (stats.isSymbolicLink()) { const resolved = yield realpath(dest); if (resolved === src) { return; } } } catch (err) { if (err.code !== 'ENOENT') { throw err; } } // We use rimraf for unlink which never throws an ENOENT on missing target yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); if (process.platform === 'win32') { // use directory junctions if possible on win32, this requires absolute paths yield fsSymlink(src, dest, 'junction'); } else { // use relative paths otherwise which will be retained if the directory is moved let relative; try { relative = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); } catch (err) { if (err.code !== 'ENOENT') { throw err; } relative = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); } // When path.relative returns an empty string for the current directory, we should instead use // '.', which is a valid fs.symlink target. yield fsSymlink(relative || '.', dest); } }); return function symlink(_x24, _x25) { return _ref26.apply(this, arguments); }; })(); let walk = exports.walk = (() => { var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) { let files = []; let filenames = yield readdir(dir); if (ignoreBasenames.size) { filenames = filenames.filter(function (name) { return !ignoreBasenames.has(name); }); } for (var _iterator14 = filenames, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { var _ref28; if (_isArray14) { if (_i14 >= _iterator14.length) break; _ref28 = _iterator14[_i14++]; } else { _i14 = _iterator14.next(); if (_i14.done) break; _ref28 = _i14.value; } const name = _ref28; const relative = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; const loc = (_path || _load_path()).default.join(dir, name); const stat = yield lstat(loc); files.push({ relative, basename: name, absolute: loc, mtime: +stat.mtime }); if (stat.isDirectory()) { files = files.concat((yield walk(loc, relative, ignoreBasenames))); } } return files; }); return function walk(_x26, _x27) { return _ref27.apply(this, arguments); }; })(); let getFileSizeOnDisk = exports.getFileSizeOnDisk = (() => { var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (loc) { const stat = yield lstat(loc); const size = stat.size, blockSize = stat.blksize; return Math.ceil(size / blockSize) * blockSize; }); return function getFileSizeOnDisk(_x28) { return _ref29.apply(this, arguments); }; })(); let getEolFromFile = (() => { var _ref30 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path) { if (!(yield exists(path))) { return undefined; } const buffer = yield readFileBuffer(path); for (let i = 0; i < buffer.length; ++i) { if (buffer[i] === cr) { return '\r\n'; } if (buffer[i] === lf) { return '\n'; } } return undefined; }); return function getEolFromFile(_x29) { return _ref30.apply(this, arguments); }; })(); let writeFilePreservingEol = exports.writeFilePreservingEol = (() => { var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (path, data) { const eol = (yield getEolFromFile(path)) || (_os || _load_os()).default.EOL; if (eol !== '\n') { data = data.replace(/\n/g, eol); } yield writeFile(path, data); }); return function writeFilePreservingEol(_x30, _x31) { return _ref31.apply(this, arguments); }; })(); let hardlinksWork = exports.hardlinksWork = (() => { var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { const filename = 'test-file' + Math.random(); const file = (_path || _load_path()).default.join(dir, filename); const fileLink = (_path || _load_path()).default.join(dir, filename + '-link'); try { yield writeFile(file, 'test'); yield link(file, fileLink); } catch (err) { return false; } finally { yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(file); yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(fileLink); } return true; }); return function hardlinksWork(_x32) { return _ref32.apply(this, arguments); }; })(); // not a strict polyfill for Node's fs.mkdtemp let makeTempDir = exports.makeTempDir = (() => { var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { const dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); yield mkdirp(dir); return dir; }); return function makeTempDir(_x33) { return _ref33.apply(this, arguments); }; })(); let readFirstAvailableStream = exports.readFirstAvailableStream = (() => { var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { var _ref35; if (_isArray15) { if (_i15 >= _iterator15.length) break; _ref35 = _iterator15[_i15++]; } else { _i15 = _iterator15.next(); if (_i15.done) break; _ref35 = _i15.value; } const path = _ref35; try { const fd = yield open(path, 'r'); return (_fs || _load_fs()).default.createReadStream(path, { fd }); } catch (err) { // Try the next one } } return null; }); return function readFirstAvailableStream(_x34) { return _ref34.apply(this, arguments); }; })(); let getFirstSuitableFolder = exports.getFirstSuitableFolder = (() => { var _ref36 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths, mode = constants.W_OK | constants.X_OK) { const result = { skipped: [], folder: null }; for (var _iterator16 = paths, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) { var _ref37; if (_isArray16) { if (_i16 >= _iterator16.length) break; _ref37 = _iterator16[_i16++]; } else { _i16 = _iterator16.next(); if (_i16.done) break; _ref37 = _i16.value; } const folder = _ref37; try { yield mkdirp(folder); yield access(folder, mode); result.folder = folder; return result; } catch (error) { result.skipped.push({ error, folder }); } } return result; }); return function getFirstSuitableFolder(_x35) { return _ref36.apply(this, arguments); }; })(); exports.copy = copy; exports.readFile = readFile; exports.readFileRaw = readFileRaw; exports.normalizeOS = normalizeOS; var _fs; function _load_fs() { return _fs = _interopRequireDefault(__nested_webpack_require_4709__(3)); } var _glob; function _load_glob() { return _glob = _interopRequireDefault(__nested_webpack_require_4709__(75)); } var _os; function _load_os() { return _os = _interopRequireDefault(__nested_webpack_require_4709__(36)); } var _path; function _load_path() { return _path = _interopRequireDefault(__nested_webpack_require_4709__(0)); } var _blockingQueue; function _load_blockingQueue() { return _blockingQueue = _interopRequireDefault(__nested_webpack_require_4709__(84)); } var _promise; function _load_promise() { return _promise = _interopRequireWildcard(__nested_webpack_require_4709__(40)); } var _promise2; function _load_promise2() { return _promise2 = __nested_webpack_require_4709__(40); } var _map; function _load_map() { return _map = _interopRequireDefault(__nested_webpack_require_4709__(20)); } var _fsNormalized; function _load_fsNormalized() { return _fsNormalized = __nested_webpack_require_4709__(164); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const constants = exports.constants = typeof (_fs || _load_fs()).default.constants !== 'undefined' ? (_fs || _load_fs()).default.constants : { R_OK: (_fs || _load_fs()).default.R_OK, W_OK: (_fs || _load_fs()).default.W_OK, X_OK: (_fs || _load_fs()).default.X_OK }; const lockQueue = exports.lockQueue = new (_blockingQueue || _load_blockingQueue()).default('fs lock'); const readFileBuffer = exports.readFileBuffer = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readFile); const open = exports.open = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.open); const writeFile = exports.writeFile = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.writeFile); const readlink = exports.readlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readlink); const realpath = exports.realpath = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.realpath); const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.readdir); const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__nested_webpack_require_4709__(116)); const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); const link = exports.link = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.link); const glob = exports.glob = (0, (_promise2 || _load_promise2()).promisify)((_glob || _load_glob()).default); exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink; // fs.copyFile uses the native file copying instructions on the system, performing much better // than any JS-based solution and consumes fewer resources. Repeated testing to fine tune the // concurrency level revealed 128 as the sweet spot on a quad-core, 16 CPU Intel system with SSD. const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); const invariant = __nested_webpack_require_4709__(7); const stripBOM = __nested_webpack_require_4709__(122); const noop = () => {}; function copy(src, dest, reporter) { return copyBulk([{ src, dest }], reporter); } function _readFile(loc, encoding) { return new Promise((resolve, reject) => { (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) { if (err) { reject(err); } else { resolve(content); } }); }); } function readFile(loc) { return _readFile(loc, 'utf8').then(normalizeOS); } function readFileRaw(loc) { return _readFile(loc, 'binary'); } function normalizeOS(body) { return body.replace(/\r\n/g, '\n'); } const cr = '\r'.charCodeAt(0); const lf = '\n'.charCodeAt(0); /***/ }), /* 6 */ /***/ (function(module, exports, __nested_webpack_require_44107__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; const os = __nested_webpack_require_44107__(36); const path = __nested_webpack_require_44107__(0); const userHome = __nested_webpack_require_44107__(45).default; var _require = __nested_webpack_require_44107__(171); const getCacheDir = _require.getCacheDir, getConfigDir = _require.getConfigDir, getDataDir = _require.getDataDir; const isWebpackBundle = __nested_webpack_require_44107__(227); const DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; const RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; const MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS, ...DEPENDENCY_TYPES]; const SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; const YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; const YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; const YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; const YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; const SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; // cache version, bump whenever we make backwards incompatible changes const CACHE_VERSION = exports.CACHE_VERSION = 2; // lockfile version, bump whenever we make backwards incompatible changes const LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; // max amount of network requests to perform concurrently const NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; // HTTP timeout used when downloading packages const NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds // max amount of child processes to execute concurrently const CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; const REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; function getPreferredCacheDirectories() { const preferredCacheDirectories = [getCacheDir()]; if (process.getuid) { // $FlowFixMe: process.getuid exists, dammit preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); } preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); return preferredCacheDirectories; } const PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); const CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); const DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); const LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); const GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); const NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; const YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); // Webpack needs to be configured with node.__dirname/__filename = false function getYarnBinPath() { if (isWebpackBundle) { return __filename; } else { return path.join(__dirname, '..', 'bin', 'yarn.js'); } } const NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; const NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; const POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; const FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); const META_FOLDER = exports.META_FOLDER = '.yarn-meta'; const INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; const LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; const METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; const TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; const CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; const NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; const NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; const DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; const SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; const SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; const ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); function getPathKey(platform, env) { let pathKey = 'PATH'; // windows calls its path "Path" usually, but this is not guaranteed. if (platform === 'win32') { pathKey = 'Path'; for (const key in env) { if (key.toLowerCase() === 'path') { pathKey = key; } } } return pathKey; } const VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { major: 'red', premajor: 'red', minor: 'yellow', preminor: 'yellow', patch: 'green', prepatch: 'green', prerelease: 'red', unchanged: 'white', unknown: 'red' }; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var NODE_ENV = "production"; var invariant = function(condition, format, a, b, c, d, e, f) { if (NODE_ENV !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }), /* 8 */, /* 9 */ /***/ (function(module, exports) { module.exports = __webpack_require__(76417); /***/ }), /* 10 */, /* 11 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 12 */ /***/ (function(module, exports, __nested_webpack_require_51177__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sortAlpha = sortAlpha; exports.entries = entries; exports.removePrefix = removePrefix; exports.removeSuffix = removeSuffix; exports.addSuffix = addSuffix; exports.hyphenate = hyphenate; exports.camelCase = camelCase; exports.compareSortedArrays = compareSortedArrays; exports.sleep = sleep; const _camelCase = __nested_webpack_require_51177__(176); function sortAlpha(a, b) { // sort alphabetically in a deterministic way const shortLen = Math.min(a.length, b.length); for (let i = 0; i < shortLen; i++) { const aChar = a.charCodeAt(i); const bChar = b.charCodeAt(i); if (aChar !== bChar) { return aChar - bChar; } } return a.length - b.length; } function entries(obj) { const entries = []; if (obj) { for (const key in obj) { entries.push([key, obj[key]]); } } return entries; } function removePrefix(pattern, prefix) { if (pattern.startsWith(prefix)) { pattern = pattern.slice(prefix.length); } return pattern; } function removeSuffix(pattern, suffix) { if (pattern.endsWith(suffix)) { return pattern.slice(0, -suffix.length); } return pattern; } function addSuffix(pattern, suffix) { if (!pattern.endsWith(suffix)) { return pattern + suffix; } return pattern; } function hyphenate(str) { return str.replace(/[A-Z]/g, match => { return '-' + match.charAt(0).toLowerCase(); }); } function camelCase(str) { if (/[A-Z]/.test(str)) { return null; } else { return _camelCase(str); } } function compareSortedArrays(array1, array2) { if (array1.length !== array2.length) { return false; } for (let i = 0, len = array1.length; i < len; i++) { if (array1[i] !== array2[i]) { return false; } } return true; } function sleep(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); } /***/ }), /* 13 */ /***/ (function(module, exports, __nested_webpack_require_53169__) { var store = __nested_webpack_require_53169__(107)('wks'); var uid = __nested_webpack_require_53169__(111); var Symbol = __nested_webpack_require_53169__(11).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 14 */ /***/ (function(module, exports, __nested_webpack_require_53619__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringify = exports.parse = undefined; var _asyncToGenerator2; function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__nested_webpack_require_53619__(1)); } var _parse; function _load_parse() { return _parse = __nested_webpack_require_53619__(81); } Object.defineProperty(exports, 'parse', { enumerable: true, get: function get() { return _interopRequireDefault(_parse || _load_parse()).default; } }); var _stringify; function _load_stringify() { return _stringify = __nested_webpack_require_53619__(150); } Object.defineProperty(exports, 'stringify', { enumerable: true, get: function get() { return _interopRequireDefault(_stringify || _load_stringify()).default; } }); exports.implodeEntry = implodeEntry; exports.explodeEntry = explodeEntry; var _misc; function _load_misc() { return _misc = __nested_webpack_require_53619__(12); } var _normalizePattern; function _load_normalizePattern() { return _normalizePattern = __nested_webpack_require_53619__(29); } var _parse2; function _load_parse2() { return _parse2 = _interopRequireDefault(__nested_webpack_require_53619__(81)); } var _constants; function _load_constants() { return _constants = __nested_webpack_require_53619__(6); } var _fs; function _load_fs() { return _fs = _interopRequireWildcard(__nested_webpack_require_53619__(5)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const invariant = __nested_webpack_require_53619__(7); const path = __nested_webpack_require_53619__(0); const ssri = __nested_webpack_require_53619__(55); function getName(pattern) { return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; } function blankObjectUndefined(obj) { return obj && Object.keys(obj).length ? obj : undefined; } function keyForRemote(remote) { return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); } function serializeIntegrity(integrity) { // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output // See https://git.io/vx2Hy return integrity.toString().split(' ').sort().join(' '); } function implodeEntry(pattern, obj) { const inferredName = getName(pattern); const integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ''; const imploded = { name: inferredName === obj.name ? undefined : obj.name, version: obj.version, uid: obj.uid === obj.version ? undefined : obj.uid, resolved: obj.resolved, registry: obj.registry === 'npm' ? undefined : obj.registry, dependencies: blankObjectUndefined(obj.dependencies), optionalDependencies: blankObjectUndefined(obj.optionalDependencies), permissions: blankObjectUndefined(obj.permissions), prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) }; if (integrity) { imploded.integrity = integrity; } return imploded; } function explodeEntry(pattern, obj) { obj.optionalDependencies = obj.optionalDependencies || {}; obj.dependencies = obj.dependencies || {}; obj.uid = obj.uid || obj.version; obj.permissions = obj.permissions || {}; obj.registry = obj.registry || 'npm'; obj.name = obj.name || getName(pattern); const integrity = obj.integrity; if (integrity && integrity.isIntegrity) { obj.integrity = ssri.parse(integrity); } return obj; } class Lockfile { constructor({ cache, source, parseResultType } = {}) { this.source = source || ''; this.cache = cache; this.parseResultType = parseResultType; } // source string if the `cache` was parsed // if true, we're parsing an old yarn file and need to update integrity fields hasEntriesExistWithoutIntegrity() { if (!this.cache) { return false; } for (const key in this.cache) { // $FlowFixMe - `this.cache` is clearly defined at this point if (!/^.*@(file:|http)/.test(key) && this.cache[key] && !this.cache[key].integrity) { return true; } } return false; } static fromDirectory(dir, reporter) { return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { // read the manifest in this directory const lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); let lockfile; let rawLockfile = ''; let parseResult; if (yield (_fs || _load_fs()).exists(lockfileLoc)) { rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); if (reporter) { if (parseResult.type === 'merge') { reporter.info(reporter.lang('lockfileMerged')); } else if (parseResult.type === 'conflict') { reporter.warn(reporter.lang('lockfileConflict')); } } lockfile = parseResult.object; } else if (reporter) { reporter.info(reporter.lang('noLockfileFound')); } return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); })(); } getLocked(pattern) { const cache = this.cache; if (!cache) { return undefined; } const shrunk = pattern in cache && cache[pattern]; if (typeof shrunk === 'string') { return this.getLocked(shrunk); } else if (shrunk) { explodeEntry(pattern, shrunk); return shrunk; } return undefined; } removePattern(pattern) { const cache = this.cache; if (!cache) { return; } delete cache[pattern]; } getLockfile(patterns) { const lockfile = {}; const seen = new Map(); // order by name so that lockfile manifest is assigned to the first dependency with this manifest // the others that have the same remoteKey will just refer to the first // ordering allows for consistency in lockfile when it is serialized const sortedPatternsKeys = Object.keys(patterns).sort((_misc || _load_misc()).sortAlpha); for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } const pattern = _ref; const pkg = patterns[pattern]; const remote = pkg._remote, ref = pkg._reference; invariant(ref, 'Package is missing a reference'); invariant(remote, 'Package is missing a remote'); const remoteKey = keyForRemote(remote); const seenPattern = remoteKey && seen.get(remoteKey); if (seenPattern) { // no point in duplicating it lockfile[pattern] = seenPattern; // if we're relying on our name being inferred and two of the patterns have // different inferred names then we need to set it if (!seenPattern.name && getName(pattern) !== pkg.name) { seenPattern.name = pkg.name; } continue; } const obj = implodeEntry(pattern, { name: pkg.name, version: pkg.version, uid: pkg._uid, resolved: remote.resolved, integrity: remote.integrity, registry: remote.registry, dependencies: pkg.dependencies, peerDependencies: pkg.peerDependencies, optionalDependencies: pkg.optionalDependencies, permissions: ref.permissions, prebuiltVariants: pkg.prebuiltVariants }); lockfile[pattern] = obj; if (remoteKey) { seen.set(remoteKey, obj); } } return lockfile; } } exports.default = Lockfile; /***/ }), /* 15 */, /* 16 */, /* 17 */ /***/ (function(module, exports) { module.exports = __webpack_require__(92413); /***/ }), /* 18 */, /* 19 */, /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = nullify; function nullify(obj = {}) { if (Array.isArray(obj)) { for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } const item = _ref; nullify(item); } } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') { Object.setPrototypeOf(obj, null); // for..in can only be applied to 'object', not 'function' if (typeof obj === 'object') { for (const key in obj) { nullify(obj[key]); } } } return obj; } /***/ }), /* 21 */, /* 22 */ /***/ (function(module, exports) { module.exports = __webpack_require__(42357); /***/ }), /* 23 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 24 */, /* 25 */, /* 26 */, /* 27 */ /***/ (function(module, exports, __nested_webpack_require_63175__) { var isObject = __nested_webpack_require_63175__(34); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 28 */, /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizePattern = normalizePattern; /** * Explode and normalize a pattern into its name and range. */ function normalizePattern(pattern) { let hasVersion = false; let range = 'latest'; let name = pattern; // if we're a scope then remove the @ and add it back later let isScoped = false; if (name[0] === '@') { isScoped = true; name = name.slice(1); } // take first part as the name const parts = name.split('@'); if (parts.length > 1) { name = parts.shift(); range = parts.join('@'); if (range) { hasVersion = true; } else { range = '*'; } } // add back @ scope suffix if (isScoped) { name = `@${name}`; } return { name, range, hasVersion }; } /***/ }), /* 30 */, /* 31 */ /***/ (function(module, exports, __nested_webpack_require_64321__) { var dP = __nested_webpack_require_64321__(50); var createDesc = __nested_webpack_require_64321__(106); module.exports = __nested_webpack_require_64321__(33) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 32 */ /***/ (function(module, exports, __nested_webpack_require_64680__) { /* eslint-disable node/no-deprecated-api */ var buffer = __nested_webpack_require_64680__(63) var Buffer = buffer.Buffer // alternative to using Object.keys for old browsers function copyProps (src, dst) { for (var key in src) { dst[key] = src[key] } } if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { module.exports = buffer } else { // Copy properties from require('buffer') copyProps(buffer, exports) exports.Buffer = SafeBuffer } function SafeBuffer (arg, encodingOrOffset, length) { return Buffer(arg, encodingOrOffset, length) } // Copy static methods from Buffer copyProps(Buffer, SafeBuffer) SafeBuffer.from = function (arg, encodingOrOffset, length) { if (typeof arg === 'number') { throw new TypeError('Argument must not be a number') } return Buffer(arg, encodingOrOffset, length) } SafeBuffer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } var buf = Buffer(size) if (fill !== undefined) { if (typeof encoding === 'string') { buf.fill(fill, encoding) } else { buf.fill(fill) } } else { buf.fill(0) } return buf } SafeBuffer.allocUnsafe = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } return Buffer(size) } SafeBuffer.allocUnsafeSlow = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number') } return buffer.SlowBuffer(size) } /***/ }), /* 33 */ /***/ (function(module, exports, __nested_webpack_require_66293__) { // Thank's IE8 for his funny defineProperty module.exports = !__nested_webpack_require_66293__(85)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 34 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 35 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 36 */ /***/ (function(module, exports) { module.exports = __webpack_require__(12087); /***/ }), /* 37 */, /* 38 */, /* 39 */, /* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.wait = wait; exports.promisify = promisify; exports.queue = queue; function wait(delay) { return new Promise(resolve => { setTimeout(resolve, delay); }); } function promisify(fn, firstData) { return function (...args) { return new Promise(function (resolve, reject) { args.push(function (err, ...result) { let res = result; if (result.length <= 1) { res = result[0]; } if (firstData) { res = err; err = null; } if (err) { reject(err); } else { resolve(res); } }); fn.apply(null, args); }); }; } function queue(arr, promiseProducer, concurrency = Infinity) { concurrency = Math.min(concurrency, arr.length); // clone arr = arr.slice(); const results = []; let total = arr.length; if (!total) { return Promise.resolve(results); } return new Promise((resolve, reject) => { for (let i = 0; i < concurrency; i++) { next(); } function next() { const item = arr.shift(); const promise = promiseProducer(item); promise.then(function (result) { results.push(result); total--; if (total === 0) { resolve(results); } else { if (arr.length) { next(); } } }, reject); } }); } /***/ }), /* 41 */ /***/ (function(module, exports, __nested_webpack_require_68465__) { var global = __nested_webpack_require_68465__(11); var core = __nested_webpack_require_68465__(23); var ctx = __nested_webpack_require_68465__(48); var hide = __nested_webpack_require_68465__(31); var has = __nested_webpack_require_68465__(49); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 42 */ /***/ (function(module, exports, __nested_webpack_require_70917__) { try { var util = __nested_webpack_require_70917__(2); if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { module.exports = __nested_webpack_require_70917__(224); } /***/ }), /* 43 */, /* 44 */, /* 45 */ /***/ (function(module, exports, __nested_webpack_require_71206__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.home = undefined; var _rootUser; function _load_rootUser() { return _rootUser = _interopRequireDefault(__nested_webpack_require_71206__(169)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const path = __nested_webpack_require_71206__(0); const home = exports.home = __nested_webpack_require_71206__(36).homedir(); const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; exports.default = userHomeDir; /***/ }), /* 46 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 47 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 48 */ /***/ (function(module, exports, __nested_webpack_require_72188__) { // optional / simple context binding var aFunction = __nested_webpack_require_72188__(46); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 49 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 50 */ /***/ (function(module, exports, __nested_webpack_require_72962__) { var anObject = __nested_webpack_require_72962__(27); var IE8_DOM_DEFINE = __nested_webpack_require_72962__(184); var toPrimitive = __nested_webpack_require_72962__(201); var dP = Object.defineProperty; exports.f = __nested_webpack_require_72962__(33) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 51 */, /* 52 */, /* 53 */, /* 54 */ /***/ (function(module, exports) { module.exports = __webpack_require__(28614); /***/ }), /* 55 */ /***/ (function(module, exports, __nested_webpack_require_73754__) { "use strict"; const Buffer = __nested_webpack_require_73754__(32).Buffer const crypto = __nested_webpack_require_73754__(9) const Transform = __nested_webpack_require_73754__(17).Transform const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ const VCHAR_REGEX = /^[\x21-\x7E]+$/ class Hash { get isHash () { return true } constructor (hash, opts) { const strict = !!(opts && opts.strict) this.source = hash.trim() // 3.1. Integrity metadata (called "Hash" by ssri) // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description const match = this.source.match( strict ? STRICT_SRI_REGEX : SRI_REGEX ) if (!match) { return } if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return } this.algorithm = match[1] this.digest = match[2] const rawOpts = match[3] this.options = rawOpts ? rawOpts.slice(1).split('?') : [] } hexDigest () { return this.digest && Buffer.from(this.digest, 'base64').toString('hex') } toJSON () { return this.toString() } toString (opts) { if (opts && opts.strict) { // Strict mode enforces the standard as close to the foot of the // letter as it can. if (!( // The spec has very restricted productions for algorithms. // https://www.w3.org/TR/CSP2/#source-list-syntax SPEC_ALGORITHMS.some(x => x === this.algorithm) && // Usually, if someone insists on using a "different" base64, we // leave it as-is, since there's multiple standards, and the // specified is not a URL-safe variant. // https://www.w3.org/TR/CSP2/#base64_value this.digest.match(BASE64_REGEX) && // Option syntax is strictly visual chars. // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression // https://tools.ietf.org/html/rfc5234#appendix-B.1 (this.options || []).every(opt => opt.match(VCHAR_REGEX)) )) { return '' } } const options = this.options && this.options.length ? `?${this.options.join('?')}` : '' return `${this.algorithm}-${this.digest}${options}` } } class Integrity { get isIntegrity () { return true } toJSON () { return this.toString() } toString (opts) { opts = opts || {} let sep = opts.sep || ' ' if (opts.strict) { // Entries must be separated by whitespace, according to spec. sep = sep.replace(/\S+/g, ' ') } return Object.keys(this).map(k => { return this[k].map(hash => { return Hash.prototype.toString.call(hash, opts) }).filter(x => x.length).join(sep) }).filter(x => x.length).join(sep) } concat (integrity, opts) { const other = typeof integrity === 'string' ? integrity : stringify(integrity, opts) return parse(`${this.toString(opts)} ${other}`, opts) } hexDigest () { return parse(this, {single: true}).hexDigest() } match (integrity, opts) { const other = parse(integrity, opts) const algo = other.pickAlgorithm(opts) return ( this[algo] && other[algo] && this[algo].find(hash => other[algo].find(otherhash => hash.digest === otherhash.digest ) ) ) || false } pickAlgorithm (opts) { const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash const keys = Object.keys(this) if (!keys.length) { throw new Error(`No algorithms available for ${ JSON.stringify(this.toString()) }`) } return keys.reduce((acc, algo) => { return pickAlgorithm(acc, algo) || acc }) } } module.exports.parse = parse function parse (sri, opts) { opts = opts || {} if (typeof sri === 'string') { return _parse(sri, opts) } else if (sri.algorithm && sri.digest) { const fullSri = new Integrity() fullSri[sri.algorithm] = [sri] return _parse(stringify(fullSri, opts), opts) } else { return _parse(stringify(sri, opts), opts) } } function _parse (integrity, opts) { // 3.4.3. Parse metadata // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata if (opts.single) { return new Hash(integrity, opts) } return integrity.trim().split(/\s+/).reduce((acc, string) => { const hash = new Hash(string, opts) if (hash.algorithm && hash.digest) { const algo = hash.algorithm if (!acc[algo]) { acc[algo] = [] } acc[algo].push(hash) } return acc }, new Integrity()) } module.exports.stringify = stringify function stringify (obj, opts) { if (obj.algorithm && obj.digest) { return Hash.prototype.toString.call(obj, opts) } else if (typeof obj === 'string') { return stringify(parse(obj, opts), opts) } else { return Integrity.prototype.toString.call(obj, opts) } } module.exports.fromHex = fromHex function fromHex (hexDigest, algorithm, opts) { const optString = (opts && opts.options && opts.options.length) ? `?${opts.options.join('?')}` : '' return parse( `${algorithm}-${ Buffer.from(hexDigest, 'hex').toString('base64') }${optString}`, opts ) } module.exports.fromData = fromData function fromData (data, opts) { opts = opts || {} const algorithms = opts.algorithms || ['sha512'] const optString = opts.options && opts.options.length ? `?${opts.options.join('?')}` : '' return algorithms.reduce((acc, algo) => { const digest = crypto.createHash(algo).update(data).digest('base64') const hash = new Hash( `${algo}-${digest}${optString}`, opts ) if (hash.algorithm && hash.digest) { const algo = hash.algorithm if (!acc[algo]) { acc[algo] = [] } acc[algo].push(hash) } return acc }, new Integrity()) } module.exports.fromStream = fromStream function fromStream (stream, opts) { opts = opts || {} const P = opts.Promise || Promise const istream = integrityStream(opts) return new P((resolve, reject) => { stream.pipe(istream) stream.on('error', reject) istream.on('error', reject) let sri istream.on('integrity', s => { sri = s }) istream.on('end', () => resolve(sri)) istream.on('data', () => {}) }) } module.exports.checkData = checkData function checkData (data, sri, opts) { opts = opts || {} sri = parse(sri, opts) if (!Object.keys(sri).length) { if (opts.error) { throw Object.assign( new Error('No valid integrity hashes to check against'), { code: 'EINTEGRITY' } ) } else { return false } } const algorithm = sri.pickAlgorithm(opts) const digest = crypto.createHash(algorithm).update(data).digest('base64') const newSri = parse({algorithm, digest}) const match = newSri.match(sri, opts) if (match || !opts.error) { return match } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) err.code = 'EBADSIZE' err.found = data.length err.expected = opts.size err.sri = sri throw err } else { const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) err.code = 'EINTEGRITY' err.found = newSri err.expected = sri err.algorithm = algorithm err.sri = sri throw err } } module.exports.checkStream = checkStream function checkStream (stream, sri, opts) { opts = opts || {} const P = opts.Promise || Promise const checker = integrityStream(Object.assign({}, opts, { integrity: sri })) return new P((resolve, reject) => { stream.pipe(checker) stream.on('error', reject) checker.on('error', reject) let sri checker.on('verified', s => { sri = s }) checker.on('end', () => resolve(sri)) checker.on('data', () => {}) }) } module.exports.integrityStream = integrityStream function integrityStream (opts) { opts = opts || {} // For verification const sri = opts.integrity && parse(opts.integrity, opts) const goodSri = sri && Object.keys(sri).length const algorithm = goodSri && sri.pickAlgorithm(opts) const digests = goodSri && sri[algorithm] // Calculating stream const algorithms = Array.from( new Set( (opts.algorithms || ['sha512']) .concat(algorithm ? [algorithm] : []) ) ) const hashes = algorithms.map(crypto.createHash) let streamSize = 0 const stream = new Transform({ transform (chunk, enc, cb) { streamSize += chunk.length hashes.forEach(h => h.update(chunk, enc)) cb(null, chunk, enc) } }).on('end', () => { const optString = (opts.options && opts.options.length) ? `?${opts.options.join('?')}` : '' const newSri = parse(hashes.map((h, i) => { return `${algorithms[i]}-${h.digest('base64')}${optString}` }).join(' '), opts) // Integrity verification mode const match = goodSri && newSri.match(sri, opts) if (typeof opts.size === 'number' && streamSize !== opts.size) { const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`) err.code = 'EBADSIZE' err.found = streamSize err.expected = opts.size err.sri = sri stream.emit('error', err) } else if (opts.integrity && !match) { const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`) err.code = 'EINTEGRITY' err.found = newSri err.expected = digests err.algorithm = algorithm err.sri = sri stream.emit('error', err) } else { stream.emit('size', streamSize) stream.emit('integrity', newSri) match && stream.emit('verified', match) } }) return stream } module.exports.create = createIntegrity function createIntegrity (opts) { opts = opts || {} const algorithms = opts.algorithms || ['sha512'] const optString = opts.options && opts.options.length ? `?${opts.options.join('?')}` : '' const hashes = algorithms.map(crypto.createHash) return { update: function (chunk, enc) { hashes.forEach(h => h.update(chunk, enc)) return this }, digest: function (enc) { const integrity = algorithms.reduce((acc, algo) => { const digest = hashes.shift().digest('base64') const hash = new Hash( `${algo}-${digest}${optString}`, opts ) if (hash.algorithm && hash.digest) { const algo = hash.algorithm if (!acc[algo]) { acc[algo] = [] } acc[algo].push(hash) } return acc }, new Integrity()) return integrity } } } const NODE_HASHES = new Set(crypto.getHashes()) // This is a Best Effort™ at a reasonable priority for hash algos const DEFAULT_PRIORITY = [ 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', // TODO - it's unclear _which_ of these Node will actually use as its name // for the algorithm, so we guesswork it based on the OpenSSL names. 'sha3', 'sha3-256', 'sha3-384', 'sha3-512', 'sha3_256', 'sha3_384', 'sha3_512' ].filter(algo => NODE_HASHES.has(algo)) function getPrioritizedHash (algo1, algo2) { return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) ? algo1 : algo2 } /***/ }), /* 56 */, /* 57 */, /* 58 */, /* 59 */, /* 60 */ /***/ (function(module, exports, __nested_webpack_require_85443__) { module.exports = minimatch minimatch.Minimatch = Minimatch var path = { sep: '/' } try { path = __nested_webpack_require_85443__(0) } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __nested_webpack_require_85443__(175) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, '?': { open: '(?:', close: ')?' }, '+': { open: '(?:', close: ')+' }, '*': { open: '(?:', close: ')*' }, '@': { open: '(?:', close: ')' } } // any single thing other than / // don't need to escape / when using new RegExp() var qmark = '[^/]' // * => any number of characters var star = qmark + '*?' // ** when dots are allowed. Anything goes, except .. and . // not (^ or / followed by one or two dots followed by $ or /), // followed by anything, any number of times. var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' // not a ^ or / followed by a dot, // followed by anything, any number of times. var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' // characters that need to be escaped in RegExp. var reSpecials = charSet('().*{}+?[]^$\\!') // "abc" -> { a:true, b:true, c:true } function charSet (s) { return s.split('').reduce(function (set, c) { set[c] = true return set }, {}) } // normalizes slashes. var slashSplit = /\/+/ minimatch.filter = filter function filter (pattern, options) { options = options || {} return function (p, i, list) { return minimatch(p, pattern, options) } } function ext (a, b) { a = a || {} b = b || {} var t = {} Object.keys(b).forEach(function (k) { t[k] = b[k] }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) return t } minimatch.defaults = function (def) { if (!def || !Object.keys(def).length) return minimatch var orig = minimatch var m = function minimatch (p, pattern, options) { return orig.minimatch(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } return m } Minimatch.defaults = function (def) { if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { if (typeof pattern !== 'string') { throw new TypeError('glob pattern string required') } if (!options) options = {} // shortcut: comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { return false } // "" only matches "" if (pattern.trim() === '') return p === '' return new Minimatch(pattern, options).match(p) } function Minimatch (pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options) } if (typeof pattern !== 'string') { throw new TypeError('glob pattern string required') } if (!options) options = {} pattern = pattern.trim() // windows support: need to use /, not \ if (path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } this.options = options this.set = [] this.pattern = pattern this.regexp = null this.negate = false this.comment = false this.empty = false // make the set of regexps etc. this.make() } Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { // don't do it more than once. if (this._made) return var pattern = this.pattern var options = this.options // empty patterns and comments match nothing. if (!options.nocomment && pattern.charAt(0) === '#') { this.comment = true return } if (!pattern) { this.empty = true return } // step 1: figure out negation, etc. this.parseNegate() // step 2: expand braces var set = this.globSet = this.braceExpand() if (options.debug) this.debug = console.error this.debug(this.pattern, set) // step 3: now we have a set, so turn each one into a series of path-portion // matching patterns. // These will be regexps, except in the case of "**", which is // set to the GLOBSTAR object for globstar behavior, // and will not contain any / characters set = this.globParts = set.map(function (s) { return s.split(slashSplit) }) this.debug(this.pattern, set) // glob --> regexps set = set.map(function (s, si, set) { return s.map(this.parse, this) }, this) this.debug(this.pattern, set) // filter out everything that didn't compile properly. set = set.filter(function (s) { return s.indexOf(false) === -1 }) this.debug(this.pattern, set) this.set = set } Minimatch.prototype.parseNegate = parseNegate function parseNegate () { var pattern = this.pattern var negate = false var options = this.options var negateOffset = 0 if (options.nonegate) return for (var i = 0, l = pattern.length ; i < l && pattern.charAt(i) === '!' ; i++) { negate = !negate negateOffset++ } if (negateOffset) this.pattern = pattern.substr(negateOffset) this.negate = negate } // Brace expansion: // a{b,c}d -> abd acd // a{b,}c -> abc ac // a{0..3}d -> a0d a1d a2d a3d // a{b,c{d,e}f}g -> abg acdfg acefg // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg // // Invalid sets are not expanded. // a{2..}b -> a{2..}b // a{b}c -> a{b}c minimatch.braceExpand = function (pattern, options) { return braceExpand(pattern, options) } Minimatch.prototype.braceExpand = braceExpand function braceExpand (pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options } else { options = {} } } pattern = typeof pattern === 'undefined' ? this.pattern : pattern if (typeof pattern === 'undefined') { throw new TypeError('undefined pattern') } if (options.nobrace || !pattern.match(/\{.*\}/)) { // shortcut. no need to expand. return [pattern] } return expand(pattern) } // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full // pattern, split on '/', and then turned into a regular expression. // A regexp is made at the end which joins each array with an // escaped /, and another full one which joins each regexp with |. // // Following the lead of Bash 4.1, note that "**" only has special meaning // when it is the *only* thing in a path portion. Otherwise, any series // of * is equivalent to a single *. Globstar behavior is enabled by // default, and can be disabled by setting options.noglobstar. Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { if (pattern.length > 1024 * 64) { throw new TypeError('pattern is too long') } var options = this.options // shortcuts if (!options.noglobstar && pattern === '**') return GLOBSTAR if (pattern === '') return '' var re = '' var hasMagic = !!options.nocase var escaping = false // ? => one single character var patternListStack = [] var negativeLists = [] var stateChar var inClass = false var reClassStart = -1 var classStart = -1 // . and .. never match anything that doesn't start with ., // even when options.dot is set. var patternStart = pattern.charAt(0) === '.' ? '' // anything // not (start or / followed by . or .. followed by / or end) : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)' var self = this function clearStateChar () { if (stateChar) { // we had some state-tracking character // that wasn't consumed by this pass. switch (stateChar) { case '*': re += star hasMagic = true break case '?': re += qmark hasMagic = true break default: re += '\\' + stateChar break } self.debug('clearStateChar %j %j', stateChar, re) stateChar = false } } for (var i = 0, len = pattern.length, c ; (i < len) && (c = pattern.charAt(i)) ; i++) { this.debug('%s\t%s %s %j', pattern, i, re, c) // skip over any that are escaped. if (escaping && reSpecials[c]) { re += '\\' + c escaping = false continue } switch (c) { case '/': // completely not allowed, even escaped. // Should already be path-split by now. return false case '\\': clearStateChar() escaping = true continue // the various stateChar values // for the "extglob" stuff. case '?': case '*': case '+': case '@': case '!': this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) // all of those are literals inside a class, except that // the glob [!a] means [^a] in regexp if (inClass) { this.debug(' in class') if (c === '!' && i === classStart + 1) c = '^' re += c continue } // if we already have a stateChar, then it means // that there was something like ** or +? in there. // Handle the stateChar, then proceed with this one. self.debug('call clearStateChar %j', stateChar) clearStateChar() stateChar = c // if extglob is disabled, then +(asdf|foo) isn't a thing. // just clear the statechar *now*, rather than even diving into // the patternList stuff. if (options.noext) clearStateChar() continue case '(': if (inClass) { re += '(' continue } if (!stateChar) { re += '\\(' continue } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }) // negation is (?:(?!js)[^/]*) re += stateChar === '!' ? '(?:(?!(?:' : '(?:' this.debug('plType %j %j', stateChar, re) stateChar = false continue case ')': if (inClass || !patternListStack.length) { re += '\\)' continue } clearStateChar() hasMagic = true var pl = patternListStack.pop() // negation is (?:(?!js)[^/]*) // The others are (?:) re += pl.close if (pl.type === '!') { negativeLists.push(pl) } pl.reEnd = re.length continue case '|': if (inClass || !patternListStack.length || escaping) { re += '\\|' escaping = false continue } clearStateChar() re += '|' continue // these are mostly the same in regexp and glob case '[': // swallow any state-tracking char before the [ clearStateChar() if (inClass) { re += '\\' + c continue } inClass = true classStart = i reClassStart = re.length re += c continue case ']': // a right bracket shall lose its special // meaning and represent itself in // a bracket expression if it occurs // first in the list. -- POSIX.2 2.8.3.2 if (i === classStart + 1 || !inClass) { re += '\\' + c escaping = false continue } // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" if (inClass) { // split where the last [ was, make sure we don't have // an invalid re. if so, re-walk the contents of the // would-be class to re-translate any characters that // were passed through as-is // TODO: It would probably be faster to determine this // without a try/catch and a new RegExp, but it's tricky // to do safely. For now, this is safe and works. var cs = pattern.substring(classStart + 1, i) try { RegExp('[' + cs + ']') } catch (er) { // not a valid class! var sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' hasMagic = hasMagic || sp[1] inClass = false continue } } // finish up the class. hasMagic = true inClass = false re += c continue default: // swallow any state char that wasn't consumed clearStateChar() if (escaping) { // no need escaping = false } else if (reSpecials[c] && !(c === '^' && inClass)) { re += '\\' } re += c } // switch } // for // handle the case where we left a class open. // "[abc" is valid, equivalent to "\[abc" if (inClass) { // split where the last [ was, and escape it // this is a huge pita. We now have to re-walk // the contents of the would-be class to re-translate // any characters that were passed through as-is cs = pattern.substr(classStart + 1) sp = this.parse(cs, SUBPARSE) re = re.substr(0, reClassStart) + '\\[' + sp[0] hasMagic = hasMagic || sp[1] } // handle the case where we had a +( thing at the *end* // of the pattern. // each pattern list stack adds 3 chars, and we need to go through // and escape any | chars that were passed through as-is for the regexp. // Go through and escape them, taking care not to double-escape any // | chars that were already escaped. for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length) this.debug('setting tail', re, pl) // maybe some even number of \, then maybe 1 \, followed by a | tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { if (!$2) { // the | isn't already escaped, so escape it. $2 = '\\' } // need to escape all those slashes *again*, without escaping the // one that we need for escaping the | character. As it works out, // escaping an even number of slashes can be done by simply repeating // it exactly after itself. That's why this trick works. // // I am sorry that you have to see this. return $1 + $1 + $2 + '|' }) this.debug('tail=%j\n %s', tail, tail, pl, re) var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type hasMagic = true re = re.slice(0, pl.reStart) + t + '\\(' + tail } // handle trailing things that only matter at the very end. clearStateChar() if (escaping) { // trailing \\ re += '\\\\' } // only need to apply the nodot start if the re starts with // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { case '.': case '[': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS // A pattern like: *.!(x).!(y|z) needs to ensure that a name // like 'a.xyz.yz' doesn't match. So, the first negative // lookahead, has to look ALL the way ahead, to the end of // the pattern. for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n] var nlBefore = re.slice(0, nl.reStart) var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) var nlAfter = re.slice(nl.reEnd) nlLast += nlAfter // Handle nested stuff like *(*.js|!(*.json)), where open parens // mean that we should *not* include the ) in the bit that is considered // "after" the negated section. var openParensBefore = nlBefore.split('(').length - 1 var cleanAfter = nlAfter for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } nlAfter = cleanAfter var dollar = '' if (nlAfter === '' && isSub !== SUBPARSE) { dollar = '$' } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast re = newRe } // if the re is not "" at this point, then we need to make sure // it doesn't match against an empty path part. // Otherwise a/* will match a/, which it should not. if (re !== '' && hasMagic) { re = '(?=.)' + re } if (addPatternStart) { re = patternStart + re } // parsing just a piece of a larger pattern. if (isSub === SUBPARSE) { return [re, hasMagic] } // skip the regexp for non-magical patterns // unescape anything in it, though, so that it'll be // an exact match against a file etc. if (!hasMagic) { return globUnescape(pattern) } var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) } catch (er) { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line // mode, but it's not a /m regex. return new RegExp('$.') } regExp._glob = pattern regExp._src = re return regExp } minimatch.makeRe = function (pattern, options) { return new Minimatch(pattern, options || {}).makeRe() } Minimatch.prototype.makeRe = makeRe function makeRe () { if (this.regexp || this.regexp === false) return this.regexp // at this point, this.set is a 2d array of partial // pattern strings, or "**". // // It's better to use .match(). This function shouldn't // be used, really, but it's pretty convenient sometimes, // when you just want to work with a regex. var set = this.set if (!set.length) { this.regexp = false return this.regexp } var options = this.options var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot var flags = options.nocase ? 'i' : '' var re = set.map(function (pattern) { return pattern.map(function (p) { return (p === GLOBSTAR) ? twoStar : (typeof p === 'string') ? regExpEscape(p) : p._src }).join('\\\/') }).join('|') // must match entire pattern // ending in a * or ** will make it less strict. re = '^(?:' + re + ')$' // can match anything, as long as it's not this. if (this.negate) re = '^(?!' + re + ').*$' try { this.regexp = new RegExp(re, flags) } catch (ex) { this.regexp = false } return this.regexp } minimatch.match = function (list, pattern, options) { options = options || {} var mm = new Minimatch(pattern, options) list = list.filter(function (f) { return mm.match(f) }) if (mm.options.nonull && !list.length) { list.push(pattern) } return list } Minimatch.prototype.match = match function match (f, partial) { this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. if (this.comment) return false if (this.empty) return f === '' if (f === '/' && partial) return true var options = this.options // windows: need to use /, not \ if (path.sep !== '/') { f = f.split(path.sep).join('/') } // treat the test path as a set of pathparts. f = f.split(slashSplit) this.debug(this.pattern, 'split', f) // just ONE of the pattern sets in this.set needs to match // in order for it to be valid. If negating, then just one // match means that we have failed. // Either way, return on the first hit. var set = this.set this.debug(this.pattern, 'set', set) // Find the basename of the path by looking for the last non-empty segment var filename var i for (i = f.length - 1; i >= 0; i--) { filename = f[i] if (filename) break } for (i = 0; i < set.length; i++) { var pattern = set[i] var file = f if (options.matchBase && pattern.length === 1) { file = [filename] } var hit = this.matchOne(file, pattern, partial) if (hit) { if (options.flipNegate) return true return !this.negate } } // didn't get any hits. this is success if it's a negative // pattern, failure otherwise. if (options.flipNegate) return false return this.negate } // set partial to true to test if, for example, // "/a/b" matches the start of "/*/b/*/d" // Partial means, if you run out of file before you run // out of pattern, then that's fine, as long as all // the parts match. Minimatch.prototype.matchOne = function (file, pattern, partial) { var options = this.options this.debug('matchOne', { 'this': this, file: file, pattern: pattern }) this.debug('matchOne', file.length, pattern.length) for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length ; (fi < fl) && (pi < pl) ; fi++, pi++) { this.debug('matchOne loop') var p = pattern[pi] var f = file[fi] this.debug(pattern, p, f) // should be impossible. // some invalid regexp stuff in the set. if (p === false) return false if (p === GLOBSTAR) { this.debug('GLOBSTAR', [pattern, p, f]) // "**" // a/**/b/**/c would match the following: // a/b/x/y/z/c // a/x/y/z/b/c // a/b/x/b/x/c // a/b/c // To do this, take the rest of the pattern after // the **, and see if it would match the file remainder. // If so, return success. // If not, the ** "swallows" a segment, and try again. // This is recursively awful. // // a/**/b/**/c matching a/b/x/y/z/c // - a matches a // - doublestar // - matchOne(b/x/y/z/c, b/**/c) // - b matches b // - doublestar // - matchOne(x/y/z/c, c) -> no // - matchOne(y/z/c, c) -> no // - matchOne(z/c, c) -> no // - matchOne(c, c) yes, hit var fr = fi var pr = pi + 1 if (pr === pl) { this.debug('** at the end') // a ** at the end will just swallow the rest. // We have found a match. // however, it will not swallow /.x, unless // options.dot is set. // . and .. are *never* matched by **, for explosively // exponential reasons. for (; fi < fl; fi++) { if (file[fi] === '.' || file[fi] === '..' || (!options.dot && file[fi].charAt(0) === '.')) return false } return true } // ok, let's see if we can swallow whatever we can. while (fr < fl) { var swallowee = file[fr] this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) // XXX remove this slice. Just pass the start index. if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug('globstar found match!', fr, fl, swallowee) // found a match. return true } else { // can't swallow "." or ".." ever. // can only swallow ".foo" when explicitly asked. if (swallowee === '.' || swallowee === '..' || (!options.dot && swallowee.charAt(0) === '.')) { this.debug('dot detected!', file, fr, pattern, pr) break } // ** swallows a segment, and continue. this.debug('globstar swallow a segment, and continue') fr++ } } // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) if (fr === fl) return true } return false } // something other than ** // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { if (options.nocase) { hit = f.toLowerCase() === p.toLowerCase() } else { hit = f === p } this.debug('string match', p, f, hit) } else { hit = f.match(p) this.debug('pattern match', p, f, hit) } if (!hit) return false } // Note: ending in / means that we'll get a final "" // at the end of the pattern. This can only match a // corresponding "" at the end of the file. // If the file ends in /, then it can only match a // a pattern that ends in /, unless the pattern just // doesn't have any more for it. But, a/b/ should *not* // match "a/b/*", even though "" matches against the // [^/]*? pattern, except in partial mode, where it might // simply not be reached yet. // However, a/b/ should still satisfy a/* // now either we fell off the end of the pattern, or we're done. if (fi === fl && pi === pl) { // ran out of pattern and filename at the same time. // an exact hit! return true } else if (fi === fl) { // ran out of file, but still had pattern left. // this is ok if we're doing the match as part of // a glob fs traversal. return partial } else if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') return emptyFileEnd } // should be unreachable. throw new Error('wtf?') } // replace stuff like \* with * function globUnescape (s) { return s.replace(/\\(.)/g, '$1') } function regExpEscape (s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } /***/ }), /* 61 */ /***/ (function(module, exports, __nested_webpack_require_110873__) { var wrappy = __nested_webpack_require_110873__(123) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) once.proto = once(function () { Object.defineProperty(Function.prototype, 'once', { value: function () { return once(this) }, configurable: true }) Object.defineProperty(Function.prototype, 'onceStrict', { value: function () { return onceStrict(this) }, configurable: true }) }) function once (fn) { var f = function () { if (f.called) return f.value f.called = true return f.value = fn.apply(this, arguments) } f.called = false return f } function onceStrict (fn) { var f = function () { if (f.called) throw new Error(f.onceError) f.called = true return f.value = fn.apply(this, arguments) } var name = fn.name || 'Function wrapped with `once`' f.onceError = name + " shouldn't be called more than once" f.called = false return f } /***/ }), /* 62 */, /* 63 */ /***/ (function(module, exports) { module.exports = __webpack_require__(64293); /***/ }), /* 64 */, /* 65 */, /* 66 */, /* 67 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 68 */ /***/ (function(module, exports, __nested_webpack_require_112244__) { var isObject = __nested_webpack_require_112244__(34); var document = __nested_webpack_require_112244__(11).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; /***/ }), /* 69 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 70 */ /***/ (function(module, exports, __nested_webpack_require_112694__) { "use strict"; // 25.4.1.5 NewPromiseCapability(C) var aFunction = __nested_webpack_require_112694__(46); function PromiseCapability(C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); } module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /* 71 */ /***/ (function(module, exports, __nested_webpack_require_113276__) { var def = __nested_webpack_require_113276__(50).f; var has = __nested_webpack_require_113276__(49); var TAG = __nested_webpack_require_113276__(13)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 72 */ /***/ (function(module, exports, __nested_webpack_require_113628__) { var shared = __nested_webpack_require_113628__(107)('keys'); var uid = __nested_webpack_require_113628__(111); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 73 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 74 */ /***/ (function(module, exports, __nested_webpack_require_114094__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __nested_webpack_require_114094__(131); var defined = __nested_webpack_require_114094__(67); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 75 */ /***/ (function(module, exports, __nested_webpack_require_114394__) { // Approach: // // 1. Get the minimatch set // 2. For each pattern in the set, PROCESS(pattern, false) // 3. Store matches per-set, then uniq them // // PROCESS(pattern, inGlobStar) // Get the first [n] items from pattern that are all strings // Join these together. This is PREFIX. // If there is no more remaining, then stat(PREFIX) and // add to matches if it succeeds. END. // // If inGlobStar and PREFIX is symlink and points to dir // set ENTRIES = [] // else readdir(PREFIX) as ENTRIES // If fail, END // // with ENTRIES // If pattern[n] is GLOBSTAR // // handle the case where the globstar match is empty // // by pruning it out, and testing the resulting pattern // PROCESS(pattern[0..n] + pattern[n+1 .. $], false) // // handle other cases. // for ENTRY in ENTRIES (not dotfiles) // // attach globstar + tail onto the entry // // Mark that this entry is a globstar match // PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) // // else // not globstar // for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) // Test ENTRY against pattern[n] // If fails, continue // If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) // // Caveat: // Cache all stats and readdirs results to minimize syscall. Since all // we ever care about is existence and directory-ness, we can just keep // `true` for files, and [children,...] for directories, or `false` for // things that don't exist. module.exports = glob var fs = __nested_webpack_require_114394__(3) var rp = __nested_webpack_require_114394__(114) var minimatch = __nested_webpack_require_114394__(60) var Minimatch = minimatch.Minimatch var inherits = __nested_webpack_require_114394__(42) var EE = __nested_webpack_require_114394__(54).EventEmitter var path = __nested_webpack_require_114394__(0) var assert = __nested_webpack_require_114394__(22) var isAbsolute = __nested_webpack_require_114394__(76) var globSync = __nested_webpack_require_114394__(218) var common = __nested_webpack_require_114394__(115) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var inflight = __nested_webpack_require_114394__(223) var util = __nested_webpack_require_114394__(2) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored var once = __nested_webpack_require_114394__(61) function glob (pattern, options, cb) { if (typeof options === 'function') cb = options, options = {} if (!options) options = {} if (options.sync) { if (cb) throw new TypeError('callback provided to sync glob') return globSync(pattern, options) } return new Glob(pattern, options, cb) } glob.sync = globSync var GlobSync = glob.GlobSync = globSync.GlobSync // old api surface glob.glob = glob function extend (origin, add) { if (add === null || typeof add !== 'object') { return origin } var keys = Object.keys(add) var i = keys.length while (i--) { origin[keys[i]] = add[keys[i]] } return origin } glob.hasMagic = function (pattern, options_) { var options = extend({}, options_) options.noprocess = true var g = new Glob(pattern, options) var set = g.minimatch.set if (!pattern) return false if (set.length > 1) return true for (var j = 0; j < set[0].length; j++) { if (typeof set[0][j] !== 'string') return true } return false } glob.Glob = Glob inherits(Glob, EE) function Glob (pattern, options, cb) { if (typeof options === 'function') { cb = options options = null } if (options && options.sync) { if (cb) throw new TypeError('callback provided to sync glob') return new GlobSync(pattern, options) } if (!(this instanceof Glob)) return new Glob(pattern, options, cb) setopts(this, pattern, options) this._didRealPath = false // process each pattern in the minimatch set var n = this.minimatch.set.length // The matches are stored as {: true,...} so that // duplicates are automagically pruned. // Later, we do an Object.keys() on these. // Keep them as a list so we can fill in when nonull is set. this.matches = new Array(n) if (typeof cb === 'function') { cb = once(cb) this.on('error', cb) this.on('end', function (matches) { cb(null, matches) }) } var self = this this._processing = 0 this._emitQueue = [] this._processQueue = [] this.paused = false if (this.noprocess) return this if (n === 0) return done() var sync = true for (var i = 0; i < n; i ++) { this._process(this.minimatch.set[i], i, false, done) } sync = false function done () { --self._processing if (self._processing <= 0) { if (sync) { process.nextTick(function () { self._finish() }) } else { self._finish() } } } } Glob.prototype._finish = function () { assert(this instanceof Glob) if (this.aborted) return if (this.realpath && !this._didRealpath) return this._realpath() common.finish(this) this.emit('end', this.found) } Glob.prototype._realpath = function () { if (this._didRealpath) return this._didRealpath = true var n = this.matches.length if (n === 0) return this._finish() var self = this for (var i = 0; i < this.matches.length; i++) this._realpathSet(i, next) function next () { if (--n === 0) self._finish() } } Glob.prototype._realpathSet = function (index, cb) { var matchset = this.matches[index] if (!matchset) return cb() var found = Object.keys(matchset) var self = this var n = found.length if (n === 0) return cb() var set = this.matches[index] = Object.create(null) found.forEach(function (p, i) { // If there's a problem with the stat, then it means that // one or more of the links in the realpath couldn't be // resolved. just return the abs value in that case. p = self._makeAbs(p) rp.realpath(p, self.realpathCache, function (er, real) { if (!er) set[real] = true else if (er.syscall === 'stat') set[p] = true else self.emit('error', er) // srsly wtf right here if (--n === 0) { self.matches[index] = set cb() } }) }) } Glob.prototype._mark = function (p) { return common.mark(this, p) } Glob.prototype._makeAbs = function (f) { return common.makeAbs(this, f) } Glob.prototype.abort = function () { this.aborted = true this.emit('abort') } Glob.prototype.pause = function () { if (!this.paused) { this.paused = true this.emit('pause') } } Glob.prototype.resume = function () { if (this.paused) { this.emit('resume') this.paused = false if (this._emitQueue.length) { var eq = this._emitQueue.slice(0) this._emitQueue.length = 0 for (var i = 0; i < eq.length; i ++) { var e = eq[i] this._emitMatch(e[0], e[1]) } } if (this._processQueue.length) { var pq = this._processQueue.slice(0) this._processQueue.length = 0 for (var i = 0; i < pq.length; i ++) { var p = pq[i] this._processing-- this._process(p[0], p[1], p[2], p[3]) } } } } Glob.prototype._process = function (pattern, index, inGlobStar, cb) { assert(this instanceof Glob) assert(typeof cb === 'function') if (this.aborted) return this._processing++ if (this.paused) { this._processQueue.push([pattern, index, inGlobStar, cb]) return } //console.error('PROCESS %d', this._processing, pattern) // Get the first [n] parts of pattern that are all strings. var n = 0 while (typeof pattern[n] === 'string') { n ++ } // now n is the index of the first one that is *not* a string. // see if there's anything else var prefix switch (n) { // if not, then this is rather simple case pattern.length: this._processSimple(pattern.join('/'), index, cb) return case 0: // pattern *starts* with some non-trivial item. // going to readdir(cwd), but not include the prefix in matches. prefix = null break default: // pattern has some string bits in the front. // whatever it starts with, whether that's 'absolute' like /foo/bar, // or 'relative' like '../baz' prefix = pattern.slice(0, n).join('/') break } var remain = pattern.slice(n) // get the list of entries. var read if (prefix === null) read = '.' else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { if (!prefix || !isAbsolute(prefix)) prefix = '/' + prefix read = prefix } else read = prefix var abs = this._makeAbs(read) //if ignored, skip _processing if (childrenIgnored(this, read)) return cb() var isGlobStar = remain[0] === minimatch.GLOBSTAR if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) else this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) } Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { var self = this this._readdir(abs, inGlobStar, function (er, entries) { return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) }) } Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { // if the abs isn't a dir, then nothing can match! if (!entries) return cb() // It will only match dot entries if it starts with a dot, or if // dot is set. Stuff like @(.foo|.bar) isn't allowed. var pn = remain[0] var negate = !!this.minimatch.negate var rawGlob = pn._glob var dotOk = this.dot || rawGlob.charAt(0) === '.' var matchedEntries = [] for (var i = 0; i < entries.length; i++) { var e = entries[i] if (e.charAt(0) !== '.' || dotOk) { var m if (negate && !prefix) { m = !e.match(pn) } else { m = e.match(pn) } if (m) matchedEntries.push(e) } } //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) var len = matchedEntries.length // If there are no matched entries, then nothing matches. if (len === 0) return cb() // if this is the last remaining pattern bit, then no need for // an additional stat *unless* the user has specified mark or // stat explicitly. We know they exist, since readdir returned // them. if (remain.length === 1 && !this.mark && !this.stat) { if (!this.matches[index]) this.matches[index] = Object.create(null) for (var i = 0; i < len; i ++) { var e = matchedEntries[i] if (prefix) { if (prefix !== '/') e = prefix + '/' + e else e = prefix + e } if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } this._emitMatch(index, e) } // This was the last one, and no stats were needed return cb() } // now test all matched entries as stand-ins for that part // of the pattern. remain.shift() for (var i = 0; i < len; i ++) { var e = matchedEntries[i] var newPattern if (prefix) { if (prefix !== '/') e = prefix + '/' + e else e = prefix + e } this._process([e].concat(remain), index, inGlobStar, cb) } cb() } Glob.prototype._emitMatch = function (index, e) { if (this.aborted) return if (isIgnored(this, e)) return if (this.paused) { this._emitQueue.push([index, e]) return } var abs = isAbsolute(e) ? e : this._makeAbs(e) if (this.mark) e = this._mark(e) if (this.absolute) e = abs if (this.matches[index][e]) return if (this.nodir) { var c = this.cache[abs] if (c === 'DIR' || Array.isArray(c)) return } this.matches[index][e] = true var st = this.statCache[abs] if (st) this.emit('stat', e, st) this.emit('match', e) } Glob.prototype._readdirInGlobStar = function (abs, cb) { if (this.aborted) return // follow all symlinked directories forever // just proceed as if this is a non-globstar situation if (this.follow) return this._readdir(abs, false, cb) var lstatkey = 'lstat\0' + abs var self = this var lstatcb = inflight(lstatkey, lstatcb_) if (lstatcb) fs.lstat(abs, lstatcb) function lstatcb_ (er, lstat) { if (er && er.code === 'ENOENT') return cb() var isSym = lstat && lstat.isSymbolicLink() self.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. if (!isSym && lstat && !lstat.isDirectory()) { self.cache[abs] = 'FILE' cb() } else self._readdir(abs, false, cb) } } Glob.prototype._readdir = function (abs, inGlobStar, cb) { if (this.aborted) return cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) if (!cb) return //console.error('RD %j %j', +inGlobStar, abs) if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb) if (ownProp(this.cache, abs)) { var c = this.cache[abs] if (!c || c === 'FILE') return cb() if (Array.isArray(c)) return cb(null, c) } var self = this fs.readdir(abs, readdirCb(this, abs, cb)) } function readdirCb (self, abs, cb) { return function (er, entries) { if (er) self._readdirError(abs, er, cb) else self._readdirEntries(abs, entries, cb) } } Glob.prototype._readdirEntries = function (abs, entries, cb) { if (this.aborted) return // if we haven't asked to stat everything, then just // assume that everything in there exists, so we can avoid // having to stat it a second time. if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] if (abs === '/') e = abs + e else e = abs + '/' + e this.cache[e] = true } } this.cache[abs] = entries return cb(null, entries) } Glob.prototype._readdirError = function (f, er, cb) { if (this.aborted) return // handle errors, and cache the information switch (er.code) { case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. var abs = this._makeAbs(f) this.cache[abs] = 'FILE' if (abs === this.cwdAbs) { var error = new Error(er.code + ' invalid cwd ' + this.cwd) error.path = this.cwd error.code = er.code this.emit('error', error) this.abort() } break case 'ENOENT': // not terribly unusual case 'ELOOP': case 'ENAMETOOLONG': case 'UNKNOWN': this.cache[this._makeAbs(f)] = false break default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false if (this.strict) { this.emit('error', er) // If the error is handled, then we abort // if not, we threw out of here this.abort() } if (!this.silent) console.error('glob error', er) break } return cb() } Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { var self = this this._readdir(abs, inGlobStar, function (er, entries) { self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) }) } Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { //console.error('pgs2', prefix, remain[0], entries) // no entries means not a dir, so it can never have matches // foo.txt/** doesn't match foo.txt if (!entries) return cb() // test without the globstar, and with every child both below // and replacing the globstar. var remainWithoutGlobStar = remain.slice(1) var gspref = prefix ? [ prefix ] : [] var noGlobStar = gspref.concat(remainWithoutGlobStar) // the noGlobStar pattern exits the inGlobStar state this._process(noGlobStar, index, false, cb) var isSym = this.symlinks[abs] var len = entries.length // If it's a symlink, and we're in a globstar, then stop if (isSym && inGlobStar) return cb() for (var i = 0; i < len; i++) { var e = entries[i] if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state var instead = gspref.concat(entries[i], remainWithoutGlobStar) this._process(instead, index, true, cb) var below = gspref.concat(entries[i], remain) this._process(below, index, true, cb) } cb() } Glob.prototype._processSimple = function (prefix, index, cb) { // XXX review this. Shouldn't it be doing the mounting etc // before doing stat? kinda weird? var self = this this._stat(prefix, function (er, exists) { self._processSimple2(prefix, index, er, exists, cb) }) } Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { //console.error('ps2', prefix, exists) if (!this.matches[index]) this.matches[index] = Object.create(null) // If it doesn't exist, then just mark the lack of results if (!exists) return cb() if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) if (trail) prefix += '/' } } if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/') // Mark this as a match this._emitMatch(index, prefix) cb() } // Returns either 'DIR', 'FILE', or false Glob.prototype._stat = function (f, cb) { var abs = this._makeAbs(f) var needDir = f.slice(-1) === '/' if (f.length > this.maxLength) return cb() if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs] if (Array.isArray(c)) c = 'DIR' // It exists, but maybe not how we need it if (!needDir || c === 'DIR') return cb(null, c) if (needDir && c === 'FILE') return cb() // otherwise we have to stat, because maybe c=true // if we know it exists, but not what it is. } var exists var stat = this.statCache[abs] if (stat !== undefined) { if (stat === false) return cb(null, stat) else { var type = stat.isDirectory() ? 'DIR' : 'FILE' if (needDir && type === 'FILE') return cb() else return cb(null, type, stat) } } var self = this var statcb = inflight('stat\0' + abs, lstatcb_) if (statcb) fs.lstat(abs, statcb) function lstatcb_ (er, lstat) { if (lstat && lstat.isSymbolicLink()) { // If it's a symlink, then treat it as the target, unless // the target does not exist, then treat it as a file. return fs.stat(abs, function (er, stat) { if (er) self._stat2(f, abs, null, lstat, cb) else self._stat2(f, abs, er, stat, cb) }) } else { self._stat2(f, abs, er, lstat, cb) } } } Glob.prototype._stat2 = function (f, abs, er, stat, cb) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false return cb() } var needDir = f.slice(-1) === '/' this.statCache[abs] = stat if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) return cb(null, false, stat) var c = true if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE' this.cache[abs] = this.cache[abs] || c if (needDir && c === 'FILE') return cb() return cb(null, c, stat) } /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function posix(path) { return path.charAt(0) === '/'; } function win32(path) { // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; var result = splitDeviceRe.exec(path); var device = result[1] || ''; var isUnc = Boolean(device && device.charAt(1) !== ':'); // UNC paths are always absolute return Boolean(result[2] || isUnc); } module.exports = process.platform === 'win32' ? win32 : posix; module.exports.posix = posix; module.exports.win32 = win32; /***/ }), /* 77 */, /* 78 */, /* 79 */ /***/ (function(module, exports) { module.exports = __webpack_require__(33867); /***/ }), /* 80 */, /* 81 */ /***/ (function(module, exports, __nested_webpack_require_134773__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (str, fileLoc = 'lockfile') { str = (0, (_stripBom || _load_stripBom()).default)(str); return hasMergeConflicts(str) ? parseWithConflict(str, fileLoc) : { type: 'success', object: parse(str, fileLoc) }; }; var _util; function _load_util() { return _util = _interopRequireDefault(__nested_webpack_require_134773__(2)); } var _invariant; function _load_invariant() { return _invariant = _interopRequireDefault(__nested_webpack_require_134773__(7)); } var _stripBom; function _load_stripBom() { return _stripBom = _interopRequireDefault(__nested_webpack_require_134773__(122)); } var _constants; function _load_constants() { return _constants = __nested_webpack_require_134773__(6); } var _errors; function _load_errors() { return _errors = __nested_webpack_require_134773__(4); } var _map; function _load_map() { return _map = _interopRequireDefault(__nested_webpack_require_134773__(20)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* eslint quotes: 0 */ const VERSION_REGEX = /^yarn lockfile v(\d+)$/; const TOKEN_TYPES = { boolean: 'BOOLEAN', string: 'STRING', identifier: 'IDENTIFIER', eof: 'EOF', colon: 'COLON', newline: 'NEWLINE', comment: 'COMMENT', indent: 'INDENT', invalid: 'INVALID', number: 'NUMBER', comma: 'COMMA' }; const VALID_PROP_VALUE_TOKENS = [TOKEN_TYPES.boolean, TOKEN_TYPES.string, TOKEN_TYPES.number]; function isValidPropValueToken(token) { return VALID_PROP_VALUE_TOKENS.indexOf(token.type) >= 0; } function* tokenise(input) { let lastNewline = false; let line = 1; let col = 0; function buildToken(type, value) { return { line, col, type, value }; } while (input.length) { let chop = 0; if (input[0] === '\n' || input[0] === '\r') { chop++; // If this is a \r\n line, ignore both chars but only add one new line if (input[1] === '\n') { chop++; } line++; col = 0; yield buildToken(TOKEN_TYPES.newline); } else if (input[0] === '#') { chop++; let val = ''; while (input[chop] !== '\n') { val += input[chop]; chop++; } yield buildToken(TOKEN_TYPES.comment, val); } else if (input[0] === ' ') { if (lastNewline) { let indent = ''; for (let i = 0; input[i] === ' '; i++) { indent += input[i]; } if (indent.length % 2) { throw new TypeError('Invalid number of spaces'); } else { chop = indent.length; yield buildToken(TOKEN_TYPES.indent, indent.length / 2); } } else { chop++; } } else if (input[0] === '"') { let val = ''; for (let i = 0;; i++) { const currentChar = input[i]; val += currentChar; if (i > 0 && currentChar === '"') { const isEscaped = input[i - 1] === '\\' && input[i - 2] !== '\\'; if (!isEscaped) { break; } } } chop = val.length; try { yield buildToken(TOKEN_TYPES.string, JSON.parse(val)); } catch (err) { if (err instanceof SyntaxError) { yield buildToken(TOKEN_TYPES.invalid); } else { throw err; } } } else if (/^[0-9]/.test(input)) { let val = ''; for (let i = 0; /^[0-9]$/.test(input[i]); i++) { val += input[i]; } chop = val.length; yield buildToken(TOKEN_TYPES.number, +val); } else if (/^true/.test(input)) { yield buildToken(TOKEN_TYPES.boolean, true); chop = 4; } else if (/^false/.test(input)) { yield buildToken(TOKEN_TYPES.boolean, false); chop = 5; } else if (input[0] === ':') { yield buildToken(TOKEN_TYPES.colon); chop++; } else if (input[0] === ',') { yield buildToken(TOKEN_TYPES.comma); chop++; } else if (/^[a-zA-Z\/-]/g.test(input)) { let name = ''; for (let i = 0; i < input.length; i++) { const char = input[i]; if (char === ':' || char === ' ' || char === '\n' || char === '\r' || char === ',') { break; } else { name += char; } } chop = name.length; yield buildToken(TOKEN_TYPES.string, name); } else { yield buildToken(TOKEN_TYPES.invalid); } if (!chop) { // will trigger infinite recursion yield buildToken(TOKEN_TYPES.invalid); } col += chop; lastNewline = input[0] === '\n' || input[0] === '\r' && input[1] === '\n'; input = input.slice(chop); } yield buildToken(TOKEN_TYPES.eof); } class Parser { constructor(input, fileLoc = 'lockfile') { this.comments = []; this.tokens = tokenise(input); this.fileLoc = fileLoc; } onComment(token) { const value = token.value; (0, (_invariant || _load_invariant()).default)(typeof value === 'string', 'expected token value to be a string'); const comment = value.trim(); const versionMatch = comment.match(VERSION_REGEX); if (versionMatch) { const version = +versionMatch[1]; if (version > (_constants || _load_constants()).LOCKFILE_VERSION) { throw new (_errors || _load_errors()).MessageError(`Can't install from a lockfile of version ${version} as you're on an old yarn version that only supports ` + `versions up to ${(_constants || _load_constants()).LOCKFILE_VERSION}. Run \`$ yarn self-update\` to upgrade to the latest version.`); } } this.comments.push(comment); } next() { const item = this.tokens.next(); (0, (_invariant || _load_invariant()).default)(item, 'expected a token'); const done = item.done, value = item.value; if (done || !value) { throw new Error('No more tokens'); } else if (value.type === TOKEN_TYPES.comment) { this.onComment(value); return this.next(); } else { return this.token = value; } } unexpected(msg = 'Unexpected token') { throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`); } expect(tokType) { if (this.token.type === tokType) { this.next(); } else { this.unexpected(); } } eat(tokType) { if (this.token.type === tokType) { this.next(); return true; } else { return false; } } parse(indent = 0) { const obj = (0, (_map || _load_map()).default)(); while (true) { const propToken = this.token; if (propToken.type === TOKEN_TYPES.newline) { const nextToken = this.next(); if (!indent) { // if we have 0 indentation then the next token doesn't matter continue; } if (nextToken.type !== TOKEN_TYPES.indent) { // if we have no indentation after a newline then we've gone down a level break; } if (nextToken.value === indent) { // all is good, the indent is on our level this.next(); } else { // the indentation is less than our level break; } } else if (propToken.type === TOKEN_TYPES.indent) { if (propToken.value === indent) { this.next(); } else { break; } } else if (propToken.type === TOKEN_TYPES.eof) { break; } else if (propToken.type === TOKEN_TYPES.string) { // property key const key = propToken.value; (0, (_invariant || _load_invariant()).default)(key, 'Expected a key'); const keys = [key]; this.next(); // support multiple keys while (this.token.type === TOKEN_TYPES.comma) { this.next(); // skip comma const keyToken = this.token; if (keyToken.type !== TOKEN_TYPES.string) { this.unexpected('Expected string'); } const key = keyToken.value; (0, (_invariant || _load_invariant()).default)(key, 'Expected a key'); keys.push(key); this.next(); } const valToken = this.token; if (valToken.type === TOKEN_TYPES.colon) { // object this.next(); // parse object const val = this.parse(indent + 1); for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } const key = _ref; obj[key] = val; } if (indent && this.token.type !== TOKEN_TYPES.indent) { break; } } else if (isValidPropValueToken(valToken)) { // plain value for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { var _ref2; if (_isArray2) { if (_i2 >= _iterator2.length) break; _ref2 = _iterator2[_i2++]; } else { _i2 = _iterator2.next(); if (_i2.done) break; _ref2 = _i2.value; } const key = _ref2; obj[key] = valToken.value; } this.next(); } else { this.unexpected('Invalid value type'); } } else { this.unexpected(`Unknown token: ${(_util || _load_util()).default.inspect(propToken)}`); } } return obj; } } const MERGE_CONFLICT_ANCESTOR = '|||||||'; const MERGE_CONFLICT_END = '>>>>>>>'; const MERGE_CONFLICT_SEP = '======='; const MERGE_CONFLICT_START = '<<<<<<<'; /** * Extract the two versions of the lockfile from a merge conflict. */ function extractConflictVariants(str) { const variants = [[], []]; const lines = str.split(/\r?\n/g); let skip = false; while (lines.length) { const line = lines.shift(); if (line.startsWith(MERGE_CONFLICT_START)) { // get the first variant while (lines.length) { const conflictLine = lines.shift(); if (conflictLine === MERGE_CONFLICT_SEP) { skip = false; break; } else if (skip || conflictLine.startsWith(MERGE_CONFLICT_ANCESTOR)) { skip = true; continue; } else { variants[0].push(conflictLine); } } // get the second variant while (lines.length) { const conflictLine = lines.shift(); if (conflictLine.startsWith(MERGE_CONFLICT_END)) { break; } else { variants[1].push(conflictLine); } } } else { variants[0].push(line); variants[1].push(line); } } return [variants[0].join('\n'), variants[1].join('\n')]; } /** * Check if a lockfile has merge conflicts. */ function hasMergeConflicts(str) { return str.includes(MERGE_CONFLICT_START) && str.includes(MERGE_CONFLICT_SEP) && str.includes(MERGE_CONFLICT_END); } /** * Parse the lockfile. */ function parse(str, fileLoc) { const parser = new Parser(str, fileLoc); parser.next(); return parser.parse(); } /** * Parse and merge the two variants in a conflicted lockfile. */ function parseWithConflict(str, fileLoc) { const variants = extractConflictVariants(str); try { return { type: 'merge', object: Object.assign({}, parse(variants[0], fileLoc), parse(variants[1], fileLoc)) }; } catch (err) { if (err instanceof SyntaxError) { return { type: 'conflict', object: {} }; } else { throw err; } } } /***/ }), /* 82 */, /* 83 */, /* 84 */ /***/ (function(module, exports, __nested_webpack_require_146655__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _map; function _load_map() { return _map = _interopRequireDefault(__nested_webpack_require_146655__(20)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const debug = __nested_webpack_require_146655__(212)('yarn'); class BlockingQueue { constructor(alias, maxConcurrency = Infinity) { this.concurrencyQueue = []; this.maxConcurrency = maxConcurrency; this.runningCount = 0; this.warnedStuck = false; this.alias = alias; this.first = true; this.running = (0, (_map || _load_map()).default)(); this.queue = (0, (_map || _load_map()).default)(); this.stuckTick = this.stuckTick.bind(this); } stillActive() { if (this.stuckTimer) { clearTimeout(this.stuckTimer); } this.stuckTimer = setTimeout(this.stuckTick, 5000); // We need to check the existence of unref because of https://github.com/facebook/jest/issues/4559 // $FlowFixMe: Node's setInterval returns a Timeout, not a Number this.stuckTimer.unref && this.stuckTimer.unref(); } stuckTick() { if (this.runningCount === 1) { this.warnedStuck = true; debug(`The ${JSON.stringify(this.alias)} blocking queue may be stuck. 5 seconds ` + `without any activity with 1 worker: ${Object.keys(this.running)[0]}`); } } push(key, factory) { if (this.first) { this.first = false; } else { this.stillActive(); } return new Promise((resolve, reject) => { // we're already running so push ourselves to the queue const queue = this.queue[key] = this.queue[key] || []; queue.push({ factory, resolve, reject }); if (!this.running[key]) { this.shift(key); } }); } shift(key) { if (this.running[key]) { delete this.running[key]; this.runningCount--; if (this.stuckTimer) { clearTimeout(this.stuckTimer); this.stuckTimer = null; } if (this.warnedStuck) { this.warnedStuck = false; debug(`${JSON.stringify(this.alias)} blocking queue finally resolved. Nothing to worry about.`); } } const queue = this.queue[key]; if (!queue) { return; } var _queue$shift = queue.shift(); const resolve = _queue$shift.resolve, reject = _queue$shift.reject, factory = _queue$shift.factory; if (!queue.length) { delete this.queue[key]; } const next = () => { this.shift(key); this.shiftConcurrencyQueue(); }; const run = () => { this.running[key] = true; this.runningCount++; factory().then(function (val) { resolve(val); next(); return null; }).catch(function (err) { reject(err); next(); }); }; this.maybePushConcurrencyQueue(run); } maybePushConcurrencyQueue(run) { if (this.runningCount < this.maxConcurrency) { run(); } else { this.concurrencyQueue.push(run); } } shiftConcurrencyQueue() { if (this.runningCount < this.maxConcurrency) { const fn = this.concurrencyQueue.shift(); if (fn) { fn(); } } } } exports.default = BlockingQueue; /***/ }), /* 85 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 86 */, /* 87 */, /* 88 */, /* 89 */, /* 90 */, /* 91 */, /* 92 */, /* 93 */, /* 94 */, /* 95 */, /* 96 */, /* 97 */, /* 98 */, /* 99 */, /* 100 */ /***/ (function(module, exports, __nested_webpack_require_150302__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __nested_webpack_require_150302__(47); var TAG = __nested_webpack_require_150302__(13)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 101 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 102 */ /***/ (function(module, exports, __nested_webpack_require_151329__) { var document = __nested_webpack_require_151329__(11).document; module.exports = document && document.documentElement; /***/ }), /* 103 */ /***/ (function(module, exports, __nested_webpack_require_151512__) { "use strict"; var LIBRARY = __nested_webpack_require_151512__(69); var $export = __nested_webpack_require_151512__(41); var redefine = __nested_webpack_require_151512__(197); var hide = __nested_webpack_require_151512__(31); var Iterators = __nested_webpack_require_151512__(35); var $iterCreate = __nested_webpack_require_151512__(188); var setToStringTag = __nested_webpack_require_151512__(71); var getPrototypeOf = __nested_webpack_require_151512__(194); var ITERATOR = __nested_webpack_require_151512__(13)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 104 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return { e: false, v: exec() }; } catch (e) { return { e: true, v: e }; } }; /***/ }), /* 105 */ /***/ (function(module, exports, __nested_webpack_require_154570__) { var anObject = __nested_webpack_require_154570__(27); var isObject = __nested_webpack_require_154570__(34); var newPromiseCapability = __nested_webpack_require_154570__(70); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; /***/ }), /* 106 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 107 */ /***/ (function(module, exports, __nested_webpack_require_155264__) { var core = __nested_webpack_require_155264__(23); var global = __nested_webpack_require_155264__(11); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __nested_webpack_require_155264__(69) ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 108 */ /***/ (function(module, exports, __nested_webpack_require_155780__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __nested_webpack_require_155780__(27); var aFunction = __nested_webpack_require_155780__(46); var SPECIES = __nested_webpack_require_155780__(13)('species'); module.exports = function (O, D) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }), /* 109 */ /***/ (function(module, exports, __nested_webpack_require_156212__) { var ctx = __nested_webpack_require_156212__(48); var invoke = __nested_webpack_require_156212__(185); var html = __nested_webpack_require_156212__(102); var cel = __nested_webpack_require_156212__(68); var global = __nested_webpack_require_156212__(11); var process = global.process; var setTask = global.setImmediate; var clearTask = global.clearImmediate; var MessageChannel = global.MessageChannel; var Dispatch = global.Dispatch; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var defer, channel, port; var run = function () { var id = +this; // eslint-disable-next-line no-prototype-builtins if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function (event) { run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!setTask || !clearTask) { setTask = function setImmediate(fn) { var args = []; var i = 1; while (arguments.length > i) args.push(arguments[i++]); queue[++counter] = function () { // eslint-disable-next-line no-new-func invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (__nested_webpack_require_156212__(47)(process) == 'process') { defer = function (id) { process.nextTick(ctx(run, id, 1)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if (MessageChannel) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { defer = function (id) { global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in cel('script')) { defer = function (id) { html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }), /* 110 */ /***/ (function(module, exports, __nested_webpack_require_158799__) { // 7.1.15 ToLength var toInteger = __nested_webpack_require_158799__(73); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 111 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 112 */ /***/ (function(module, exports, __nested_webpack_require_159312__) { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; exports.humanize = __nested_webpack_require_159312__(229); /** * Active `debug` instances. */ exports.instances = []; /** * The currently active debug mode names, and names to skip. */ exports.names = []; exports.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". */ exports.formatters = {}; /** * Select a color. * @param {String} namespace * @return {Number} * @api private */ function selectColor(namespace) { var hash = 0, i; for (i in namespace) { hash = ((hash << 5) - hash) + namespace.charCodeAt(i); hash |= 0; // Convert to 32bit integer } return exports.colors[Math.abs(hash) % exports.colors.length]; } /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function createDebug(namespace) { var prevTime; function debug() { // disabled? if (!debug.enabled) return; var self = debug; // set `diff` timestamp var curr = +new Date(); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; // turn the `arguments` into a proper Array var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } args[0] = exports.coerce(args[0]); if ('string' !== typeof args[0]) { // anything else let's inspect with %O args.unshift('%O'); } // apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { // if we encounter an escaped % then don't increase the array index if (match === '%%') return match; index++; var formatter = exports.formatters[format]; if ('function' === typeof formatter) { var val = args[index]; match = formatter.call(self, val); // now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // apply env-specific formatting (colors, etc.) exports.formatArgs.call(self, args); var logFn = debug.log || exports.log || console.log.bind(console); logFn.apply(self, args); } debug.namespace = namespace; debug.enabled = exports.enabled(namespace); debug.useColors = exports.useColors(); debug.color = selectColor(namespace); debug.destroy = destroy; // env-specific initialization logic for debug instances if ('function' === typeof exports.init) { exports.init(debug); } exports.instances.push(debug); return debug; } function destroy () { var index = exports.instances.indexOf(this); if (index !== -1) { exports.instances.splice(index, 1); return true; } else { return false; } } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { exports.save(namespaces); exports.names = []; exports.skips = []; var i; var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); var len = split.length; for (i = 0; i < len; i++) { if (!split[i]) continue; // ignore empty strings namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { exports.names.push(new RegExp('^' + namespaces + '$')); } } for (i = 0; i < exports.instances.length; i++) { var instance = exports.instances[i]; instance.enabled = exports.enabled(instance.namespace); } } /** * Disable debug output. * * @api public */ function disable() { exports.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { if (name[name.length - 1] === '*') { return true; } var i, len; for (i = 0, len = exports.skips.length; i < len; i++) { if (exports.skips[i].test(name)) { return false; } } for (i = 0, len = exports.names.length; i < len; i++) { if (exports.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) return val.stack || val.message; return val; } /***/ }), /* 113 */, /* 114 */ /***/ (function(module, exports, __nested_webpack_require_164302__) { module.exports = realpath realpath.realpath = realpath realpath.sync = realpathSync realpath.realpathSync = realpathSync realpath.monkeypatch = monkeypatch realpath.unmonkeypatch = unmonkeypatch var fs = __nested_webpack_require_164302__(3) var origRealpath = fs.realpath var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) var old = __nested_webpack_require_164302__(217) function newError (er) { return er && er.syscall === 'realpath' && ( er.code === 'ELOOP' || er.code === 'ENOMEM' || er.code === 'ENAMETOOLONG' ) } function realpath (p, cache, cb) { if (ok) { return origRealpath(p, cache, cb) } if (typeof cache === 'function') { cb = cache cache = null } origRealpath(p, cache, function (er, result) { if (newError(er)) { old.realpath(p, cache, cb) } else { cb(er, result) } }) } function realpathSync (p, cache) { if (ok) { return origRealpathSync(p, cache) } try { return origRealpathSync(p, cache) } catch (er) { if (newError(er)) { return old.realpathSync(p, cache) } else { throw er } } } function monkeypatch () { fs.realpath = realpath fs.realpathSync = realpathSync } function unmonkeypatch () { fs.realpath = origRealpath fs.realpathSync = origRealpathSync } /***/ }), /* 115 */ /***/ (function(module, exports, __nested_webpack_require_165703__) { exports.alphasort = alphasort exports.alphasorti = alphasorti exports.setopts = setopts exports.ownProp = ownProp exports.makeAbs = makeAbs exports.finish = finish exports.mark = mark exports.isIgnored = isIgnored exports.childrenIgnored = childrenIgnored function ownProp (obj, field) { return Object.prototype.hasOwnProperty.call(obj, field) } var path = __nested_webpack_require_165703__(0) var minimatch = __nested_webpack_require_165703__(60) var isAbsolute = __nested_webpack_require_165703__(76) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()) } function alphasort (a, b) { return a.localeCompare(b) } function setupIgnores (self, options) { self.ignore = options.ignore || [] if (!Array.isArray(self.ignore)) self.ignore = [self.ignore] if (self.ignore.length) { self.ignore = self.ignore.map(ignoreMap) } } // ignore patterns are always in dot:true mode. function ignoreMap (pattern) { var gmatcher = null if (pattern.slice(-3) === '/**') { var gpattern = pattern.replace(/(\/\*\*)+$/, '') gmatcher = new Minimatch(gpattern, { dot: true }) } return { matcher: new Minimatch(pattern, { dot: true }), gmatcher: gmatcher } } function setopts (self, pattern, options) { if (!options) options = {} // base-matching: just use globstar for that. if (options.matchBase && -1 === pattern.indexOf("/")) { if (options.noglobstar) { throw new Error("base matching requires globstar") } pattern = "**/" + pattern } self.silent = !!options.silent self.pattern = pattern self.strict = options.strict !== false self.realpath = !!options.realpath self.realpathCache = options.realpathCache || Object.create(null) self.follow = !!options.follow self.dot = !!options.dot self.mark = !!options.mark self.nodir = !!options.nodir if (self.nodir) self.mark = true self.sync = !!options.sync self.nounique = !!options.nounique self.nonull = !!options.nonull self.nosort = !!options.nosort self.nocase = !!options.nocase self.stat = !!options.stat self.noprocess = !!options.noprocess self.absolute = !!options.absolute self.maxLength = options.maxLength || Infinity self.cache = options.cache || Object.create(null) self.statCache = options.statCache || Object.create(null) self.symlinks = options.symlinks || Object.create(null) setupIgnores(self, options) self.changedCwd = false var cwd = process.cwd() if (!ownProp(options, "cwd")) self.cwd = cwd else { self.cwd = path.resolve(options.cwd) self.changedCwd = self.cwd !== cwd } self.root = options.root || path.resolve(self.cwd, "/") self.root = path.resolve(self.root) if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/") // TODO: is an absolute `cwd` supposed to be resolved against `root`? // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) if (process.platform === "win32") self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") self.nomount = !!options.nomount // disable comments and negation in Minimatch. // Note that they are not supported in Glob itself anyway. options.nonegate = true options.nocomment = true self.minimatch = new Minimatch(pattern, options) self.options = self.minimatch.options } function finish (self) { var nou = self.nounique var all = nou ? [] : Object.create(null) for (var i = 0, l = self.matches.length; i < l; i ++) { var matches = self.matches[i] if (!matches || Object.keys(matches).length === 0) { if (self.nonull) { // do like the shell, and spit out the literal glob var literal = self.minimatch.globSet[i] if (nou) all.push(literal) else all[literal] = true } } else { // had matches var m = Object.keys(matches) if (nou) all.push.apply(all, m) else m.forEach(function (m) { all[m] = true }) } } if (!nou) all = Object.keys(all) if (!self.nosort) all = all.sort(self.nocase ? alphasorti : alphasort) // at *some* point we statted all of these if (self.mark) { for (var i = 0; i < all.length; i++) { all[i] = self._mark(all[i]) } if (self.nodir) { all = all.filter(function (e) { var notDir = !(/\/$/.test(e)) var c = self.cache[e] || self.cache[makeAbs(self, e)] if (notDir && c) notDir = c !== 'DIR' && !Array.isArray(c) return notDir }) } } if (self.ignore.length) all = all.filter(function(m) { return !isIgnored(self, m) }) self.found = all } function mark (self, p) { var abs = makeAbs(self, p) var c = self.cache[abs] var m = p if (c) { var isDir = c === 'DIR' || Array.isArray(c) var slash = p.slice(-1) === '/' if (isDir && !slash) m += '/' else if (!isDir && slash) m = m.slice(0, -1) if (m !== p) { var mabs = makeAbs(self, m) self.statCache[mabs] = self.statCache[abs] self.cache[mabs] = self.cache[abs] } } return m } // lotta situps... function makeAbs (self, f) { var abs = f if (f.charAt(0) === '/') { abs = path.join(self.root, f) } else if (isAbsolute(f) || f === '') { abs = f } else if (self.changedCwd) { abs = path.resolve(self.cwd, f) } else { abs = path.resolve(f) } if (process.platform === 'win32') abs = abs.replace(/\\/g, '/') return abs } // Return true, if pattern ends with globstar '**', for the accompanying parent directory. // Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents function isIgnored (self, path) { if (!self.ignore.length) return false return self.ignore.some(function(item) { return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) }) } function childrenIgnored (self, path) { if (!self.ignore.length) return false return self.ignore.some(function(item) { return !!(item.gmatcher && item.gmatcher.match(path)) }) } /***/ }), /* 116 */ /***/ (function(module, exports, __nested_webpack_require_171955__) { var path = __nested_webpack_require_171955__(0); var fs = __nested_webpack_require_171955__(3); 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 & (~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; } }); } 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; // 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; }; /***/ }), /* 117 */, /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = x => { if (typeof x !== 'string') { throw new TypeError('Expected a string, got ' + typeof x); } // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string // conversion translates it to FEFF (UTF-16 BOM) if (x.charCodeAt(0) === 0xFEFF) { return x.slice(1); } return x; }; /***/ }), /* 123 */ /***/ (function(module, exports) { // Returns a wrapper function that returns a wrapped callback // The wrapper function should do some stuff, and return a // presumably different callback function. // This makes sure that own properties are retained, so that // decorations and such are not lost along the way. module.exports = wrappy function wrappy (fn, cb) { if (fn && cb) return wrappy(fn)(cb) if (typeof fn !== 'function') throw new TypeError('need wrapper function') Object.keys(fn).forEach(function (k) { wrapper[k] = fn[k] }) return wrapper function wrapper() { var args = new Array(arguments.length) for (var i = 0; i < args.length; i++) { args[i] = arguments[i] } var ret = fn.apply(this, args) var cb = args[args.length-1] if (typeof ret === 'function' && ret !== cb) { Object.keys(cb).forEach(function (k) { ret[k] = cb[k] }) } return ret } } /***/ }), /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */, /* 131 */ /***/ (function(module, exports, __nested_webpack_require_176172__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __nested_webpack_require_176172__(47); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 132 */ /***/ (function(module, exports, __nested_webpack_require_176546__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __nested_webpack_require_176546__(195); var enumBugKeys = __nested_webpack_require_176546__(101); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 133 */ /***/ (function(module, exports, __nested_webpack_require_176834__) { // 7.1.13 ToObject(argument) var defined = __nested_webpack_require_176834__(67); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */, /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */, /* 144 */, /* 145 */ /***/ (function(module, exports) { module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.10.0-0","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^2.2.4","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^3.0.1","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.3","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.24","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.10.0","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^3.9.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","gulp-util":"^3.0.7","gulp-watch":"^5.0.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), /* 146 */, /* 147 */, /* 148 */, /* 149 */, /* 150 */ /***/ (function(module, exports, __nested_webpack_require_181304__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = stringify; var _misc; function _load_misc() { return _misc = __nested_webpack_require_181304__(12); } var _constants; function _load_constants() { return _constants = __nested_webpack_require_181304__(6); } var _package; function _load_package() { return _package = __nested_webpack_require_181304__(145); } const NODE_VERSION = process.version; function shouldWrapKey(str) { return str.indexOf('true') === 0 || str.indexOf('false') === 0 || /[:\s\n\\",\[\]]/g.test(str) || /^[0-9]/g.test(str) || !/^[a-zA-Z]/g.test(str); } function maybeWrap(str) { if (typeof str === 'boolean' || typeof str === 'number' || shouldWrapKey(str)) { return JSON.stringify(str); } else { return str; } } const priorities = { name: 1, version: 2, uid: 3, resolved: 4, integrity: 5, registry: 6, dependencies: 7 }; function priorityThenAlphaSort(a, b) { if (priorities[a] || priorities[b]) { return (priorities[a] || 100) > (priorities[b] || 100) ? 1 : -1; } else { return (0, (_misc || _load_misc()).sortAlpha)(a, b); } } function _stringify(obj, options) { if (typeof obj !== 'object') { throw new TypeError(); } const indent = options.indent; const lines = []; // Sorting order needs to be consistent between runs, we run native sort by name because there are no // problems with it being unstable because there are no to keys the same // However priorities can be duplicated and native sort can shuffle things from run to run const keys = Object.keys(obj).sort(priorityThenAlphaSort); let addedKeys = []; for (let i = 0; i < keys.length; i++) { const key = keys[i]; const val = obj[key]; if (val == null || addedKeys.indexOf(key) >= 0) { continue; } const valKeys = [key]; // get all keys that have the same value equality, we only want this for objects if (typeof val === 'object') { for (let j = i + 1; j < keys.length; j++) { const key = keys[j]; if (val === obj[key]) { valKeys.push(key); } } } const keyLine = valKeys.sort((_misc || _load_misc()).sortAlpha).map(maybeWrap).join(', '); if (typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number') { lines.push(`${keyLine} ${maybeWrap(val)}`); } else if (typeof val === 'object') { lines.push(`${keyLine}:\n${_stringify(val, { indent: indent + ' ' })}` + (options.topLevel ? '\n' : '')); } else { throw new TypeError(); } addedKeys = addedKeys.concat(valKeys); } return indent + lines.join(`\n${indent}`); } function stringify(obj, noHeader, enableVersions) { const val = _stringify(obj, { indent: '', topLevel: true }); if (noHeader) { return val; } const lines = []; lines.push('# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.'); lines.push(`# yarn lockfile v${(_constants || _load_constants()).LOCKFILE_VERSION}`); if (enableVersions) { lines.push(`# yarn v${(_package || _load_package()).version}`); lines.push(`# node ${NODE_VERSION}`); } lines.push('\n'); lines.push(val); return lines.join('\n'); } /***/ }), /* 151 */, /* 152 */, /* 153 */, /* 154 */, /* 155 */, /* 156 */, /* 157 */, /* 158 */, /* 159 */, /* 160 */, /* 161 */, /* 162 */, /* 163 */, /* 164 */ /***/ (function(module, exports, __nested_webpack_require_184737__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fileDatesEqual = exports.copyFile = exports.unlink = undefined; var _asyncToGenerator2; function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__nested_webpack_require_184737__(1)); } // We want to preserve file timestamps when copying a file, since yarn uses them to decide if a file has // changed compared to the cache. // There are some OS specific cases here: // * On linux, fs.copyFile does not preserve timestamps, but does on OSX and Win. // * On windows, you must open a file with write permissions to call `fs.futimes`. // * On OSX you can open with read permissions and still call `fs.futimes`. let fixTimes = (() => { var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (fd, dest, data) { const doOpen = fd === undefined; let openfd = fd ? fd : -1; if (disableTimestampCorrection === undefined) { // if timestamps match already, no correction is needed. // the need to correct timestamps varies based on OS and node versions. const destStat = yield lstat(dest); disableTimestampCorrection = fileDatesEqual(destStat.mtime, data.mtime); } if (disableTimestampCorrection) { return; } if (doOpen) { try { openfd = yield open(dest, 'a', data.mode); } catch (er) { // file is likely read-only try { openfd = yield open(dest, 'r', data.mode); } catch (err) { // We can't even open this file for reading. return; } } } try { if (openfd) { yield futimes(openfd, data.atime, data.mtime); } } catch (er) { // If `futimes` throws an exception, we probably have a case of a read-only file on Windows. // In this case we can just return. The incorrect timestamp will just cause that file to be recopied // on subsequent installs, which will effect yarn performance but not break anything. } finally { if (doOpen && openfd) { yield close(openfd); } } }); return function fixTimes(_x7, _x8, _x9) { return _ref3.apply(this, arguments); }; })(); // Compare file timestamps. // Some versions of Node on windows zero the milliseconds when utime is used. var _fs; function _load_fs() { return _fs = _interopRequireDefault(__nested_webpack_require_184737__(3)); } var _promise; function _load_promise() { return _promise = __nested_webpack_require_184737__(40); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // This module serves as a wrapper for file operations that are inconsistant across node and OS versions. let disableTimestampCorrection = undefined; // OS dependent. will be detected on first file copy. const readFileBuffer = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.readFile); const close = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.close); const lstat = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.lstat); const open = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.open); const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.futimes); const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__nested_webpack_require_184737__(233)); /** * Unlinks the destination to force a recreation. This is needed on case-insensitive file systems * to force the correct naming when the filename has changed only in character-casing. (Jest -> jest). */ const copyFile = exports.copyFile = (() => { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (data, cleanup) { try { yield unlink(data.dest); yield copyFilePoly(data.src, data.dest, 0, data); } finally { if (cleanup) { cleanup(); } } }); return function copyFile(_x, _x2) { return _ref.apply(this, arguments); }; })(); // Node 8.5.0 introduced `fs.copyFile` which is much faster, so use that when available. // Otherwise we fall back to reading and writing files as buffers. const copyFilePoly = (src, dest, flags, data) => { if ((_fs || _load_fs()).default.copyFile) { return new Promise((resolve, reject) => (_fs || _load_fs()).default.copyFile(src, dest, flags, err => { if (err) { reject(err); } else { fixTimes(undefined, dest, data).then(() => resolve()).catch(ex => reject(ex)); } })); } else { return copyWithBuffer(src, dest, flags, data); } }; const copyWithBuffer = (() => { var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest, flags, data) { // Use open -> write -> futimes -> close sequence to avoid opening the file twice: // one with writeFile and one with utimes const fd = yield open(dest, 'w', data.mode); try { const buffer = yield readFileBuffer(src); yield write(fd, buffer, 0, buffer.length); yield fixTimes(fd, dest, data); } finally { yield close(fd); } }); return function copyWithBuffer(_x3, _x4, _x5, _x6) { return _ref2.apply(this, arguments); }; })();const fileDatesEqual = exports.fileDatesEqual = (a, b) => { const aTime = a.getTime(); const bTime = b.getTime(); if (process.platform !== 'win32') { return aTime === bTime; } // See https://github.com/nodejs/node/pull/12607 // Submillisecond times from stat and utimes are truncated on Windows, // causing a file with mtime 8.0079998 and 8.0081144 to become 8.007 and 8.008 // and making it impossible to update these files to their correct timestamps. if (Math.abs(aTime - bTime) <= 1) { return true; } const aTimeSec = Math.floor(aTime / 1000); const bTimeSec = Math.floor(bTime / 1000); // See https://github.com/nodejs/node/issues/2069 // Some versions of Node on windows zero the milliseconds when utime is used // So if any of the time has a milliseconds part of zero we suspect that the // bug is present and compare only seconds. if (aTime - aTimeSec * 1000 === 0 || bTime - bTimeSec * 1000 === 0) { return aTimeSec === bTimeSec; } return aTime === bTime; }; /***/ }), /* 165 */, /* 166 */, /* 167 */, /* 168 */, /* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isFakeRoot = isFakeRoot; exports.isRootUser = isRootUser; function getUid() { if (process.platform !== 'win32' && process.getuid) { return process.getuid(); } return null; } exports.default = isRootUser(getUid()) && !isFakeRoot(); function isFakeRoot() { return Boolean(process.env.FAKEROOTKEY); } function isRootUser(uid) { return uid === 0; } /***/ }), /* 170 */, /* 171 */ /***/ (function(module, exports, __nested_webpack_require_191776__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDataDir = getDataDir; exports.getCacheDir = getCacheDir; exports.getConfigDir = getConfigDir; const path = __nested_webpack_require_191776__(0); const userHome = __nested_webpack_require_191776__(45).default; const FALLBACK_CONFIG_DIR = path.join(userHome, '.config', 'yarn'); const FALLBACK_CACHE_DIR = path.join(userHome, '.cache', 'yarn'); function getDataDir() { if (process.platform === 'win32') { const WIN32_APPDATA_DIR = getLocalAppDataDir(); return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, 'Data'); } else if (process.env.XDG_DATA_HOME) { return path.join(process.env.XDG_DATA_HOME, 'yarn'); } else { // This could arguably be ~/Library/Application Support/Yarn on Macs, // but that feels unintuitive for a cli tool // Instead, use our prior fallback. Some day this could be // path.join(userHome, '.local', 'share', 'yarn') // or return path.join(WIN32_APPDATA_DIR, 'Data') on win32 return FALLBACK_CONFIG_DIR; } } function getCacheDir() { if (process.platform === 'win32') { // process.env.TEMP also exists, but most apps put caches here return path.join(getLocalAppDataDir() || path.join(userHome, 'AppData', 'Local', 'Yarn'), 'Cache'); } else if (process.env.XDG_CACHE_HOME) { return path.join(process.env.XDG_CACHE_HOME, 'yarn'); } else if (process.platform === 'darwin') { return path.join(userHome, 'Library', 'Caches', 'Yarn'); } else { return FALLBACK_CACHE_DIR; } } function getConfigDir() { if (process.platform === 'win32') { // Use our prior fallback. Some day this could be // return path.join(WIN32_APPDATA_DIR, 'Config') const WIN32_APPDATA_DIR = getLocalAppDataDir(); return WIN32_APPDATA_DIR == null ? FALLBACK_CONFIG_DIR : path.join(WIN32_APPDATA_DIR, 'Config'); } else if (process.env.XDG_CONFIG_HOME) { return path.join(process.env.XDG_CONFIG_HOME, 'yarn'); } else { return FALLBACK_CONFIG_DIR; } } function getLocalAppDataDir() { return process.env.LOCALAPPDATA ? path.join(process.env.LOCALAPPDATA, 'Yarn') : null; } /***/ }), /* 172 */, /* 173 */ /***/ (function(module, exports, __nested_webpack_require_194030__) { module.exports = { "default": __nested_webpack_require_194030__(179), __esModule: true }; /***/ }), /* 174 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [ begs.pop(), bi ]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [ left, right ]; } } return result; } /***/ }), /* 175 */ /***/ (function(module, exports, __nested_webpack_require_195438__) { var concatMap = __nested_webpack_require_195438__(178); var balanced = __nested_webpack_require_195438__(174); module.exports = expandTop; var escSlash = '\0SLASH'+Math.random()+'\0'; var escOpen = '\0OPEN'+Math.random()+'\0'; var escClose = '\0CLOSE'+Math.random()+'\0'; var escComma = '\0COMMA'+Math.random()+'\0'; var escPeriod = '\0PERIOD'+Math.random()+'\0'; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } function escapeBraces(str) { return str.split('\\\\').join(escSlash) .split('\\{').join(escOpen) .split('\\}').join(escClose) .split('\\,').join(escComma) .split('\\.').join(escPeriod); } function unescapeBraces(str) { return str.split(escSlash).join('\\') .split(escOpen).join('{') .split(escClose).join('}') .split(escComma).join(',') .split(escPeriod).join('.'); } // Basically just str.split(","), but handling cases // where we have nested braced sections, which should be // treated as individual members, like {a,{b,c},d} function parseCommaParts(str) { if (!str) return ['']; var parts = []; var m = balanced('{', '}', str); if (!m) return str.split(','); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(','); p[p.length-1] += '{' + body + '}'; var postParts = parseCommaParts(post); if (post.length) { p[p.length-1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } function expandTop(str) { if (!str) return []; // I don't know why Bash 4.3 does this, but it does. // Anything starting with {} will have the first two bytes preserved // but *only* at the top level, so {},a}b will not expand to anything, // but a{},b}c will be expanded to [a}c,abc]. // One could argue that this is a bug in Bash, but since the goal of // this module is to match Bash's rules, we escape a leading {} if (str.substr(0, 2) === '{}') { str = '\\{\\}' + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } function identity(e) { return e; } function embrace(str) { return '{' + str + '}'; } function isPadded(el) { return /^-?0\d/.test(el); } function lte(i, y) { return i <= y; } function gte(i, y) { return i >= y; } function expand(str, isTop) { var expansions = []; var m = balanced('{', '}', str); if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} if (m.post.match(/,.*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { // x{{a,b}}y ==> x{a}y x{b}y n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : ['']; return post.map(function(p) { return m.pre + n[0] + p; }); } } } // at this point, n is the parts, and we know it's not a comma set // with a single entry. // no need to expand pre, since it is guaranteed to be free of brace-sets var pre = m.pre; var post = m.post.length ? expand(m.post, false) : ['']; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length) var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === '\\') c = ''; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join('0'); if (i < 0) c = '-' + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false) }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function preserveCamelCase(str) { let isLastCharLower = false; let isLastCharUpper = false; let isLastLastCharUpper = false; for (let i = 0; i < str.length; i++) { const c = str[i]; if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) { str = str.substr(0, i) + '-' + str.substr(i); isLastCharLower = false; isLastLastCharUpper = isLastCharUpper; isLastCharUpper = true; i++; } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) { str = str.substr(0, i - 1) + '-' + str.substr(i - 1); isLastLastCharUpper = isLastCharUpper; isLastCharUpper = false; isLastCharLower = true; } else { isLastCharLower = c.toLowerCase() === c; isLastLastCharUpper = isLastCharUpper; isLastCharUpper = c.toUpperCase() === c; } } return str; } module.exports = function (str) { if (arguments.length > 1) { str = Array.from(arguments) .map(x => x.trim()) .filter(x => x.length) .join('-'); } else { str = str.trim(); } if (str.length === 0) { return ''; } if (str.length === 1) { return str.toLowerCase(); } if (/^[a-z0-9]+$/.test(str)) { return str; } const hasUpperCase = str !== str.toLowerCase(); if (hasUpperCase) { str = preserveCamelCase(str); } return str .replace(/^[_.\- ]+/, '') .toLowerCase() .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase()); }; /***/ }), /* 177 */, /* 178 */ /***/ (function(module, exports) { module.exports = function (xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); if (isArray(x)) res.push.apply(res, x); else res.push(x); } return res; }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; /***/ }), /* 179 */ /***/ (function(module, exports, __nested_webpack_require_202224__) { __nested_webpack_require_202224__(205); __nested_webpack_require_202224__(207); __nested_webpack_require_202224__(210); __nested_webpack_require_202224__(206); __nested_webpack_require_202224__(208); __nested_webpack_require_202224__(209); module.exports = __nested_webpack_require_202224__(23).Promise; /***/ }), /* 180 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /* 181 */ /***/ (function(module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }), /* 182 */ /***/ (function(module, exports, __nested_webpack_require_202908__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __nested_webpack_require_202908__(74); var toLength = __nested_webpack_require_202908__(110); var toAbsoluteIndex = __nested_webpack_require_202908__(200); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 183 */ /***/ (function(module, exports, __nested_webpack_require_203904__) { var ctx = __nested_webpack_require_203904__(48); var call = __nested_webpack_require_203904__(187); var isArrayIter = __nested_webpack_require_203904__(186); var anObject = __nested_webpack_require_203904__(27); var toLength = __nested_webpack_require_203904__(110); var getIterFn = __nested_webpack_require_203904__(203); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }), /* 184 */ /***/ (function(module, exports, __nested_webpack_require_205151__) { module.exports = !__nested_webpack_require_205151__(33) && !__nested_webpack_require_205151__(85)(function () { return Object.defineProperty(__nested_webpack_require_205151__(68)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 185 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }), /* 186 */ /***/ (function(module, exports, __nested_webpack_require_206189__) { // check on default Array iterator var Iterators = __nested_webpack_require_206189__(35); var ITERATOR = __nested_webpack_require_206189__(13)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 187 */ /***/ (function(module, exports, __nested_webpack_require_206553__) { // call something on iterator step with safe closing on error var anObject = __nested_webpack_require_206553__(27); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 188 */ /***/ (function(module, exports, __nested_webpack_require_207042__) { "use strict"; var create = __nested_webpack_require_207042__(192); var descriptor = __nested_webpack_require_207042__(106); var setToStringTag = __nested_webpack_require_207042__(71); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __nested_webpack_require_207042__(31)(IteratorPrototype, __nested_webpack_require_207042__(13)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 189 */ /***/ (function(module, exports, __nested_webpack_require_207645__) { var ITERATOR = __nested_webpack_require_207645__(13)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 190 */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 191 */ /***/ (function(module, exports, __nested_webpack_require_208519__) { var global = __nested_webpack_require_208519__(11); var macrotask = __nested_webpack_require_208519__(109).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; var isNode = __nested_webpack_require_208519__(47)(process) == 'process'; module.exports = function () { var head, last, notify; var flush = function () { var parent, fn; if (isNode && (parent = process.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (e) { if (head) notify(); else last = undefined; throw e; } } last = undefined; if (parent) parent.enter(); }; // Node.js if (isNode) { notify = function () { process.nextTick(flush); }; // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 } else if (Observer && !(global.navigator && global.navigator.standalone)) { var toggle = true; var node = document.createTextNode(''); new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 var promise = Promise.resolve(undefined); notify = function () { promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function () { // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; }; /***/ }), /* 192 */ /***/ (function(module, exports, __nested_webpack_require_210595__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __nested_webpack_require_210595__(27); var dPs = __nested_webpack_require_210595__(193); var enumBugKeys = __nested_webpack_require_210595__(101); var IE_PROTO = __nested_webpack_require_210595__(72)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __nested_webpack_require_210595__(68)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __nested_webpack_require_210595__(102).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 193 */ /***/ (function(module, exports, __nested_webpack_require_212180__) { var dP = __nested_webpack_require_212180__(50); var anObject = __nested_webpack_require_212180__(27); var getKeys = __nested_webpack_require_212180__(132); module.exports = __nested_webpack_require_212180__(33) ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var keys = getKeys(Properties); var length = keys.length; var i = 0; var P; while (length > i) dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 194 */ /***/ (function(module, exports, __nested_webpack_require_212660__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __nested_webpack_require_212660__(49); var toObject = __nested_webpack_require_212660__(133); var IE_PROTO = __nested_webpack_require_212660__(72)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 195 */ /***/ (function(module, exports, __nested_webpack_require_213238__) { var has = __nested_webpack_require_213238__(49); var toIObject = __nested_webpack_require_213238__(74); var arrayIndexOf = __nested_webpack_require_213238__(182)(false); var IE_PROTO = __nested_webpack_require_213238__(72)('IE_PROTO'); module.exports = function (object, names) { var O = toIObject(object); var i = 0; var result = []; var key; for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 196 */ /***/ (function(module, exports, __nested_webpack_require_213854__) { var hide = __nested_webpack_require_213854__(31); module.exports = function (target, src, safe) { for (var key in src) { if (safe && target[key]) target[key] = src[key]; else hide(target, key, src[key]); } return target; }; /***/ }), /* 197 */ /***/ (function(module, exports, __nested_webpack_require_214155__) { module.exports = __nested_webpack_require_214155__(31); /***/ }), /* 198 */ /***/ (function(module, exports, __nested_webpack_require_214276__) { "use strict"; var global = __nested_webpack_require_214276__(11); var core = __nested_webpack_require_214276__(23); var dP = __nested_webpack_require_214276__(50); var DESCRIPTORS = __nested_webpack_require_214276__(33); var SPECIES = __nested_webpack_require_214276__(13)('species'); module.exports = function (KEY) { var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { configurable: true, get: function () { return this; } }); }; /***/ }), /* 199 */ /***/ (function(module, exports, __nested_webpack_require_214803__) { var toInteger = __nested_webpack_require_214803__(73); var defined = __nested_webpack_require_214803__(67); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 200 */ /***/ (function(module, exports, __nested_webpack_require_215503__) { var toInteger = __nested_webpack_require_215503__(73); var max = Math.max; var min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 201 */ /***/ (function(module, exports, __nested_webpack_require_215804__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __nested_webpack_require_215804__(34); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 202 */ /***/ (function(module, exports, __nested_webpack_require_216538__) { var global = __nested_webpack_require_216538__(11); var navigator = global.navigator; module.exports = navigator && navigator.userAgent || ''; /***/ }), /* 203 */ /***/ (function(module, exports, __nested_webpack_require_216747__) { var classof = __nested_webpack_require_216747__(100); var ITERATOR = __nested_webpack_require_216747__(13)('iterator'); var Iterators = __nested_webpack_require_216747__(35); module.exports = __nested_webpack_require_216747__(23).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 204 */ /***/ (function(module, exports, __nested_webpack_require_217137__) { "use strict"; var addToUnscopables = __nested_webpack_require_217137__(180); var step = __nested_webpack_require_217137__(190); var Iterators = __nested_webpack_require_217137__(35); var toIObject = __nested_webpack_require_217137__(74); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __nested_webpack_require_217137__(103)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 205 */ /***/ (function(module, exports) { /***/ }), /* 206 */ /***/ (function(module, exports, __nested_webpack_require_218382__) { "use strict"; var LIBRARY = __nested_webpack_require_218382__(69); var global = __nested_webpack_require_218382__(11); var ctx = __nested_webpack_require_218382__(48); var classof = __nested_webpack_require_218382__(100); var $export = __nested_webpack_require_218382__(41); var isObject = __nested_webpack_require_218382__(34); var aFunction = __nested_webpack_require_218382__(46); var anInstance = __nested_webpack_require_218382__(181); var forOf = __nested_webpack_require_218382__(183); var speciesConstructor = __nested_webpack_require_218382__(108); var task = __nested_webpack_require_218382__(109).set; var microtask = __nested_webpack_require_218382__(191)(); var newPromiseCapabilityModule = __nested_webpack_require_218382__(70); var perform = __nested_webpack_require_218382__(104); var userAgent = __nested_webpack_require_218382__(202); var promiseResolve = __nested_webpack_require_218382__(105); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; var versions = process && process.versions; var v8 = versions && versions.v8 || ''; var $Promise = global[PROMISE]; var isNode = classof(process) == 'process'; var empty = function () { /* empty */ }; var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; var USE_NATIVE = !!function () { try { // correct subclassing with @@species support var promise = $Promise.resolve(1); var FakePromise = (promise.constructor = {})[__nested_webpack_require_218382__(13)('species')] = function (exec) { exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // we can't detect it synchronously, so just check versions && v8.indexOf('6.6') !== 0 && userAgent.indexOf('Chrome/66') === -1; } catch (e) { /* empty */ } }(); // helpers var isThenable = function (it) { var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var notify = function (promise, isReject) { if (promise._n) return; promise._n = true; var chain = promise._c; microtask(function () { var value = promise._v; var ok = promise._s == 1; var i = 0; var run = function (reaction) { var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (promise._h == 2) onHandleUnhandled(promise); promise._h = 1; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // may throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch (e) { if (domain && !exited) domain.exit(); reject(e); } }; while (chain.length > i) run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if (isReject && !promise._h) onUnhandled(promise); }); }; var onUnhandled = function (promise) { task.call(global, function () { var value = promise._v; var unhandled = isUnhandled(promise); var result, handler, console; if (unhandled) { result = perform(function () { if (isNode) { process.emit('unhandledRejection', value, promise); } else if (handler = global.onunhandledrejection) { handler({ promise: promise, reason: value }); } else if ((console = global.console) && console.error) { console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if (unhandled && result.e) throw result.v; }); }; var isUnhandled = function (promise) { return promise._h !== 1 && (promise._a || promise._c).length === 0; }; var onHandleUnhandled = function (promise) { task.call(global, function () { var handler; if (isNode) { process.emit('rejectionHandled', promise); } else if (handler = global.onrejectionhandled) { handler({ promise: promise, reason: promise._v }); } }); }; var $reject = function (value) { var promise = this; if (promise._d) return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if (!promise._a) promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function (value) { var promise = this; var then; if (promise._d) return; promise._d = true; promise = promise._w || promise; // unwrap try { if (promise === value) throw TypeError("Promise can't be resolved itself"); if (then = isThenable(value)) { microtask(function () { var wrapper = { _w: promise, _d: false }; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch (e) { $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch (e) { $reject.call({ _w: promise, _d: false }, e); // wrap } }; // constructor polyfill if (!USE_NATIVE) { // 25.4.3.1 Promise(executor) $Promise = function Promise(executor) { anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch (err) { $reject.call(this, err); } }; // eslint-disable-next-line no-unused-vars Internal = function Promise(executor) { this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __nested_webpack_require_218382__(196)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if (this._a) this._a.push(reaction); if (this._s) notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); OwnPromiseCapability = function () { var promise = new Internal(); this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; newPromiseCapabilityModule.f = newPromiseCapability = function (C) { return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); __nested_webpack_require_218382__(71)($Promise, PROMISE); __nested_webpack_require_218382__(198)(PROMISE); Wrapper = __nested_webpack_require_218382__(23)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r) { var capability = newPromiseCapability(this); var $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x) { return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); } }); $export($export.S + $export.F * !(USE_NATIVE && __nested_webpack_require_218382__(189)(function (iter) { $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable) { var C = this; var capability = newPromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var values = []; var index = 0; var remaining = 1; forOf(iterable, false, function (promise) { var $index = index++; var alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.e) reject(result.v); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable) { var C = this; var capability = newPromiseCapability(C); var reject = capability.reject; var result = perform(function () { forOf(iterable, false, function (promise) { C.resolve(promise).then(capability.resolve, reject); }); }); if (result.e) reject(result.v); return capability.promise; } }); /***/ }), /* 207 */ /***/ (function(module, exports, __nested_webpack_require_228275__) { "use strict"; var $at = __nested_webpack_require_228275__(199)(true); // 21.1.3.27 String.prototype[@@iterator]() __nested_webpack_require_228275__(103)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 208 */ /***/ (function(module, exports, __nested_webpack_require_228886__) { "use strict"; // https://github.com/tc39/proposal-promise-finally var $export = __nested_webpack_require_228886__(41); var core = __nested_webpack_require_228886__(23); var global = __nested_webpack_require_228886__(11); var speciesConstructor = __nested_webpack_require_228886__(108); var promiseResolve = __nested_webpack_require_228886__(105); $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { var C = speciesConstructor(this, core.Promise || global.Promise); var isFunction = typeof onFinally == 'function'; return this.then( isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally ); } }); /***/ }), /* 209 */ /***/ (function(module, exports, __nested_webpack_require_229726__) { "use strict"; // https://github.com/tc39/proposal-promise-try var $export = __nested_webpack_require_229726__(41); var newPromiseCapability = __nested_webpack_require_229726__(70); var perform = __nested_webpack_require_229726__(104); $export($export.S, 'Promise', { 'try': function (callbackfn) { var promiseCapability = newPromiseCapability.f(this); var result = perform(callbackfn); (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); return promiseCapability.promise; } }); /***/ }), /* 210 */ /***/ (function(module, exports, __nested_webpack_require_230276__) { __nested_webpack_require_230276__(204); var global = __nested_webpack_require_230276__(11); var hide = __nested_webpack_require_230276__(31); var Iterators = __nested_webpack_require_230276__(35); var TO_STRING_TAG = __nested_webpack_require_230276__(13)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 211 */ /***/ (function(module, exports, __nested_webpack_require_231331__) { /** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __nested_webpack_require_231331__(112); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = [ '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33' ]; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { return true; } // Internet Explorer and Edge do not support colors. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } // is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || // is firebug? http://stackoverflow.com/a/398120/376773 (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || // double check webkit in userAgent just in case we are in a worker (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function(v) { try { return JSON.stringify(v); } catch (err) { return '[UnexpectedJSONParseError]: ' + err.message; } }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs(args) { var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!useColors) return; var c = 'color: ' + this.color; args.splice(1, 0, c, 'color: inherit') // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-zA-Z%]/g, function(match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch(e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.debug; } catch(e) {} // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { return window.localStorage; } catch (e) {} } /***/ }), /* 212 */ /***/ (function(module, exports, __nested_webpack_require_237123__) { /** * Detect Electron renderer process, which is node, but we should * treat as a browser. */ if (typeof process === 'undefined' || process.type === 'renderer') { module.exports = __nested_webpack_require_237123__(211); } else { module.exports = __nested_webpack_require_237123__(213); } /***/ }), /* 213 */ /***/ (function(module, exports, __nested_webpack_require_237470__) { /** * Module dependencies. */ var tty = __nested_webpack_require_237470__(79); var util = __nested_webpack_require_237470__(2); /** * This is the Node.js implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __nested_webpack_require_237470__(112); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; /** * Colors. */ exports.colors = [ 6, 2, 3, 4, 5, 1 ]; try { var supportsColor = __nested_webpack_require_237470__(239); if (supportsColor && supportsColor.level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221 ]; } } catch (err) { // swallow - we only care if `supports-color` is available; it doesn't have to be. } /** * Build up the default `inspectOpts` object from the environment variables. * * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ exports.inspectOpts = Object.keys(process.env).filter(function (key) { return /^debug_/i.test(key); }).reduce(function (obj, key) { // camel-case var prop = key .substring(6) .toLowerCase() .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); // coerce string value into JS value var val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) val = true; else if (/^(no|off|false|disabled)$/i.test(val)) val = false; else if (val === 'null') val = null; else val = Number(val); obj[prop] = val; return obj; }, {}); /** * Is stdout a TTY? Colored output is enabled when `true`. */ function useColors() { return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } /** * Map %o to `util.inspect()`, all on a single line. */ exports.formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts) .split('\n').map(function(str) { return str.trim() }).join(' '); }; /** * Map %o to `util.inspect()`, allowing multiple lines if needed. */ exports.formatters.O = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; /** * Adds ANSI color escape codes if enabled. * * @api public */ function formatArgs(args) { var name = this.namespace; var useColors = this.useColors; if (useColors) { var c = this.color; var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c); var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m'; args[0] = prefix + args[0].split('\n').join('\n' + prefix); args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); } else { args[0] = getDate() + name + ' ' + args[0]; } } function getDate() { if (exports.inspectOpts.hideDate) { return ''; } else { return new Date().toISOString() + ' '; } } /** * Invokes `util.format()` with the specified arguments and writes to stderr. */ function log() { return process.stderr.write(util.format.apply(util, arguments) + '\n'); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { if (null == namespaces) { // If you set a process.env field to null or undefined, it gets cast to the // string 'null' or 'undefined'. Just delete instead. delete process.env.DEBUG; } else { process.env.DEBUG = namespaces; } } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { return process.env.DEBUG; } /** * Init logic for `debug` instances. * * Create a new `inspectOpts` object in case `useColors` is set * differently for a particular `debug` instance. */ function init (debug) { debug.inspectOpts = {}; var keys = Object.keys(exports.inspectOpts); for (var i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } /** * Enable namespaces listed in `process.env.DEBUG` initially. */ exports.enable(load()); /***/ }), /* 214 */, /* 215 */, /* 216 */, /* 217 */ /***/ (function(module, exports, __nested_webpack_require_241942__) { // 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 pathModule = __nested_webpack_require_241942__(0); var isWindows = process.platform === 'win32'; var fs = __nested_webpack_require_241942__(3); // JavaScript implementation of realpath, ported from node pre-v6 var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); function rethrow() { // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and // is fairly slow to generate. var callback; if (DEBUG) { var backtrace = new Error; callback = debugCallback; } else callback = missingCallback; return callback; function debugCallback(err) { if (err) { backtrace.message = err.message; err = backtrace; missingCallback(err); } } function missingCallback(err) { if (err) { if (process.throwDeprecation) throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs else if (!process.noDeprecation) { var msg = 'fs: missing callback ' + (err.stack || err.message); if (process.traceDeprecation) console.trace(msg); else console.error(msg); } } } } function maybeCallback(cb) { return typeof cb === 'function' ? cb : rethrow(); } var normalize = pathModule.normalize; // Regexp that finds the next partion of a (partial) path // result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] if (isWindows) { var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; } else { var nextPartRe = /(.*?)(?:[\/]+|$)/g; } // Regex to find the device root, including trailing slash. E.g. 'c:\\'. if (isWindows) { var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; } else { var splitRootRe = /^[\/]*/; } exports.realpathSync = function realpathSync(p, cache) { // make p is absolute p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cache[p]; } var original = p, seenLinks = {}, knownHard = {}; // current character position in p var pos; // the partial path so far, including a trailing slash if any var current; // the partial path without a trailing slash (except when pointing at a root) var base; // the partial path scanned in the previous round, with slash var previous; start(); function start() { // Skip over roots var m = splitRootRe.exec(p); pos = m[0].length; current = m[0]; base = m[0]; previous = ''; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { fs.lstatSync(base); knownHard[base] = true; } } // walk down the path, swapping out linked pathparts for their real // values // NB: p.length changes. while (pos < p.length) { // find the next part nextPartRe.lastIndex = pos; var result = nextPartRe.exec(p); previous = current; current += result[0]; base = previous + result[1]; pos = nextPartRe.lastIndex; // continue if not a symlink if (knownHard[base] || (cache && cache[base] === base)) { continue; } var resolvedLink; if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { // some known symbolic link. no need to stat again. resolvedLink = cache[base]; } else { var stat = fs.lstatSync(base); if (!stat.isSymbolicLink()) { knownHard[base] = true; if (cache) cache[base] = base; continue; } // read the link if it wasn't read before // dev/ino always return 0 on windows, so skip the check. var linkTarget = null; if (!isWindows) { var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { linkTarget = seenLinks[id]; } } if (linkTarget === null) { fs.statSync(base); linkTarget = fs.readlinkSync(base); } resolvedLink = pathModule.resolve(previous, linkTarget); // track this, if given a cache. if (cache) cache[base] = resolvedLink; if (!isWindows) seenLinks[id] = linkTarget; } // resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); start(); } if (cache) cache[original] = p; return p; }; exports.realpath = function realpath(p, cache, cb) { if (typeof cb !== 'function') { cb = maybeCallback(cache); cache = null; } // make p is absolute p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return process.nextTick(cb.bind(null, null, cache[p])); } var original = p, seenLinks = {}, knownHard = {}; // current character position in p var pos; // the partial path so far, including a trailing slash if any var current; // the partial path without a trailing slash (except when pointing at a root) var base; // the partial path scanned in the previous round, with slash var previous; start(); function start() { // Skip over roots var m = splitRootRe.exec(p); pos = m[0].length; current = m[0]; base = m[0]; previous = ''; // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard[base]) { fs.lstat(base, function(err) { if (err) return cb(err); knownHard[base] = true; LOOP(); }); } else { process.nextTick(LOOP); } } // walk down the path, swapping out linked pathparts for their real // values function LOOP() { // stop if scanned past end of path if (pos >= p.length) { if (cache) cache[original] = p; return cb(null, p); } // find the next part nextPartRe.lastIndex = pos; var result = nextPartRe.exec(p); previous = current; current += result[0]; base = previous + result[1]; pos = nextPartRe.lastIndex; // continue if not a symlink if (knownHard[base] || (cache && cache[base] === base)) { return process.nextTick(LOOP); } if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { // known symbolic link. no need to stat again. return gotResolvedLink(cache[base]); } return fs.lstat(base, gotStat); } function gotStat(err, stat) { if (err) return cb(err); // if not a symlink, skip to the next path part if (!stat.isSymbolicLink()) { knownHard[base] = true; if (cache) cache[base] = base; return process.nextTick(LOOP); } // stat & read the link if not read before // call gotTarget as soon as the link target is known // dev/ino always return 0 on windows, so skip the check. if (!isWindows) { var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { return gotTarget(null, seenLinks[id], base); } } fs.stat(base, function(err) { if (err) return cb(err); fs.readlink(base, function(err, target) { if (!isWindows) seenLinks[id] = target; gotTarget(err, target); }); }); } function gotTarget(err, target, base) { if (err) return cb(err); var resolvedLink = pathModule.resolve(previous, target); if (cache) cache[base] = resolvedLink; gotResolvedLink(resolvedLink); } function gotResolvedLink(resolvedLink) { // resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); start(); } }; /***/ }), /* 218 */ /***/ (function(module, exports, __nested_webpack_require_250579__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __nested_webpack_require_250579__(3) var rp = __nested_webpack_require_250579__(114) var minimatch = __nested_webpack_require_250579__(60) var Minimatch = minimatch.Minimatch var Glob = __nested_webpack_require_250579__(75).Glob var util = __nested_webpack_require_250579__(2) var path = __nested_webpack_require_250579__(0) var assert = __nested_webpack_require_250579__(22) var isAbsolute = __nested_webpack_require_250579__(76) var common = __nested_webpack_require_250579__(115) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored function globSync (pattern, options) { if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n'+ 'See: https://github.com/isaacs/node-glob/issues/167') return new GlobSync(pattern, options).found } function GlobSync (pattern, options) { if (!pattern) throw new Error('must provide pattern') if (typeof options === 'function' || arguments.length === 3) throw new TypeError('callback provided to sync glob\n'+ 'See: https://github.com/isaacs/node-glob/issues/167') if (!(this instanceof GlobSync)) return new GlobSync(pattern, options) setopts(this, pattern, options) if (this.noprocess) return this var n = this.minimatch.set.length this.matches = new Array(n) for (var i = 0; i < n; i ++) { this._process(this.minimatch.set[i], i, false) } this._finish() } GlobSync.prototype._finish = function () { assert(this instanceof GlobSync) if (this.realpath) { var self = this this.matches.forEach(function (matchset, index) { var set = self.matches[index] = Object.create(null) for (var p in matchset) { try { p = self._makeAbs(p) var real = rp.realpathSync(p, self.realpathCache) set[real] = true } catch (er) { if (er.syscall === 'stat') set[self._makeAbs(p)] = true else throw er } } }) } common.finish(this) } GlobSync.prototype._process = function (pattern, index, inGlobStar) { assert(this instanceof GlobSync) // Get the first [n] parts of pattern that are all strings. var n = 0 while (typeof pattern[n] === 'string') { n ++ } // now n is the index of the first one that is *not* a string. // See if there's anything else var prefix switch (n) { // if not, then this is rather simple case pattern.length: this._processSimple(pattern.join('/'), index) return case 0: // pattern *starts* with some non-trivial item. // going to readdir(cwd), but not include the prefix in matches. prefix = null break default: // pattern has some string bits in the front. // whatever it starts with, whether that's 'absolute' like /foo/bar, // or 'relative' like '../baz' prefix = pattern.slice(0, n).join('/') break } var remain = pattern.slice(n) // get the list of entries. var read if (prefix === null) read = '.' else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { if (!prefix || !isAbsolute(prefix)) prefix = '/' + prefix read = prefix } else read = prefix var abs = this._makeAbs(read) //if ignored, skip processing if (childrenIgnored(this, read)) return var isGlobStar = remain[0] === minimatch.GLOBSTAR if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) else this._processReaddir(prefix, read, abs, remain, index, inGlobStar) } GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar) // if the abs isn't a dir, then nothing can match! if (!entries) return // It will only match dot entries if it starts with a dot, or if // dot is set. Stuff like @(.foo|.bar) isn't allowed. var pn = remain[0] var negate = !!this.minimatch.negate var rawGlob = pn._glob var dotOk = this.dot || rawGlob.charAt(0) === '.' var matchedEntries = [] for (var i = 0; i < entries.length; i++) { var e = entries[i] if (e.charAt(0) !== '.' || dotOk) { var m if (negate && !prefix) { m = !e.match(pn) } else { m = e.match(pn) } if (m) matchedEntries.push(e) } } var len = matchedEntries.length // If there are no matched entries, then nothing matches. if (len === 0) return // if this is the last remaining pattern bit, then no need for // an additional stat *unless* the user has specified mark or // stat explicitly. We know they exist, since readdir returned // them. if (remain.length === 1 && !this.mark && !this.stat) { if (!this.matches[index]) this.matches[index] = Object.create(null) for (var i = 0; i < len; i ++) { var e = matchedEntries[i] if (prefix) { if (prefix.slice(-1) !== '/') e = prefix + '/' + e else e = prefix + e } if (e.charAt(0) === '/' && !this.nomount) { e = path.join(this.root, e) } this._emitMatch(index, e) } // This was the last one, and no stats were needed return } // now test all matched entries as stand-ins for that part // of the pattern. remain.shift() for (var i = 0; i < len; i ++) { var e = matchedEntries[i] var newPattern if (prefix) newPattern = [prefix, e] else newPattern = [e] this._process(newPattern.concat(remain), index, inGlobStar) } } GlobSync.prototype._emitMatch = function (index, e) { if (isIgnored(this, e)) return var abs = this._makeAbs(e) if (this.mark) e = this._mark(e) if (this.absolute) { e = abs } if (this.matches[index][e]) return if (this.nodir) { var c = this.cache[abs] if (c === 'DIR' || Array.isArray(c)) return } this.matches[index][e] = true if (this.stat) this._stat(e) } GlobSync.prototype._readdirInGlobStar = function (abs) { // follow all symlinked directories forever // just proceed as if this is a non-globstar situation if (this.follow) return this._readdir(abs, false) var entries var lstat var stat try { lstat = fs.lstatSync(abs) } catch (er) { if (er.code === 'ENOENT') { // lstat failed, doesn't exist return null } } var isSym = lstat && lstat.isSymbolicLink() this.symlinks[abs] = isSym // If it's not a symlink or a dir, then it's definitely a regular file. // don't bother doing a readdir in that case. if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = 'FILE' else entries = this._readdir(abs, false) return entries } GlobSync.prototype._readdir = function (abs, inGlobStar) { var entries if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs) if (ownProp(this.cache, abs)) { var c = this.cache[abs] if (!c || c === 'FILE') return null if (Array.isArray(c)) return c } try { return this._readdirEntries(abs, fs.readdirSync(abs)) } catch (er) { this._readdirError(abs, er) return null } } GlobSync.prototype._readdirEntries = function (abs, entries) { // if we haven't asked to stat everything, then just // assume that everything in there exists, so we can avoid // having to stat it a second time. if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i ++) { var e = entries[i] if (abs === '/') e = abs + e else e = abs + '/' + e this.cache[e] = true } } this.cache[abs] = entries // mark and cache dir-ness return entries } GlobSync.prototype._readdirError = function (f, er) { // handle errors, and cache the information switch (er.code) { case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 case 'ENOTDIR': // totally normal. means it *does* exist. var abs = this._makeAbs(f) this.cache[abs] = 'FILE' if (abs === this.cwdAbs) { var error = new Error(er.code + ' invalid cwd ' + this.cwd) error.path = this.cwd error.code = er.code throw error } break case 'ENOENT': // not terribly unusual case 'ELOOP': case 'ENAMETOOLONG': case 'UNKNOWN': this.cache[this._makeAbs(f)] = false break default: // some unusual error. Treat as failure. this.cache[this._makeAbs(f)] = false if (this.strict) throw er if (!this.silent) console.error('glob error', er) break } } GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar) // no entries means not a dir, so it can never have matches // foo.txt/** doesn't match foo.txt if (!entries) return // test without the globstar, and with every child both below // and replacing the globstar. var remainWithoutGlobStar = remain.slice(1) var gspref = prefix ? [ prefix ] : [] var noGlobStar = gspref.concat(remainWithoutGlobStar) // the noGlobStar pattern exits the inGlobStar state this._process(noGlobStar, index, false) var len = entries.length var isSym = this.symlinks[abs] // If it's a symlink, and we're in a globstar, then stop if (isSym && inGlobStar) return for (var i = 0; i < len; i++) { var e = entries[i] if (e.charAt(0) === '.' && !this.dot) continue // these two cases enter the inGlobStar state var instead = gspref.concat(entries[i], remainWithoutGlobStar) this._process(instead, index, true) var below = gspref.concat(entries[i], remain) this._process(below, index, true) } } GlobSync.prototype._processSimple = function (prefix, index) { // XXX review this. Shouldn't it be doing the mounting etc // before doing stat? kinda weird? var exists = this._stat(prefix) if (!this.matches[index]) this.matches[index] = Object.create(null) // If it doesn't exist, then just mark the lack of results if (!exists) return if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix) if (prefix.charAt(0) === '/') { prefix = path.join(this.root, prefix) } else { prefix = path.resolve(this.root, prefix) if (trail) prefix += '/' } } if (process.platform === 'win32') prefix = prefix.replace(/\\/g, '/') // Mark this as a match this._emitMatch(index, prefix) } // Returns either 'DIR', 'FILE', or false GlobSync.prototype._stat = function (f) { var abs = this._makeAbs(f) var needDir = f.slice(-1) === '/' if (f.length > this.maxLength) return false if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs] if (Array.isArray(c)) c = 'DIR' // It exists, but maybe not how we need it if (!needDir || c === 'DIR') return c if (needDir && c === 'FILE') return false // otherwise we have to stat, because maybe c=true // if we know it exists, but not what it is. } var exists var stat = this.statCache[abs] if (!stat) { var lstat try { lstat = fs.lstatSync(abs) } catch (er) { if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { this.statCache[abs] = false return false } } if (lstat && lstat.isSymbolicLink()) { try { stat = fs.statSync(abs) } catch (er) { stat = lstat } } else { stat = lstat } } this.statCache[abs] = stat var c = true if (stat) c = stat.isDirectory() ? 'DIR' : 'FILE' this.cache[abs] = this.cache[abs] || c if (needDir && c === 'FILE') return false return c } GlobSync.prototype._mark = function (p) { return common.mark(this, p) } GlobSync.prototype._makeAbs = function (f) { return common.makeAbs(this, f) } /***/ }), /* 219 */, /* 220 */, /* 221 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function (flag, argv) { argv = argv || process.argv; var terminatorPos = argv.indexOf('--'); var prefix = /^--/.test(flag) ? '' : '--'; var pos = argv.indexOf(prefix + flag); return pos !== -1 && (terminatorPos !== -1 ? pos < terminatorPos : true); }; /***/ }), /* 222 */, /* 223 */ /***/ (function(module, exports, __nested_webpack_require_263098__) { var wrappy = __nested_webpack_require_263098__(123) var reqs = Object.create(null) var once = __nested_webpack_require_263098__(61) module.exports = wrappy(inflight) function inflight (key, cb) { if (reqs[key]) { reqs[key].push(cb) return null } else { reqs[key] = [cb] return makeres(key) } } function makeres (key) { return once(function RES () { var cbs = reqs[key] var len = cbs.length var args = slice(arguments) // XXX It's somewhat ambiguous whether a new callback added in this // pass should be queued for later execution if something in the // list of callbacks throws, or if it should just be discarded. // However, it's such an edge case that it hardly matters, and either // choice is likely as surprising as the other. // As it happens, we do go ahead and schedule it for later execution. try { for (var i = 0; i < len; i++) { cbs[i].apply(null, args) } } finally { if (cbs.length > len) { // added more in the interim. // de-zalgo, just in case, but don't call again. cbs.splice(0, len) process.nextTick(function () { RES.apply(null, args) }) } else { delete reqs[key] } } }) } function slice (args) { var length = args.length var array = [] for (var i = 0; i < length; i++) array[i] = args[i] return array } /***/ }), /* 224 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } /***/ }), /* 225 */, /* 226 */, /* 227 */ /***/ (function(module, exports, __nested_webpack_require_265309__) { // @flow /*:: declare var __webpack_require__: mixed; */ module.exports = typeof __nested_webpack_require_265309__ !== "undefined"; /***/ }), /* 228 */, /* 229 */ /***/ (function(module, exports) { /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function(val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isNaN(val) === false) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( 'val is not a non-empty string or a valid number. val=' + JSON.stringify(val) ); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { if (ms >= d) { return Math.round(ms / d) + 'd'; } if (ms >= h) { return Math.round(ms / h) + 'h'; } if (ms >= m) { return Math.round(ms / m) + 'm'; } if (ms >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, n, name) { if (ms < n) { return; } if (ms < n * 1.5) { return Math.floor(ms / n) + ' ' + name; } return Math.ceil(ms / n) + ' ' + name + 's'; } /***/ }), /* 230 */, /* 231 */, /* 232 */, /* 233 */ /***/ (function(module, exports, __nested_webpack_require_268374__) { module.exports = rimraf rimraf.sync = rimrafSync var assert = __nested_webpack_require_268374__(22) var path = __nested_webpack_require_268374__(0) var fs = __nested_webpack_require_268374__(3) var glob = __nested_webpack_require_268374__(75) var _0666 = parseInt('666', 8) var defaultGlobOpts = { nosort: true, silent: true } // for EMFILE handling var timeout = 0 var isWindows = (process.platform === "win32") function defaults (options) { var methods = [ 'unlink', 'chmod', 'stat', 'lstat', 'rmdir', 'readdir' ] methods.forEach(function(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 } options.disableGlob = options.disableGlob || false options.glob = options.glob || defaultGlobOpts } function 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) var busyTries = 0 var errState = null var n = 0 if (options.disableGlob || !glob.hasMagic(p)) return afterGlob(null, [p]) options.lstat(p, function (er, stat) { if (!er) return afterGlob(null, [p]) glob(p, options.glob, afterGlob) }) function next (er) { errState = errState || er if (--n === 0) cb(errState) } function afterGlob (er, results) { if (er) return cb(er) n = results.length if (n === 0) return cb() results.forEach(function (p) { rimraf_(p, options, function CB (er) { if (er) { if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries ++ var time = busyTries * 100 // try again, with the same exact callback as this one. return setTimeout(function () { rimraf_(p, options, CB) }, time) } // this one won't happen if graceful-fs is used. if (er.code === "EMFILE" && timeout < options.emfileWait) { return setTimeout(function () { rimraf_(p, options, CB) }, timeout ++) } // already gone if (er.code === "ENOENT") er = null } timeout = 0 next(er) }) }) } } // 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. function 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, function (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, function (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) }) }) } function fixWinEPERM (p, options, er, cb) { assert(p) assert(options) assert(typeof cb === 'function') if (er) assert(er instanceof Error) options.chmod(p, _0666, function (er2) { if (er2) cb(er2.code === "ENOENT" ? null : er) else options.stat(p, function(er3, stats) { if (er3) cb(er3.code === "ENOENT" ? null : er) else if (stats.isDirectory()) rmdir(p, options, er, cb) else options.unlink(p, cb) }) }) } function fixWinEPERMSync (p, options, er) { assert(p) assert(options) if (er) assert(er instanceof Error) try { options.chmodSync(p, _0666) } catch (er2) { if (er2.code === "ENOENT") return else throw er } try { var 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) } function rmdir (p, options, originalEr, cb) { assert(p) assert(options) if (originalEr) assert(originalEr instanceof Error) 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, function (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) }) } function rmkids(p, options, cb) { assert(p) assert(options) assert(typeof cb === 'function') options.readdir(p, function (er, files) { if (er) return cb(er) var n = files.length if (n === 0) return options.rmdir(p, cb) var errState files.forEach(function (f) { rimraf(path.join(p, f), options, function (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. function 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') var 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 (var i = 0; i < results.length; i++) { var p = results[i] try { var 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) } } } function rmdirSync (p, options, originalEr) { assert(p) assert(options) if (originalEr) assert(originalEr instanceof Error) 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) } } function rmkidsSync (p, options) { assert(p) assert(options) options.readdirSync(p).forEach(function (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. var retries = isWindows ? 100 : 1 var i = 0 do { var threw = true try { var ret = options.rmdirSync(p, options) threw = false return ret } finally { if (++i < retries && threw) continue } } while (true) } /***/ }), /* 234 */, /* 235 */, /* 236 */, /* 237 */, /* 238 */, /* 239 */ /***/ (function(module, exports, __nested_webpack_require_277532__) { "use strict"; var hasFlag = __nested_webpack_require_277532__(221); var support = function (level) { if (level === 0) { return false; } return { level: level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; }; var supportLevel = (function () { if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { return 0; } if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { return 3; } if (hasFlag('color=256')) { return 2; } if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { return 1; } if (process.stdout && !process.stdout.isTTY) { return 0; } if (process.platform === 'win32') { return 1; } if ('CI' in process.env) { if ('TRAVIS' in process.env || process.env.CI === 'Travis') { return 1; } return 0; } if ('TEAMCITY_VERSION' in process.env) { return process.env.TEAMCITY_VERSION.match(/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/) === null ? 0 : 1; } if (/^(screen|xterm)-256(?:color)?/.test(process.env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { return 1; } if ('COLORTERM' in process.env) { return 1; } if (process.env.TERM === 'dumb') { return 0; } return 0; })(); if (supportLevel === 0 && 'FORCE_COLOR' in process.env) { supportLevel = 1; } module.exports = process && support(supportLevel); /***/ }) /******/ ]); /***/ }), /***/ 92460: /***/ ((module) => { "use strict"; /* * Generated by PEG.js 0.10.0. * * http://pegjs.org/ */ function peg$subclass(child, parent) { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } peg$subclass(peg$SyntaxError, Error); peg$SyntaxError.buildMessage = function(expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function(expectation) { return "\"" + literalEscape(expectation.text) + "\""; }, "class": function(expectation) { var escapedParts = "", i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function(expectation) { return "any character"; }, end: function(expectation) { return "end of input"; }, other: function(expectation) { return expectation.description; } }; function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } function literalEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/"/g, '\\"') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function classEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/\]/g, '\\]') .replace(/\^/g, '\\^') .replace(/-/g, '\\-') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } function describeExpected(expected) { var descriptions = new Array(expected.length), i, j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } descriptions.sort(); if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { descriptions[j] = descriptions[i]; j++; } } descriptions.length = j; } switch (descriptions.length) { case 1: return descriptions[0]; case 2: return descriptions[0] + " or " + descriptions[1]; default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; function peg$parse(input, options) { options = options !== void 0 ? options : {}; var peg$FAILED = {}, peg$startRuleFunctions = { resolution: peg$parseresolution }, peg$startRuleFunction = peg$parseresolution, peg$c0 = "/", peg$c1 = peg$literalExpectation("/", false), peg$c2 = function(from, descriptor) { return { from, descriptor } }, peg$c3 = function(descriptor) { return { descriptor } }, peg$c4 = "@", peg$c5 = peg$literalExpectation("@", false), peg$c6 = function(fullName, description) { return { fullName, description } }, peg$c7 = function(fullName) { return { fullName } }, peg$c8 = function() { return text() }, peg$c9 = /^[^\/@]/, peg$c10 = peg$classExpectation(["/", "@"], true, false), peg$c11 = /^[^\/]/, peg$c12 = peg$classExpectation(["/"], true, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } function text() { return input.substring(peg$savedPos, peg$currPos); } function location() { return peg$computeLocation(peg$savedPos, peg$currPos); } function expected(description, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildStructuredError( [peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location ); } function error(message, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildSimpleError(message, location); } function peg$literalExpectation(text, ignoreCase) { return { type: "literal", text: text, ignoreCase: ignoreCase }; } function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; } function peg$anyExpectation() { return { type: "any" }; } function peg$endExpectation() { return { type: "end" }; } function peg$otherExpectation(description) { return { type: "other", description: description }; } function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], p; if (details) { return details; } else { p = pos - 1; while (!peg$posDetailsCache[p]) { p--; } details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; } else { details.column++; } p++; } peg$posDetailsCache[pos] = details; return details; } } function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, line: startPosDetails.line, column: startPosDetails.column }, end: { offset: endPos, line: endPosDetails.line, column: endPosDetails.column } }; } function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } peg$maxFailExpected.push(expected); } function peg$buildSimpleError(message, location) { return new peg$SyntaxError(message, null, null, location); } function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError( peg$SyntaxError.buildMessage(expected, found), expected, found, location ); } function peg$parseresolution() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$parsespecifier(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s2 = peg$c0; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1); } } if (s2 !== peg$FAILED) { s3 = peg$parsespecifier(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c2(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parsespecifier(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c3(s1); } s0 = s1; } return s0; } function peg$parsespecifier() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$parsefullName(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 64) { s2 = peg$c4; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c5); } } if (s2 !== peg$FAILED) { s3 = peg$parsedescription(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c6(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parsefullName(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c7(s1); } s0 = s1; } return s0; } function peg$parsefullName() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 64) { s1 = peg$c4; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c5); } } if (s1 !== peg$FAILED) { s2 = peg$parseident(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s3 = peg$c0; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1); } } if (s3 !== peg$FAILED) { s4 = peg$parseident(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseident(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(); } s0 = s1; } return s0; } function peg$parseident() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c9.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c10); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c9.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c10); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(); } s0 = s1; return s0; } function peg$parsedescription() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c11.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c12); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c11.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c12); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(); } s0 = s1; return s0; } peg$result = peg$startRuleFunction(); if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) ); } } module.exports = { SyntaxError: peg$SyntaxError, parse: peg$parse }; /***/ }), /***/ 64399: /***/ ((module) => { "use strict"; /* * Generated by PEG.js 0.10.0. * * http://pegjs.org/ */ function peg$subclass(child, parent) { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } peg$subclass(peg$SyntaxError, Error); peg$SyntaxError.buildMessage = function(expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function(expectation) { return "\"" + literalEscape(expectation.text) + "\""; }, "class": function(expectation) { var escapedParts = "", i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function(expectation) { return "any character"; }, end: function(expectation) { return "end of input"; }, other: function(expectation) { return expectation.description; } }; function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } function literalEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/"/g, '\\"') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function classEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/\]/g, '\\]') .replace(/\^/g, '\\^') .replace(/-/g, '\\-') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } function describeExpected(expected) { var descriptions = new Array(expected.length), i, j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } descriptions.sort(); if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { descriptions[j] = descriptions[i]; j++; } } descriptions.length = j; } switch (descriptions.length) { case 1: return descriptions[0]; case 2: return descriptions[0] + " or " + descriptions[1]; default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; function peg$parse(input, options) { options = options !== void 0 ? options : {}; var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(line) { return line ? line : [] }, peg$c1 = function(command, type, then) { return [ { command, type } ].concat(then || []) }, peg$c2 = function(command, type) { return [ { command, type: type || ';' } ] }, peg$c3 = function(then) { return then }, peg$c4 = ";", peg$c5 = peg$literalExpectation(";", false), peg$c6 = "&", peg$c7 = peg$literalExpectation("&", false), peg$c8 = function(chain, then) { return then ? { chain, then } : { chain } }, peg$c9 = function(type, then) { return { type, line: then } }, peg$c10 = "&&", peg$c11 = peg$literalExpectation("&&", false), peg$c12 = "||", peg$c13 = peg$literalExpectation("||", false), peg$c14 = function(main, then) { return then ? { ...main, then } : main }, peg$c15 = function(type, then) { return { type, chain: then } }, peg$c16 = "|&", peg$c17 = peg$literalExpectation("|&", false), peg$c18 = "|", peg$c19 = peg$literalExpectation("|", false), peg$c20 = "=", peg$c21 = peg$literalExpectation("=", false), peg$c22 = function(name, arg) { return { name, args: [arg] } }, peg$c23 = function(name) { return { name, args: [] } }, peg$c24 = "(", peg$c25 = peg$literalExpectation("(", false), peg$c26 = ")", peg$c27 = peg$literalExpectation(")", false), peg$c28 = function(subshell, args) { return { type: `subshell`, subshell, args } }, peg$c29 = "{", peg$c30 = peg$literalExpectation("{", false), peg$c31 = "}", peg$c32 = peg$literalExpectation("}", false), peg$c33 = function(group, args) { return { type: `group`, group, args } }, peg$c34 = function(envs, args) { return { type: `command`, args, envs } }, peg$c35 = function(envs) { return { type: `envs`, envs } }, peg$c36 = function(args) { return args }, peg$c37 = function(arg) { return arg }, peg$c38 = /^[0-9]/, peg$c39 = peg$classExpectation([["0", "9"]], false, false), peg$c40 = function(fd, redirect, arg) { return { type: `redirection`, subtype: redirect, fd: fd !== null ? parseInt(fd) : null, args: [arg] } }, peg$c41 = ">>", peg$c42 = peg$literalExpectation(">>", false), peg$c43 = ">&", peg$c44 = peg$literalExpectation(">&", false), peg$c45 = ">", peg$c46 = peg$literalExpectation(">", false), peg$c47 = "<<<", peg$c48 = peg$literalExpectation("<<<", false), peg$c49 = "<&", peg$c50 = peg$literalExpectation("<&", false), peg$c51 = "<", peg$c52 = peg$literalExpectation("<", false), peg$c53 = function(segments) { return { type: `argument`, segments: [].concat(... segments) } }, peg$c54 = function(string) { return string }, peg$c55 = "'", peg$c56 = peg$literalExpectation("'", false), peg$c57 = function(text) { return [ { type: `text`, text } ] }, peg$c58 = "\"", peg$c59 = peg$literalExpectation("\"", false), peg$c60 = function(segments) { return segments }, peg$c61 = function(arithmetic) { return { type: `arithmetic`, arithmetic, quoted: true} }, peg$c62 = function(shell) { return { type: `shell`, shell, quoted: true } }, peg$c63 = function(variable) { return { type: `variable`, ...variable, quoted: true } }, peg$c64 = function(text) { return { type: `text`, text } }, peg$c65 = function(arithmetic) { return { type: `arithmetic`, arithmetic, quoted: false} }, peg$c66 = function(shell) { return { type: `shell`, shell, quoted: false } }, peg$c67 = function(variable) { return { type: `variable`, ...variable, quoted: false } }, peg$c68 = function(pattern) { return { type: `glob`, pattern } }, peg$c69 = "\\", peg$c70 = peg$literalExpectation("\\", false), peg$c71 = peg$anyExpectation(), peg$c72 = function(c) { return c }, peg$c73 = /^[^']/, peg$c74 = peg$classExpectation(["'"], true, false), peg$c75 = function(chars) { return chars.join(``) }, peg$c76 = /^[^$"]/, peg$c77 = peg$classExpectation(["$", "\""], true, false), peg$c78 = "-", peg$c79 = peg$literalExpectation("-", false), peg$c80 = "+", peg$c81 = peg$literalExpectation("+", false), peg$c82 = ".", peg$c83 = peg$literalExpectation(".", false), peg$c84 = function(sign, left, right) { return { type: `number`, value: (sign === '-' ? -1 : 1) * parseFloat(left.join(``) + `.` + right.join(``)) } }, peg$c85 = function(sign, value) { return { type: `number`, value: (sign === '-' ? -1 : 1) * parseInt(value.join(``)) } }, peg$c86 = function(variable) { return { type: `variable`, ...variable } }, peg$c87 = function(name) { return { type: `variable`, name } }, peg$c88 = function(value) { return value }, peg$c89 = "*", peg$c90 = peg$literalExpectation("*", false), peg$c91 = function(left, right) { return { type: `multiplication`, left, right } }, peg$c92 = "/", peg$c93 = peg$literalExpectation("/", false), peg$c94 = function(left, right) { return { type: `division`, left, right } }, peg$c95 = function(left, right) { return { type: `addition`, left, right } }, peg$c96 = function(left, right) { return { type: `subtraction`, left, right } }, peg$c97 = "$((", peg$c98 = peg$literalExpectation("$((", false), peg$c99 = "))", peg$c100 = peg$literalExpectation("))", false), peg$c101 = function(arithmetic) { return arithmetic }, peg$c102 = "$(", peg$c103 = peg$literalExpectation("$(", false), peg$c104 = function(command) { return command }, peg$c105 = "${", peg$c106 = peg$literalExpectation("${", false), peg$c107 = ":-", peg$c108 = peg$literalExpectation(":-", false), peg$c109 = function(name, arg) { return { name, defaultValue: arg } }, peg$c110 = ":-}", peg$c111 = peg$literalExpectation(":-}", false), peg$c112 = function(name) { return { name, defaultValue: [] } }, peg$c113 = function(name) { return { name } }, peg$c114 = "$", peg$c115 = peg$literalExpectation("$", false), peg$c116 = function(pattern) { return options.isGlobPattern(pattern) }, peg$c117 = function(pattern) { return pattern }, peg$c118 = /^[a-zA-Z0-9_]/, peg$c119 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), peg$c120 = function() { return text() }, peg$c121 = /^[$@*?#a-zA-Z0-9_\-]/, peg$c122 = peg$classExpectation(["$", "@", "*", "?", "#", ["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false), peg$c123 = /^[(){}<>$|&; \t"']/, peg$c124 = peg$classExpectation(["(", ")", "{", "}", "<", ">", "$", "|", "&", ";", " ", "\t", "\"", "'"], false, false), peg$c125 = /^[<>&; \t"']/, peg$c126 = peg$classExpectation(["<", ">", "&", ";", " ", "\t", "\"", "'"], false, false), peg$c127 = /^[ \t]/, peg$c128 = peg$classExpectation([" ", "\t"], false, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } function text() { return input.substring(peg$savedPos, peg$currPos); } function location() { return peg$computeLocation(peg$savedPos, peg$currPos); } function expected(description, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildStructuredError( [peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location ); } function error(message, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildSimpleError(message, location); } function peg$literalExpectation(text, ignoreCase) { return { type: "literal", text: text, ignoreCase: ignoreCase }; } function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; } function peg$anyExpectation() { return { type: "any" }; } function peg$endExpectation() { return { type: "end" }; } function peg$otherExpectation(description) { return { type: "other", description: description }; } function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], p; if (details) { return details; } else { p = pos - 1; while (!peg$posDetailsCache[p]) { p--; } details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; } else { details.column++; } p++; } peg$posDetailsCache[pos] = details; return details; } } function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, line: startPosDetails.line, column: startPosDetails.column }, end: { offset: endPos, line: endPosDetails.line, column: endPosDetails.column } }; } function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } peg$maxFailExpected.push(expected); } function peg$buildSimpleError(message, location) { return new peg$SyntaxError(message, null, null, location); } function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError( peg$SyntaxError.buildMessage(expected, found), expected, found, location ); } function peg$parseStart() { var s0, s1; s0 = peg$currPos; s1 = peg$parseShellLine(); if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c0(s1); } s0 = s1; return s0; } function peg$parseShellLine() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = peg$parseCommandLine(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { s3 = peg$parseShellLineType(); if (s3 !== peg$FAILED) { s4 = peg$parseShellLineThen(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c1(s1, s3, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseCommandLine(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { s3 = peg$parseShellLineType(); if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c2(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseShellLineThen() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseShellLine(); if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c3(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseShellLineType() { var s0; if (input.charCodeAt(peg$currPos) === 59) { s0 = peg$c4; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c5); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 38) { s0 = peg$c6; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c7); } } } return s0; } function peg$parseCommandLine() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseCommandChain(); if (s1 !== peg$FAILED) { s2 = peg$parseCommandLineThen(); if (s2 === peg$FAILED) { s2 = null; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(s1, s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseCommandLineThen() { var s0, s1, s2, s3, s4, s5, s6; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseCommandLineType(); if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { s4 = peg$parseCommandLine(); if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseS(); while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseS(); } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c9(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseCommandLineType() { var s0; if (input.substr(peg$currPos, 2) === peg$c10) { s0 = peg$c10; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c11); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c12) { s0 = peg$c12; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c13); } } } return s0; } function peg$parseCommandChain() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseCommand(); if (s1 !== peg$FAILED) { s2 = peg$parseCommandChainThen(); if (s2 === peg$FAILED) { s2 = null; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c14(s1, s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseCommandChainThen() { var s0, s1, s2, s3, s4, s5, s6; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseCommandChainType(); if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { s4 = peg$parseCommandChain(); if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseS(); while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseS(); } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c15(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseCommandChainType() { var s0; if (input.substr(peg$currPos, 2) === peg$c16) { s0 = peg$c16; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c17); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 124) { s0 = peg$c18; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c19); } } } return s0; } function peg$parseVariableAssignment() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parseEnvVariable(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c20; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c21); } } if (s2 !== peg$FAILED) { s3 = peg$parseStrictValueArgument(); if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c22(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseEnvVariable(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 61) { s2 = peg$c20; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c21); } } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c23(s1); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseCommand() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 40) { s2 = peg$c24; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c25); } } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { s4 = peg$parseShellLine(); if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseS(); while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseS(); } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s6 = peg$c26; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c27); } } if (s6 !== peg$FAILED) { s7 = []; s8 = peg$parseS(); while (s8 !== peg$FAILED) { s7.push(s8); s8 = peg$parseS(); } if (s7 !== peg$FAILED) { s8 = []; s9 = peg$parseRedirectArgument(); while (s9 !== peg$FAILED) { s8.push(s9); s9 = peg$parseRedirectArgument(); } if (s8 !== peg$FAILED) { s9 = []; s10 = peg$parseS(); while (s10 !== peg$FAILED) { s9.push(s10); s10 = peg$parseS(); } if (s9 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c28(s4, s8); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 123) { s2 = peg$c29; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c30); } } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { s4 = peg$parseShellLine(); if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseS(); while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseS(); } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 125) { s6 = peg$c31; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c32); } } if (s6 !== peg$FAILED) { s7 = []; s8 = peg$parseS(); while (s8 !== peg$FAILED) { s7.push(s8); s8 = peg$parseS(); } if (s7 !== peg$FAILED) { s8 = []; s9 = peg$parseRedirectArgument(); while (s9 !== peg$FAILED) { s8.push(s9); s9 = peg$parseRedirectArgument(); } if (s8 !== peg$FAILED) { s9 = []; s10 = peg$parseS(); while (s10 !== peg$FAILED) { s9.push(s10); s10 = peg$parseS(); } if (s9 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c33(s4, s8); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseVariableAssignment(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseVariableAssignment(); } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseArgument(); if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseArgument(); } } else { s4 = peg$FAILED; } if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseS(); while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseS(); } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c34(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseVariableAssignment(); if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseVariableAssignment(); } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c35(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } return s0; } function peg$parseCommandString() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseValueArgument(); if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseValueArgument(); } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseS(); while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseS(); } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c36(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseArgument() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseRedirectArgument(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c37(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseValueArgument(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c37(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseRedirectArgument() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { if (peg$c38.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s2 === peg$FAILED) { s2 = null; } if (s2 !== peg$FAILED) { s3 = peg$parseRedirectType(); if (s3 !== peg$FAILED) { s4 = peg$parseValueArgument(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c40(s2, s3, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseRedirectType() { var s0; if (input.substr(peg$currPos, 2) === peg$c41) { s0 = peg$c41; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c42); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c43) { s0 = peg$c43; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c44); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 62) { s0 = peg$c45; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c46); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 3) === peg$c47) { s0 = peg$c47; peg$currPos += 3; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c48); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c49) { s0 = peg$c49; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c50); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 60) { s0 = peg$c51; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c52); } } } } } } } return s0; } function peg$parseValueArgument() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parseS(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseS(); } if (s1 !== peg$FAILED) { s2 = peg$parseStrictValueArgument(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c37(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseStrictValueArgument() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parseArgumentSegment(); if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseArgumentSegment(); } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c53(s1); } s0 = s1; return s0; } function peg$parseArgumentSegment() { var s0, s1; s0 = peg$currPos; s1 = peg$parseSglQuoteString(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c54(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseDblQuoteString(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c54(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parsePlainString(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c54(s1); } s0 = s1; } } return s0; } function peg$parseSglQuoteString() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 39) { s1 = peg$c55; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c56); } } if (s1 !== peg$FAILED) { s2 = peg$parseSglQuoteStringText(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 39) { s3 = peg$c55; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c56); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c57(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseDblQuoteString() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c58; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c59); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseDblQuoteStringSegment(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseDblQuoteStringSegment(); } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c58; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c59); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c60(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsePlainString() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parsePlainStringSegment(); if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parsePlainStringSegment(); } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c60(s1); } s0 = s1; return s0; } function peg$parseDblQuoteStringSegment() { var s0, s1; s0 = peg$currPos; s1 = peg$parseArithmetic(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c61(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSubshell(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c62(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseVariable(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c63(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseDblQuoteStringText(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c64(s1); } s0 = s1; } } } return s0; } function peg$parsePlainStringSegment() { var s0, s1; s0 = peg$currPos; s1 = peg$parseArithmetic(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c65(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSubshell(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c66(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseVariable(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c67(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseGlob(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c68(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parsePlainStringText(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c64(s1); } s0 = s1; } } } } return s0; } function peg$parseSglQuoteStringText() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { if (peg$c73.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c74); } } } while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { if (peg$c73.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c74); } } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c75(s1); } s0 = s1; return s0; } function peg$parseDblQuoteStringText() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { if (peg$c76.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c77); } } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { if (peg$c76.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c77); } } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c75(s1); } s0 = s1; return s0; } function peg$parsePlainStringText() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { s2 = peg$currPos; s3 = peg$currPos; peg$silentFails++; s4 = peg$parseSpecialShellChars(); peg$silentFails--; if (s4 === peg$FAILED) { s3 = void 0; } else { peg$currPos = s3; s3 = peg$FAILED; } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { s3 = peg$c69; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c70); } } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { s2 = peg$currPos; s3 = peg$currPos; peg$silentFails++; s4 = peg$parseSpecialShellChars(); peg$silentFails--; if (s4 === peg$FAILED) { s3 = void 0; } else { peg$currPos = s3; s3 = peg$FAILED; } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c75(s1); } s0 = s1; return s0; } function peg$parseArithmeticPrimary() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { s1 = peg$c78; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c79); } } if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s1 = peg$c80; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c81); } } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; if (peg$c38.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); if (peg$c38.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s3 = peg$c82; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c83); } } if (s3 !== peg$FAILED) { s4 = []; if (peg$c38.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); if (peg$c38.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } } } else { s4 = peg$FAILED; } if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c84(s1, s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { s1 = peg$c78; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c79); } } if (s1 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s1 = peg$c80; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c81); } } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = []; if (peg$c38.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); if (peg$c38.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c85(s1, s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseVariable(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c86(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseIdentifier(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c87(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 40) { s1 = peg$c24; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c25); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { s3 = peg$parseArithmeticExpression(); if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s5 = peg$c26; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c27); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c88(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } return s0; } function peg$parseArithmeticTimesExpression() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parseArithmeticPrimary(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 42) { s3 = peg$c89; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c90); } } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { s5 = peg$parseArithmeticTimesExpression(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c91(s1, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseArithmeticPrimary(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 47) { s3 = peg$c92; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c93); } } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { s5 = peg$parseArithmeticTimesExpression(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c94(s1, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$parseArithmeticPrimary(); } } return s0; } function peg$parseArithmeticExpression() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parseArithmeticTimesExpression(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 43) { s3 = peg$c80; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c81); } } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { s5 = peg$parseArithmeticExpression(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c95(s1, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseArithmeticTimesExpression(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { s3 = peg$c78; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c79); } } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { s5 = peg$parseArithmeticExpression(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c96(s1, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$parseArithmeticTimesExpression(); } } return s0; } function peg$parseArithmetic() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; if (input.substr(peg$currPos, 3) === peg$c97) { s1 = peg$c97; peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c98); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseS(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseS(); } if (s2 !== peg$FAILED) { s3 = peg$parseArithmeticExpression(); if (s3 !== peg$FAILED) { s4 = []; s5 = peg$parseS(); while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$parseS(); } if (s4 !== peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c99) { s5 = peg$c99; peg$currPos += 2; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c100); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c101(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseSubshell() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c102) { s1 = peg$c102; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c103); } } if (s1 !== peg$FAILED) { s2 = peg$parseShellLine(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 41) { s3 = peg$c26; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c27); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c104(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseVariable() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c105) { s1 = peg$c105; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { s2 = peg$parseIdentifier(); if (s2 !== peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c107) { s3 = peg$c107; peg$currPos += 2; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c108); } } if (s3 !== peg$FAILED) { s4 = peg$parseCommandString(); if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 125) { s5 = peg$c31; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c32); } } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c109(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c105) { s1 = peg$c105; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { s2 = peg$parseIdentifier(); if (s2 !== peg$FAILED) { if (input.substr(peg$currPos, 3) === peg$c110) { s3 = peg$c110; peg$currPos += 3; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c111); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c112(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c105) { s1 = peg$c105; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { s2 = peg$parseIdentifier(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 125) { s3 = peg$c31; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c32); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c113(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 36) { s1 = peg$c114; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c115); } } if (s1 !== peg$FAILED) { s2 = peg$parseIdentifier(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c113(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } return s0; } function peg$parseGlob() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseGlobText(); if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; s2 = peg$c116(s1); if (s2) { s2 = void 0; } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c117(s1); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseGlobText() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = []; s2 = peg$currPos; s3 = peg$currPos; peg$silentFails++; s4 = peg$parseGlobSpecialShellChars(); peg$silentFails--; if (s4 === peg$FAILED) { s3 = void 0; } else { peg$currPos = s3; s3 = peg$FAILED; } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$currPos; s3 = peg$currPos; peg$silentFails++; s4 = peg$parseGlobSpecialShellChars(); peg$silentFails--; if (s4 === peg$FAILED) { s3 = void 0; } else { peg$currPos = s3; s3 = peg$FAILED; } if (s3 !== peg$FAILED) { if (input.length > peg$currPos) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s4 !== peg$FAILED) { peg$savedPos = s2; s3 = peg$c72(s4); s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c75(s1); } s0 = s1; return s0; } function peg$parseEnvVariable() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c118.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c119); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c118.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c119); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c120(); } s0 = s1; return s0; } function peg$parseIdentifier() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c121.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c122); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c121.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c122); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c120(); } s0 = s1; return s0; } function peg$parseSpecialShellChars() { var s0; if (peg$c123.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c124); } } return s0; } function peg$parseGlobSpecialShellChars() { var s0; if (peg$c125.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c126); } } return s0; } function peg$parseS() { var s0, s1; s0 = []; if (peg$c127.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c128); } } if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); if (peg$c127.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c128); } } } } else { s0 = peg$FAILED; } return s0; } peg$result = peg$startRuleFunction(); if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) ); } } module.exports = { SyntaxError: peg$SyntaxError, parse: peg$parse }; /***/ }), /***/ 59433: /***/ ((module) => { "use strict"; /* * Generated by PEG.js 0.10.0. * * http://pegjs.org/ */ function peg$subclass(child, parent) { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } peg$subclass(peg$SyntaxError, Error); peg$SyntaxError.buildMessage = function(expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function(expectation) { return "\"" + literalEscape(expectation.text) + "\""; }, "class": function(expectation) { var escapedParts = "", i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function(expectation) { return "any character"; }, end: function(expectation) { return "end of input"; }, other: function(expectation) { return expectation.description; } }; function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } function literalEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/"/g, '\\"') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function classEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/\]/g, '\\]') .replace(/\^/g, '\\^') .replace(/-/g, '\\-') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } function describeExpected(expected) { var descriptions = new Array(expected.length), i, j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } descriptions.sort(); if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { descriptions[j] = descriptions[i]; j++; } } descriptions.length = j; } switch (descriptions.length) { case 1: return descriptions[0]; case 2: return descriptions[0] + " or " + descriptions[1]; default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; function peg$parse(input, options) { options = options !== void 0 ? options : {}; var peg$FAILED = {}, peg$startRuleFunctions = { Start: peg$parseStart }, peg$startRuleFunction = peg$parseStart, peg$c0 = function(statements) { return [].concat(... statements) }, peg$c1 = "-", peg$c2 = peg$literalExpectation("-", false), peg$c3 = function(value) { return value }, peg$c4 = function(statements) { return Object.assign({}, ... statements) }, peg$c5 = "#", peg$c6 = peg$literalExpectation("#", false), peg$c7 = peg$anyExpectation(), peg$c8 = function() { return {} }, peg$c9 = ":", peg$c10 = peg$literalExpectation(":", false), peg$c11 = function(property, value) { return {[property]: value} }, peg$c12 = ",", peg$c13 = peg$literalExpectation(",", false), peg$c14 = function(property, other) { return other }, peg$c15 = function(property, others, value) { return Object.assign({}, ... [property].concat(others).map(property => ({[property]: value}))) }, peg$c16 = function(statements) { return statements }, peg$c17 = function(expression) { return expression }, peg$c18 = peg$otherExpectation("correct indentation"), peg$c19 = " ", peg$c20 = peg$literalExpectation(" ", false), peg$c21 = function(spaces) { return spaces.length === indentLevel * INDENT_STEP }, peg$c22 = function(spaces) { return spaces.length === (indentLevel + 1) * INDENT_STEP }, peg$c23 = function() { indentLevel++; return true }, peg$c24 = function() { indentLevel--; return true }, peg$c25 = function() { return text() }, peg$c26 = peg$otherExpectation("pseudostring"), peg$c27 = /^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/, peg$c28 = peg$classExpectation(["\r", "\n", "\t", " ", "?", ":", ",", "]", "[", "{", "}", "#", "&", "*", "!", "|", ">", "'", "\"", "%", "@", "`", "-"], true, false), peg$c29 = /^[^\r\n\t ,\][{}:#"']/, peg$c30 = peg$classExpectation(["\r", "\n", "\t", " ", ",", "]", "[", "{", "}", ":", "#", "\"", "'"], true, false), peg$c31 = function() { return text().replace(/^ *| *$/g, '') }, peg$c32 = "--", peg$c33 = peg$literalExpectation("--", false), peg$c34 = /^[a-zA-Z\/0-9]/, peg$c35 = peg$classExpectation([["a", "z"], ["A", "Z"], "/", ["0", "9"]], false, false), peg$c36 = /^[^\r\n\t :,]/, peg$c37 = peg$classExpectation(["\r", "\n", "\t", " ", ":", ","], true, false), peg$c38 = "null", peg$c39 = peg$literalExpectation("null", false), peg$c40 = function() { return null }, peg$c41 = "true", peg$c42 = peg$literalExpectation("true", false), peg$c43 = function() { return true }, peg$c44 = "false", peg$c45 = peg$literalExpectation("false", false), peg$c46 = function() { return false }, peg$c47 = peg$otherExpectation("string"), peg$c48 = "\"", peg$c49 = peg$literalExpectation("\"", false), peg$c50 = function() { return "" }, peg$c51 = function(chars) { return chars }, peg$c52 = function(chars) { return chars.join(``) }, peg$c53 = /^[^"\\\0-\x1F\x7F]/, peg$c54 = peg$classExpectation(["\"", "\\", ["\0", "\x1F"], "\x7F"], true, false), peg$c55 = "\\\"", peg$c56 = peg$literalExpectation("\\\"", false), peg$c57 = function() { return `"` }, peg$c58 = "\\\\", peg$c59 = peg$literalExpectation("\\\\", false), peg$c60 = function() { return `\\` }, peg$c61 = "\\/", peg$c62 = peg$literalExpectation("\\/", false), peg$c63 = function() { return `/` }, peg$c64 = "\\b", peg$c65 = peg$literalExpectation("\\b", false), peg$c66 = function() { return `\b` }, peg$c67 = "\\f", peg$c68 = peg$literalExpectation("\\f", false), peg$c69 = function() { return `\f` }, peg$c70 = "\\n", peg$c71 = peg$literalExpectation("\\n", false), peg$c72 = function() { return `\n` }, peg$c73 = "\\r", peg$c74 = peg$literalExpectation("\\r", false), peg$c75 = function() { return `\r` }, peg$c76 = "\\t", peg$c77 = peg$literalExpectation("\\t", false), peg$c78 = function() { return `\t` }, peg$c79 = "\\u", peg$c80 = peg$literalExpectation("\\u", false), peg$c81 = function(h1, h2, h3, h4) { return String.fromCharCode(parseInt(`0x${h1}${h2}${h3}${h4}`)); }, peg$c82 = /^[0-9a-fA-F]/, peg$c83 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false), peg$c84 = peg$otherExpectation("blank space"), peg$c85 = /^[ \t]/, peg$c86 = peg$classExpectation([" ", "\t"], false, false), peg$c87 = peg$otherExpectation("white space"), peg$c88 = /^[ \t\n\r]/, peg$c89 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false), peg$c90 = "\r\n", peg$c91 = peg$literalExpectation("\r\n", false), peg$c92 = "\n", peg$c93 = peg$literalExpectation("\n", false), peg$c94 = "\r", peg$c95 = peg$literalExpectation("\r", false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } function text() { return input.substring(peg$savedPos, peg$currPos); } function location() { return peg$computeLocation(peg$savedPos, peg$currPos); } function expected(description, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildStructuredError( [peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location ); } function error(message, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildSimpleError(message, location); } function peg$literalExpectation(text, ignoreCase) { return { type: "literal", text: text, ignoreCase: ignoreCase }; } function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; } function peg$anyExpectation() { return { type: "any" }; } function peg$endExpectation() { return { type: "end" }; } function peg$otherExpectation(description) { return { type: "other", description: description }; } function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], p; if (details) { return details; } else { p = pos - 1; while (!peg$posDetailsCache[p]) { p--; } details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; } else { details.column++; } p++; } peg$posDetailsCache[pos] = details; return details; } } function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, line: startPosDetails.line, column: startPosDetails.column }, end: { offset: endPos, line: endPosDetails.line, column: endPosDetails.column } }; } function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } peg$maxFailExpected.push(expected); } function peg$buildSimpleError(message, location) { return new peg$SyntaxError(message, null, null, location); } function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError( peg$SyntaxError.buildMessage(expected, found), expected, found, location ); } function peg$parseStart() { var s0; s0 = peg$parsePropertyStatements(); return s0; } function peg$parseItemStatements() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parseItemStatement(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseItemStatement(); } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c0(s1); } s0 = s1; return s0; } function peg$parseItemStatement() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = peg$parseSamedent(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { s2 = peg$c1; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c2); } } if (s2 !== peg$FAILED) { s3 = peg$parseB(); if (s3 !== peg$FAILED) { s4 = peg$parseExpression(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c3(s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsePropertyStatements() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parsePropertyStatement(); while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parsePropertyStatement(); } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c4(s1); } s0 = s1; return s0; } function peg$parsePropertyStatement() { var s0, s1, s2, s3, s4, s5, s6, s7, s8; s0 = peg$currPos; s1 = peg$parseB(); if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = peg$currPos; if (input.charCodeAt(peg$currPos) === 35) { s3 = peg$c5; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c6); } } if (s3 !== peg$FAILED) { s4 = []; s5 = peg$currPos; s6 = peg$currPos; peg$silentFails++; s7 = peg$parseEOL(); peg$silentFails--; if (s7 === peg$FAILED) { s6 = void 0; } else { peg$currPos = s6; s6 = peg$FAILED; } if (s6 !== peg$FAILED) { if (input.length > peg$currPos) { s7 = input.charAt(peg$currPos); peg$currPos++; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c7); } } if (s7 !== peg$FAILED) { s6 = [s6, s7]; s5 = s6; } else { peg$currPos = s5; s5 = peg$FAILED; } } else { peg$currPos = s5; s5 = peg$FAILED; } if (s5 !== peg$FAILED) { while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$currPos; s6 = peg$currPos; peg$silentFails++; s7 = peg$parseEOL(); peg$silentFails--; if (s7 === peg$FAILED) { s6 = void 0; } else { peg$currPos = s6; s6 = peg$FAILED; } if (s6 !== peg$FAILED) { if (input.length > peg$currPos) { s7 = input.charAt(peg$currPos); peg$currPos++; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c7); } } if (s7 !== peg$FAILED) { s6 = [s6, s7]; s5 = s6; } else { peg$currPos = s5; s5 = peg$FAILED; } } else { peg$currPos = s5; s5 = peg$FAILED; } } } else { s4 = peg$FAILED; } if (s4 !== peg$FAILED) { s3 = [s3, s4]; s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { s2 = null; } if (s2 !== peg$FAILED) { s3 = []; s4 = peg$parseEOL_ANY(); if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$parseEOL_ANY(); } } else { s3 = peg$FAILED; } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c8(); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSamedent(); if (s1 !== peg$FAILED) { s2 = peg$parseName(); if (s2 !== peg$FAILED) { s3 = peg$parseB(); if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 58) { s4 = peg$c9; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c10); } } if (s4 !== peg$FAILED) { s5 = peg$parseB(); if (s5 === peg$FAILED) { s5 = null; } if (s5 !== peg$FAILED) { s6 = peg$parseExpression(); if (s6 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c11(s2, s6); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSamedent(); if (s1 !== peg$FAILED) { s2 = peg$parseLegacyName(); if (s2 !== peg$FAILED) { s3 = peg$parseB(); if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 58) { s4 = peg$c9; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c10); } } if (s4 !== peg$FAILED) { s5 = peg$parseB(); if (s5 === peg$FAILED) { s5 = null; } if (s5 !== peg$FAILED) { s6 = peg$parseExpression(); if (s6 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c11(s2, s6); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSamedent(); if (s1 !== peg$FAILED) { s2 = peg$parseLegacyName(); if (s2 !== peg$FAILED) { s3 = peg$parseB(); if (s3 !== peg$FAILED) { s4 = peg$parseLegacyLiteral(); if (s4 !== peg$FAILED) { s5 = []; s6 = peg$parseEOL_ANY(); if (s6 !== peg$FAILED) { while (s6 !== peg$FAILED) { s5.push(s6); s6 = peg$parseEOL_ANY(); } } else { s5 = peg$FAILED; } if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c11(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseSamedent(); if (s1 !== peg$FAILED) { s2 = peg$parseLegacyName(); if (s2 !== peg$FAILED) { s3 = []; s4 = peg$currPos; s5 = peg$parseB(); if (s5 === peg$FAILED) { s5 = null; } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s6 = peg$c12; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c13); } } if (s6 !== peg$FAILED) { s7 = peg$parseB(); if (s7 === peg$FAILED) { s7 = null; } if (s7 !== peg$FAILED) { s8 = peg$parseLegacyName(); if (s8 !== peg$FAILED) { peg$savedPos = s4; s5 = peg$c14(s2, s8); s4 = s5; } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } if (s4 !== peg$FAILED) { while (s4 !== peg$FAILED) { s3.push(s4); s4 = peg$currPos; s5 = peg$parseB(); if (s5 === peg$FAILED) { s5 = null; } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 44) { s6 = peg$c12; peg$currPos++; } else { s6 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c13); } } if (s6 !== peg$FAILED) { s7 = peg$parseB(); if (s7 === peg$FAILED) { s7 = null; } if (s7 !== peg$FAILED) { s8 = peg$parseLegacyName(); if (s8 !== peg$FAILED) { peg$savedPos = s4; s5 = peg$c14(s2, s8); s4 = s5; } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } } else { peg$currPos = s4; s4 = peg$FAILED; } } } else { s3 = peg$FAILED; } if (s3 !== peg$FAILED) { s4 = peg$parseB(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 58) { s5 = peg$c9; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c10); } } if (s5 !== peg$FAILED) { s6 = peg$parseB(); if (s6 === peg$FAILED) { s6 = null; } if (s6 !== peg$FAILED) { s7 = peg$parseExpression(); if (s7 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c15(s2, s3, s7); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } return s0; } function peg$parseExpression() { var s0, s1, s2, s3, s4, s5, s6; s0 = peg$currPos; s1 = peg$currPos; peg$silentFails++; s2 = peg$currPos; s3 = peg$parseEOL(); if (s3 !== peg$FAILED) { s4 = peg$parseExtradent(); if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 45) { s5 = peg$c1; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c2); } } if (s5 !== peg$FAILED) { s6 = peg$parseB(); if (s6 !== peg$FAILED) { s3 = [s3, s4, s5, s6]; s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } peg$silentFails--; if (s2 !== peg$FAILED) { peg$currPos = s1; s1 = void 0; } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { s2 = peg$parseEOL_ANY(); if (s2 !== peg$FAILED) { s3 = peg$parseIndent(); if (s3 !== peg$FAILED) { s4 = peg$parseItemStatements(); if (s4 !== peg$FAILED) { s5 = peg$parseDedent(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c16(s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseEOL(); if (s1 !== peg$FAILED) { s2 = peg$parseIndent(); if (s2 !== peg$FAILED) { s3 = peg$parsePropertyStatements(); if (s3 !== peg$FAILED) { s4 = peg$parseDedent(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c16(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseLiteral(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseEOL_ANY(); if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseEOL_ANY(); } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c17(s1); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } return s0; } function peg$parseSamedent() { var s0, s1, s2; peg$silentFails++; s0 = peg$currPos; s1 = []; if (input.charCodeAt(peg$currPos) === 32) { s2 = peg$c19; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c20); } } while (s2 !== peg$FAILED) { s1.push(s2); if (input.charCodeAt(peg$currPos) === 32) { s2 = peg$c19; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c20); } } } if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; s2 = peg$c21(s1); if (s2) { s2 = void 0; } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c18); } } return s0; } function peg$parseExtradent() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (input.charCodeAt(peg$currPos) === 32) { s2 = peg$c19; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c20); } } while (s2 !== peg$FAILED) { s1.push(s2); if (input.charCodeAt(peg$currPos) === 32) { s2 = peg$c19; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c20); } } } if (s1 !== peg$FAILED) { peg$savedPos = peg$currPos; s2 = peg$c22(s1); if (s2) { s2 = void 0; } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseIndent() { var s0; peg$savedPos = peg$currPos; s0 = peg$c23(); if (s0) { s0 = void 0; } else { s0 = peg$FAILED; } return s0; } function peg$parseDedent() { var s0; peg$savedPos = peg$currPos; s0 = peg$c24(); if (s0) { s0 = void 0; } else { s0 = peg$FAILED; } return s0; } function peg$parseName() { var s0; s0 = peg$parsestring(); if (s0 === peg$FAILED) { s0 = peg$parsepseudostring(); } return s0; } function peg$parseLegacyName() { var s0, s1, s2; s0 = peg$parsestring(); if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parsepseudostringLegacy(); if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parsepseudostringLegacy(); } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c25(); } s0 = s1; } return s0; } function peg$parseLiteral() { var s0; s0 = peg$parsenull(); if (s0 === peg$FAILED) { s0 = peg$parseboolean(); if (s0 === peg$FAILED) { s0 = peg$parsestring(); if (s0 === peg$FAILED) { s0 = peg$parsepseudostring(); } } } return s0; } function peg$parseLegacyLiteral() { var s0; s0 = peg$parsenull(); if (s0 === peg$FAILED) { s0 = peg$parsestring(); if (s0 === peg$FAILED) { s0 = peg$parsepseudostringLegacy(); } } return s0; } function peg$parsepseudostring() { var s0, s1, s2, s3, s4, s5; peg$silentFails++; s0 = peg$currPos; if (peg$c27.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c28); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parseB(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { if (peg$c29.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c30); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } } else { peg$currPos = s3; s3 = peg$FAILED; } while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parseB(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { if (peg$c29.test(input.charAt(peg$currPos))) { s5 = input.charAt(peg$currPos); peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c30); } } if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } } else { peg$currPos = s3; s3 = peg$FAILED; } } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c31(); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c26); } } return s0; } function peg$parsepseudostringLegacy() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c32) { s1 = peg$c32; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c33); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { if (peg$c34.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c35); } } if (s2 !== peg$FAILED) { s3 = []; if (peg$c36.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c37); } } while (s4 !== peg$FAILED) { s3.push(s4); if (peg$c36.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c37); } } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c31(); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsenull() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 4) === peg$c38) { s1 = peg$c38; peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c40(); } s0 = s1; return s0; } function peg$parseboolean() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 4) === peg$c41) { s1 = peg$c41; peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c42); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c43(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 5) === peg$c44) { s1 = peg$c44; peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c45); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c46(); } s0 = s1; } return s0; } function peg$parsestring() { var s0, s1, s2, s3; peg$silentFails++; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c48; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c49); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s2 = peg$c48; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c49); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c50(); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 34) { s1 = peg$c48; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c49); } } if (s1 !== peg$FAILED) { s2 = peg$parsechars(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { s3 = peg$c48; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c49); } } if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c51(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c47); } } return s0; } function peg$parsechars() { var s0, s1, s2; s0 = peg$currPos; s1 = []; s2 = peg$parsechar(); if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parsechar(); } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c52(s1); } s0 = s1; return s0; } function peg$parsechar() { var s0, s1, s2, s3, s4, s5; if (peg$c53.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c54); } } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c55) { s1 = peg$c55; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c56); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c57(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c58) { s1 = peg$c58; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c59); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c60(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c61) { s1 = peg$c61; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c62); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c63(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c64) { s1 = peg$c64; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c65); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c66(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c67) { s1 = peg$c67; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c68); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c69(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c70) { s1 = peg$c70; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c71); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c72(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c73) { s1 = peg$c73; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c74); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c75(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c76) { s1 = peg$c76; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c77); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c78(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 2) === peg$c79) { s1 = peg$c79; peg$currPos += 2; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c80); } } if (s1 !== peg$FAILED) { s2 = peg$parsehexDigit(); if (s2 !== peg$FAILED) { s3 = peg$parsehexDigit(); if (s3 !== peg$FAILED) { s4 = peg$parsehexDigit(); if (s4 !== peg$FAILED) { s5 = peg$parsehexDigit(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c81(s2, s3, s4, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } } } } } } return s0; } function peg$parsehexDigit() { var s0; if (peg$c82.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c83); } } return s0; } function peg$parseB() { var s0, s1; peg$silentFails++; s0 = []; if (peg$c85.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); if (peg$c85.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c86); } } } } else { s0 = peg$FAILED; } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c84); } } return s0; } function peg$parseS() { var s0, s1; peg$silentFails++; s0 = []; if (peg$c88.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c89); } } if (s1 !== peg$FAILED) { while (s1 !== peg$FAILED) { s0.push(s1); if (peg$c88.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c89); } } } } else { s0 = peg$FAILED; } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c87); } } return s0; } function peg$parseEOL_ANY() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parseEOL(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$currPos; s4 = peg$parseB(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { s5 = peg$parseEOL(); if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } } else { peg$currPos = s3; s3 = peg$FAILED; } while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$currPos; s4 = peg$parseB(); if (s4 === peg$FAILED) { s4 = null; } if (s4 !== peg$FAILED) { s5 = peg$parseEOL(); if (s5 !== peg$FAILED) { s4 = [s4, s5]; s3 = s4; } else { peg$currPos = s3; s3 = peg$FAILED; } } else { peg$currPos = s3; s3 = peg$FAILED; } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseEOL() { var s0; if (input.substr(peg$currPos, 2) === peg$c90) { s0 = peg$c90; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c91); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10) { s0 = peg$c92; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c93); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 13) { s0 = peg$c94; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c95); } } } } return s0; } const INDENT_STEP = 2; let indentLevel = 0; peg$result = peg$startRuleFunction(); if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) ); } } module.exports = { SyntaxError: peg$SyntaxError, parse: peg$parse }; /***/ }), /***/ 21717: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringifySyml = exports.parseSyml = exports.stringifyResolution = exports.parseResolution = exports.stringifyValueArgument = exports.stringifyShellLine = exports.stringifyRedirectArgument = exports.stringifyEnvSegment = exports.stringifyCommandLineThen = exports.stringifyCommandLine = exports.stringifyCommandChainThen = exports.stringifyCommandChain = exports.stringifyCommand = exports.stringifyArithmeticExpression = exports.stringifyArgumentSegment = exports.stringifyArgument = exports.stringifyShell = exports.parseShell = void 0; var shell_1 = __webpack_require__(86430); Object.defineProperty(exports, "parseShell", ({ enumerable: true, get: function () { return shell_1.parseShell; } })); Object.defineProperty(exports, "stringifyShell", ({ enumerable: true, get: function () { return shell_1.stringifyShell; } })); Object.defineProperty(exports, "stringifyArgument", ({ enumerable: true, get: function () { return shell_1.stringifyArgument; } })); Object.defineProperty(exports, "stringifyArgumentSegment", ({ enumerable: true, get: function () { return shell_1.stringifyArgumentSegment; } })); Object.defineProperty(exports, "stringifyArithmeticExpression", ({ enumerable: true, get: function () { return shell_1.stringifyArithmeticExpression; } })); Object.defineProperty(exports, "stringifyCommand", ({ enumerable: true, get: function () { return shell_1.stringifyCommand; } })); Object.defineProperty(exports, "stringifyCommandChain", ({ enumerable: true, get: function () { return shell_1.stringifyCommandChain; } })); Object.defineProperty(exports, "stringifyCommandChainThen", ({ enumerable: true, get: function () { return shell_1.stringifyCommandChainThen; } })); Object.defineProperty(exports, "stringifyCommandLine", ({ enumerable: true, get: function () { return shell_1.stringifyCommandLine; } })); Object.defineProperty(exports, "stringifyCommandLineThen", ({ enumerable: true, get: function () { return shell_1.stringifyCommandLineThen; } })); Object.defineProperty(exports, "stringifyEnvSegment", ({ enumerable: true, get: function () { return shell_1.stringifyEnvSegment; } })); Object.defineProperty(exports, "stringifyRedirectArgument", ({ enumerable: true, get: function () { return shell_1.stringifyRedirectArgument; } })); Object.defineProperty(exports, "stringifyShellLine", ({ enumerable: true, get: function () { return shell_1.stringifyShellLine; } })); Object.defineProperty(exports, "stringifyValueArgument", ({ enumerable: true, get: function () { return shell_1.stringifyValueArgument; } })); var resolution_1 = __webpack_require__(88761); Object.defineProperty(exports, "parseResolution", ({ enumerable: true, get: function () { return resolution_1.parseResolution; } })); Object.defineProperty(exports, "stringifyResolution", ({ enumerable: true, get: function () { return resolution_1.stringifyResolution; } })); var syml_1 = __webpack_require__(70678); Object.defineProperty(exports, "parseSyml", ({ enumerable: true, get: function () { return syml_1.parseSyml; } })); Object.defineProperty(exports, "stringifySyml", ({ enumerable: true, get: function () { return syml_1.stringifySyml; } })); /***/ }), /***/ 88761: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringifyResolution = exports.parseResolution = void 0; const resolution_1 = __webpack_require__(92460); function parseResolution(source) { const legacyResolution = source.match(/^\*{1,2}\/(.*)/); if (legacyResolution) throw new Error(`The override for '${source}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${legacyResolution[1]}' instead.`); try { return resolution_1.parse(source); } catch (error) { if (error.location) error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); throw error; } } exports.parseResolution = parseResolution; function stringifyResolution(resolution) { let str = ``; if (resolution.from) { str += resolution.from.fullName; if (resolution.from.description) str += `@${resolution.from.description}`; str += `/`; } str += resolution.descriptor.fullName; if (resolution.descriptor.description) str += `@${resolution.descriptor.description}`; return str; } exports.stringifyResolution = stringifyResolution; /***/ }), /***/ 86430: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringifyShell = exports.stringifyArithmeticExpression = exports.stringifyArgumentSegment = exports.stringifyValueArgument = exports.stringifyRedirectArgument = exports.stringifyArgument = exports.stringifyEnvSegment = exports.stringifyCommand = exports.stringifyCommandChainThen = exports.stringifyCommandChain = exports.stringifyCommandLineThen = exports.stringifyCommandLine = exports.stringifyShellLine = exports.parseShell = void 0; const shell_1 = __webpack_require__(64399); function parseShell(source, options = { isGlobPattern: () => false }) { try { return shell_1.parse(source, options); } catch (error) { if (error.location) error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); throw error; } } exports.parseShell = parseShell; function stringifyShellLine(shellLine, { endSemicolon = false } = {}) { return shellLine .map(({ command, type }, index) => `${stringifyCommandLine(command)}${type === `;` ? (index !== shellLine.length - 1 || endSemicolon ? `;` : ``) : ` &`}`) .join(` `); } exports.stringifyShellLine = stringifyShellLine; exports.stringifyShell = stringifyShellLine; function stringifyCommandLine(commandLine) { return `${stringifyCommandChain(commandLine.chain)}${commandLine.then ? ` ${stringifyCommandLineThen(commandLine.then)}` : ``}`; } exports.stringifyCommandLine = stringifyCommandLine; function stringifyCommandLineThen(commandLineThen) { return `${commandLineThen.type} ${stringifyCommandLine(commandLineThen.line)}`; } exports.stringifyCommandLineThen = stringifyCommandLineThen; function stringifyCommandChain(commandChain) { return `${stringifyCommand(commandChain)}${commandChain.then ? ` ${stringifyCommandChainThen(commandChain.then)}` : ``}`; } exports.stringifyCommandChain = stringifyCommandChain; function stringifyCommandChainThen(commandChainThen) { return `${commandChainThen.type} ${stringifyCommandChain(commandChainThen.chain)}`; } exports.stringifyCommandChainThen = stringifyCommandChainThen; function stringifyCommand(command) { switch (command.type) { case `command`: return `${command.envs.length > 0 ? `${command.envs.map(env => stringifyEnvSegment(env)).join(` `)} ` : ``}${command.args.map(argument => stringifyArgument(argument)).join(` `)}`; case `subshell`: return `(${stringifyShellLine(command.subshell)})${command.args.length > 0 ? ` ${command.args.map(argument => stringifyRedirectArgument(argument)).join(` `)}` : ``}`; case `group`: return `{ ${stringifyShellLine(command.group, { /* Bash compat */ endSemicolon: true })} }${command.args.length > 0 ? ` ${command.args.map(argument => stringifyRedirectArgument(argument)).join(` `)}` : ``}`; case `envs`: return command.envs.map(env => stringifyEnvSegment(env)).join(` `); default: throw new Error(`Unsupported command type: "${command.type}"`); } } exports.stringifyCommand = stringifyCommand; function stringifyEnvSegment(envSegment) { return `${envSegment.name}=${envSegment.args[0] ? stringifyValueArgument(envSegment.args[0]) : ``}`; } exports.stringifyEnvSegment = stringifyEnvSegment; function stringifyArgument(argument) { switch (argument.type) { case `redirection`: return stringifyRedirectArgument(argument); case `argument`: return stringifyValueArgument(argument); default: throw new Error(`Unsupported argument type: "${argument.type}"`); } } exports.stringifyArgument = stringifyArgument; function stringifyRedirectArgument(argument) { return `${argument.subtype} ${argument.args.map(argument => stringifyValueArgument(argument)).join(` `)}`; } exports.stringifyRedirectArgument = stringifyRedirectArgument; function stringifyValueArgument(argument) { return argument.segments.map(segment => stringifyArgumentSegment(segment)).join(``); } exports.stringifyValueArgument = stringifyValueArgument; function stringifyArgumentSegment(argumentSegment) { const doubleQuoteIfRequested = (string, quote) => quote ? `"${string}"` : string; const quoteIfNeeded = (string) => { if (!string.match(/[(){}<>$|&; \t"']/)) return string; if (!string.match(/[$"]/)) return `"${string}"`; return `'${string.replace(/[']/g, `\\'`)}'`; }; switch (argumentSegment.type) { case `text`: return quoteIfNeeded(argumentSegment.text); case `glob`: return argumentSegment.pattern; case `shell`: return doubleQuoteIfRequested(`\${${stringifyShellLine(argumentSegment.shell)}}`, argumentSegment.quoted); case `variable`: return doubleQuoteIfRequested(typeof argumentSegment.defaultValue === `undefined` ? `\${${argumentSegment.name}}` : argumentSegment.defaultValue.length === 0 ? `\${${argumentSegment.name}:-}` : `\${${argumentSegment.name}:-${argumentSegment.defaultValue.map(argument => stringifyValueArgument(argument)).join(` `)}}`, argumentSegment.quoted); case `arithmetic`: return `$(( ${stringifyArithmeticExpression(argumentSegment.arithmetic)} ))`; default: throw new Error(`Unsupported argument segment type: "${argumentSegment.type}"`); } } exports.stringifyArgumentSegment = stringifyArgumentSegment; function stringifyArithmeticExpression(argument) { const getOperator = (type) => { switch (type) { case `addition`: return `+`; case `subtraction`: return `-`; case `multiplication`: return `*`; case `division`: return `/`; default: throw new Error(`Can't extract operator from arithmetic expression of type "${type}"`); } }; const parenthesizeIfRequested = (string, parenthesize) => parenthesize ? `( ${string} )` : string; const stringifyAndParenthesizeIfNeeded = (expression) => // Right now we parenthesize all arithmetic operator expressions because it's easier parenthesizeIfRequested(stringifyArithmeticExpression(expression), ![`number`, `variable`].includes(expression.type)); switch (argument.type) { case `number`: return String(argument.value); case `variable`: return argument.name; default: return `${stringifyAndParenthesizeIfNeeded(argument.left)} ${getOperator(argument.type)} ${stringifyAndParenthesizeIfNeeded(argument.right)}`; } } exports.stringifyArithmeticExpression = stringifyArithmeticExpression; /***/ }), /***/ 70678: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.parseSyml = exports.stringifySyml = exports.PreserveOrdering = void 0; const js_yaml_1 = __webpack_require__(93320); const syml_1 = __webpack_require__(59433); const simpleStringPattern = /^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/; // The following keys will always be stored at the top of the object, in the // specified order. It's not fair but life isn't fair either. const specialObjectKeys = [`__metadata`, `version`, `resolution`, `dependencies`, `peerDependencies`, `dependenciesMeta`, `peerDependenciesMeta`, `binaries`]; class PreserveOrdering { constructor(data) { this.data = data; } } exports.PreserveOrdering = PreserveOrdering; function stringifyString(value) { if (value.match(simpleStringPattern)) { return value; } else { return JSON.stringify(value); } } function isRemovableField(value) { if (typeof value === `undefined`) return true; if (typeof value === `object` && value !== null) return Object.keys(value).every(key => isRemovableField(value[key])); return false; } function stringifyValue(value, indentLevel, newLineIfObject) { if (value === null) return `null\n`; if (typeof value === `number` || typeof value === `boolean`) return `${value.toString()}\n`; if (typeof value === `string`) return `${stringifyString(value)}\n`; if (Array.isArray(value)) { if (value.length === 0) return `[]\n`; const indent = ` `.repeat(indentLevel); const serialized = value.map(sub => { return `${indent}- ${stringifyValue(sub, indentLevel + 1, false)}`; }).join(``); return `\n${serialized}`; } if (typeof value === `object` && value) { let data; let sort; if (value instanceof PreserveOrdering) { data = value.data; sort = false; } else { data = value; sort = true; } const indent = ` `.repeat(indentLevel); const keys = Object.keys(data); if (sort) { keys.sort((a, b) => { const aIndex = specialObjectKeys.indexOf(a); const bIndex = specialObjectKeys.indexOf(b); if (aIndex === -1 && bIndex === -1) return a < b ? -1 : a > b ? +1 : 0; if (aIndex !== -1 && bIndex === -1) return -1; if (aIndex === -1 && bIndex !== -1) return +1; return aIndex - bIndex; }); } const fields = keys.filter(key => { return !isRemovableField(data[key]); }).map((key, index) => { const value = data[key]; const stringifiedKey = stringifyString(key); const stringifiedValue = stringifyValue(value, indentLevel + 1, true); const recordIndentation = index > 0 || newLineIfObject ? indent : ``; if (stringifiedValue.startsWith(`\n`)) { return `${recordIndentation}${stringifiedKey}:${stringifiedValue}`; } else { return `${recordIndentation}${stringifiedKey}: ${stringifiedValue}`; } }).join(indentLevel === 0 ? `\n` : ``) || `\n`; if (!newLineIfObject) { return `${fields}`; } else { return `\n${fields}`; } } throw new Error(`Unsupported value type (${value})`); } function stringifySyml(value) { try { const stringified = stringifyValue(value, 0, false); return stringified !== `\n` ? stringified : ``; } catch (error) { if (error.location) error.message = error.message.replace(/(\.)?$/, ` (line ${error.location.start.line}, column ${error.location.start.column})$1`); throw error; } } exports.stringifySyml = stringifySyml; stringifySyml.PreserveOrdering = PreserveOrdering; function parseViaPeg(source) { if (!source.endsWith(`\n`)) source += `\n`; return syml_1.parse(source); } const LEGACY_REGEXP = /^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i; function parseViaJsYaml(source) { if (LEGACY_REGEXP.test(source)) return parseViaPeg(source); const value = js_yaml_1.safeLoad(source, { schema: js_yaml_1.FAILSAFE_SCHEMA, json: true, }); // Empty files are parsed as `undefined` instead of an empty object // Empty files with 2 newlines or more are `null` instead if (value === undefined || value === null) return {}; if (typeof value !== `object`) throw new Error(`Expected an indexed object, got a ${typeof value} instead. Does your file follow Yaml's rules?`); if (Array.isArray(value)) throw new Error(`Expected an indexed object, got an array instead. Does your file follow Yaml's rules?`); return value; } function parseSyml(source) { return parseViaJsYaml(source); } exports.parseSyml = parseSyml; /***/ }), /***/ 9478: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ShellError = void 0; /** * A recoverable shell error. */ class ShellError extends Error { constructor(message) { super(message); this.name = `ShellError`; } } exports.ShellError = ShellError; /***/ }), /***/ 18236: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isBraceExpansion = exports.match = exports.isGlobPattern = exports.fastGlobOptions = exports.micromatchOptions = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const fast_glob_1 = tslib_1.__importDefault(__webpack_require__(13294)); const fs_1 = tslib_1.__importDefault(__webpack_require__(35747)); const micromatch_1 = tslib_1.__importDefault(__webpack_require__(70850)); exports.micromatchOptions = { // This is required because we don't want ")/*" to be a valid shell glob pattern. strictBrackets: true, }; exports.fastGlobOptions = { onlyDirectories: false, onlyFiles: false, }; /** * Decides whether a string is a glob pattern, using micromatch. * * Required because `fastGlob.isDynamicPattern` doesn't have the `strictBrackets` option. */ function isGlobPattern(pattern) { // The scanner extracts globs from a pattern, but doesn't throw errors if (!micromatch_1.default.scan(pattern, exports.micromatchOptions).isGlob) return false; // The parser is the one that throws errors try { micromatch_1.default.parse(pattern, exports.micromatchOptions); } catch (_a) { return false; } return true; } exports.isGlobPattern = isGlobPattern; function match(pattern, { cwd, baseFs }) { return fast_glob_1.default(pattern, { ...exports.fastGlobOptions, cwd: fslib_1.npath.fromPortablePath(cwd), fs: fslib_1.extendFs(fs_1.default, new fslib_1.PosixFS(baseFs)), }); } exports.match = match; function isBraceExpansion(pattern) { return micromatch_1.default.scan(pattern, exports.micromatchOptions).isBrace; } exports.isBraceExpansion = isBraceExpansion; /***/ }), /***/ 56096: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.execute = exports.ShellError = exports.globUtils = void 0; const tslib_1 = __webpack_require__(70655); const fslib_1 = __webpack_require__(91794); const parsers_1 = __webpack_require__(21717); const os_1 = __webpack_require__(12087); const stream_1 = __webpack_require__(92413); const errors_1 = __webpack_require__(9478); Object.defineProperty(exports, "ShellError", ({ enumerable: true, get: function () { return errors_1.ShellError; } })); const globUtils = tslib_1.__importStar(__webpack_require__(18236)); exports.globUtils = globUtils; const pipe_1 = __webpack_require__(74253); const pipe_2 = __webpack_require__(74253); var StreamType; (function (StreamType) { StreamType[StreamType["Readable"] = 1] = "Readable"; StreamType[StreamType["Writable"] = 2] = "Writable"; })(StreamType || (StreamType = {})); function getFileDescriptorStream(fd, type, state) { const stream = new stream_1.PassThrough({ autoDestroy: true }); switch (fd) { case pipe_2.Pipe.STDIN: { if ((type & StreamType.Readable) === StreamType.Readable) state.stdin.pipe(stream, { end: false }); if ((type & StreamType.Writable) === StreamType.Writable && state.stdin instanceof stream_1.Writable) { stream.pipe(state.stdin, { end: false }); } } break; case pipe_2.Pipe.STDOUT: { if ((type & StreamType.Readable) === StreamType.Readable) state.stdout.pipe(stream, { end: false }); if ((type & StreamType.Writable) === StreamType.Writable) { stream.pipe(state.stdout, { end: false }); } } break; case pipe_2.Pipe.STDERR: { if ((type & StreamType.Readable) === StreamType.Readable) state.stderr.pipe(stream, { end: false }); if ((type & StreamType.Writable) === StreamType.Writable) { stream.pipe(state.stderr, { end: false }); } } break; default: { throw new errors_1.ShellError(`Bad file descriptor: "${fd}"`); } } return stream; } function cloneState(state, mergeWith = {}) { const newState = { ...state, ...mergeWith }; newState.environment = { ...state.environment, ...mergeWith.environment }; newState.variables = { ...state.variables, ...mergeWith.variables }; return newState; } const BUILTINS = new Map([ [`cd`, async ([target = os_1.homedir(), ...rest], opts, state) => { const resolvedTarget = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(target)); const stat = await opts.baseFs.statPromise(resolvedTarget); if (!stat.isDirectory()) { state.stderr.write(`cd: not a directory\n`); return 1; } else { state.cwd = resolvedTarget; return 0; } }], [`pwd`, async (args, opts, state) => { state.stdout.write(`${fslib_1.npath.fromPortablePath(state.cwd)}\n`); return 0; }], [`:`, async (args, opts, state) => { return 0; }], [`true`, async (args, opts, state) => { return 0; }], [`false`, async (args, opts, state) => { return 1; }], [`exit`, async ([code, ...rest], opts, state) => { return state.exitCode = parseInt(code !== null && code !== void 0 ? code : state.variables[`?`], 10); }], [`echo`, async (args, opts, state) => { state.stdout.write(`${args.join(` `)}\n`); return 0; }], [`__ysh_run_procedure`, async (args, opts, state) => { const procedure = state.procedures[args[0]]; const exitCode = await pipe_2.start(procedure, { stdin: new pipe_2.ProtectedStream(state.stdin), stdout: new pipe_2.ProtectedStream(state.stdout), stderr: new pipe_2.ProtectedStream(state.stderr), }).run(); return exitCode; }], [`__ysh_set_redirects`, async (args, opts, state) => { let stdin = state.stdin; let stdout = state.stdout; const stderr = state.stderr; const inputs = []; const outputs = []; let t = 0; while (args[t] !== `--`) { const type = args[t++]; const count = Number(args[t++]); const last = t + count; for (let u = t; u < last; ++t, ++u) { switch (type) { case `<`: { inputs.push(() => { return opts.baseFs.createReadStream(fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args[u]))); }); } break; case `<<<`: { inputs.push(() => { const input = new stream_1.PassThrough(); process.nextTick(() => { input.write(`${args[u]}\n`); input.end(); }); return input; }); } break; case `<&`: { inputs.push(() => getFileDescriptorStream(Number(args[u]), StreamType.Readable, state)); } break; case `>`: case `>>`: { const outputPath = fslib_1.ppath.resolve(state.cwd, fslib_1.npath.toPortablePath(args[u])); if (outputPath === `/dev/null`) { outputs.push(new stream_1.Writable({ autoDestroy: true, emitClose: true, write(chunk, encoding, callback) { setImmediate(callback); }, })); } else { outputs.push(opts.baseFs.createWriteStream(outputPath, type === `>>` ? { flags: `a` } : undefined)); } } break; case `>&`: { outputs.push(getFileDescriptorStream(Number(args[u]), StreamType.Writable, state)); } break; default: { throw new Error(`Assertion failed: Unsupported redirection type: "${type}"`); } } } } if (inputs.length > 0) { const pipe = new stream_1.PassThrough(); stdin = pipe; const bindInput = (n) => { if (n === inputs.length) { pipe.end(); } else { const input = inputs[n](); input.pipe(pipe, { end: false }); input.on(`end`, () => { bindInput(n + 1); }); } }; bindInput(0); } if (outputs.length > 0) { const pipe = new stream_1.PassThrough(); stdout = pipe; for (const output of outputs) { pipe.pipe(output); } } const exitCode = await pipe_2.start(makeCommandAction(args.slice(t + 1), opts, state), { stdin: new pipe_2.ProtectedStream(stdin), stdout: new pipe_2.ProtectedStream(stdout), stderr: new pipe_2.ProtectedStream(stderr), }).run(); // Close all the outputs (since the shell never closes the output stream) await Promise.all(outputs.map(output => { // Wait until the output got flushed to the disk return new Promise(resolve => { output.on(`close`, () => { resolve(); }); output.end(); }); })); return exitCode; }], ]); async function executeBufferedSubshell(ast, opts, state) { const chunks = []; const stdout = new stream_1.PassThrough(); stdout.on(`data`, chunk => chunks.push(chunk)); await executeShellLine(ast, opts, cloneState(state, { stdout })); return Buffer.concat(chunks).toString().replace(/[\r\n]+$/, ``); } async function applyEnvVariables(environmentSegments, opts, state) { const envPromises = environmentSegments.map(async (envSegment) => { const interpolatedArgs = await interpolateArguments(envSegment.args, opts, state); return { name: envSegment.name, value: interpolatedArgs.join(` `), }; }); const interpolatedEnvs = await Promise.all(envPromises); return interpolatedEnvs.reduce((envs, env) => { envs[env.name] = env.value; return envs; }, {}); } function split(raw) { return raw.match(/[^ \r\n\t]+/g) || []; } async function evaluateVariable(segment, opts, state, push, pushAndClose = push) { switch (segment.name) { case `$`: { push(String(process.pid)); } break; case `#`: { push(String(opts.args.length)); } break; case `@`: { if (segment.quoted) { for (const raw of opts.args) { pushAndClose(raw); } } else { for (const raw of opts.args) { const parts = split(raw); for (let t = 0; t < parts.length - 1; ++t) pushAndClose(parts[t]); push(parts[parts.length - 1]); } } } break; case `*`: { const raw = opts.args.join(` `); if (segment.quoted) { push(raw); } else { for (const part of split(raw)) { pushAndClose(part); } } } break; case `PPID`: { push(String(process.ppid)); } break; case `RANDOM`: { push(String(Math.floor(Math.random() * 32768))); } break; default: { const argIndex = parseInt(segment.name, 10); if (Number.isFinite(argIndex)) { if (argIndex >= 0 && argIndex < opts.args.length) { push(opts.args[argIndex]); } else if (segment.defaultValue) { push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); } else { throw new errors_1.ShellError(`Unbound argument #${argIndex}`); } } else { if (Object.prototype.hasOwnProperty.call(state.variables, segment.name)) { push(state.variables[segment.name]); } else if (Object.prototype.hasOwnProperty.call(state.environment, segment.name)) { push(state.environment[segment.name]); } else if (segment.defaultValue) { push((await interpolateArguments(segment.defaultValue, opts, state)).join(` `)); } else { throw new errors_1.ShellError(`Unbound variable "${segment.name}"`); } } } break; } } const operators = { addition: (left, right) => left + right, subtraction: (left, right) => left - right, multiplication: (left, right) => left * right, division: (left, right) => Math.trunc(left / right), }; async function evaluateArithmetic(arithmetic, opts, state) { if (arithmetic.type === `number`) { if (!Number.isInteger(arithmetic.value)) { // ZSH allows non-integers, while bash throws at the parser level (unrecoverable) throw new Error(`Invalid number: "${arithmetic.value}", only integers are allowed`); } else { return arithmetic.value; } } else if (arithmetic.type === `variable`) { const parts = []; await evaluateVariable({ ...arithmetic, quoted: true }, opts, state, result => parts.push(result)); const number = Number(parts.join(` `)); if (Number.isNaN(number)) { return evaluateArithmetic({ type: `variable`, name: parts.join(` `) }, opts, state); } else { return evaluateArithmetic({ type: `number`, value: number }, opts, state); } } else { return operators[arithmetic.type](await evaluateArithmetic(arithmetic.left, opts, state), await evaluateArithmetic(arithmetic.right, opts, state)); } } async function interpolateArguments(commandArgs, opts, state) { const redirections = new Map(); const interpolated = []; let interpolatedSegments = []; const push = (segment) => { interpolatedSegments.push(segment); }; const close = () => { if (interpolatedSegments.length > 0) interpolated.push(interpolatedSegments.join(``)); interpolatedSegments = []; }; const pushAndClose = (segment) => { push(segment); close(); }; const redirect = (type, target) => { let targets = redirections.get(type); if (typeof targets === `undefined`) redirections.set(type, targets = []); targets.push(target); }; for (const commandArg of commandArgs) { let isGlob = false; switch (commandArg.type) { case `redirection`: { const interpolatedArgs = await interpolateArguments(commandArg.args, opts, state); for (const interpolatedArg of interpolatedArgs) { redirect(commandArg.subtype, interpolatedArg); } } break; case `argument`: { for (const segment of commandArg.segments) { switch (segment.type) { case `text`: { push(segment.text); } break; case `glob`: { push(segment.pattern); isGlob = true; } break; case `shell`: { const raw = await executeBufferedSubshell(segment.shell, opts, state); if (segment.quoted) { push(raw); } else { const parts = split(raw); for (let t = 0; t < parts.length - 1; ++t) pushAndClose(parts[t]); push(parts[parts.length - 1]); } } break; case `variable`: { await evaluateVariable(segment, opts, state, push, pushAndClose); } break; case `arithmetic`: { push(String(await evaluateArithmetic(segment.arithmetic, opts, state))); } break; } } } break; } close(); if (isGlob) { const pattern = interpolated.pop(); if (typeof pattern === `undefined`) throw new Error(`Assertion failed: Expected a glob pattern to have been set`); const matches = await opts.glob.match(pattern, { cwd: state.cwd, baseFs: opts.baseFs }); if (matches.length === 0) { const braceExpansionNotice = globUtils.isBraceExpansion(pattern) ? `. Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22` : ``; throw new errors_1.ShellError(`No matches found: "${pattern}"${braceExpansionNotice}`); } for (const match of matches.sort()) { pushAndClose(match); } } } if (redirections.size > 0) { const redirectionArgs = []; for (const [subtype, targets] of redirections.entries()) redirectionArgs.splice(redirectionArgs.length, 0, subtype, String(targets.length), ...targets); interpolated.splice(0, 0, `__ysh_set_redirects`, ...redirectionArgs, `--`); } return interpolated; } /** * Executes a command chain. A command chain is a list of commands linked * together thanks to the use of either of the `|` or `|&` operators: * * $ cat hello | grep world | grep -v foobar */ function makeCommandAction(args, opts, state) { if (!opts.builtins.has(args[0])) args = [`command`, ...args]; const nativeCwd = fslib_1.npath.fromPortablePath(state.cwd); let env = state.environment; if (typeof env.PWD !== `undefined`) env = { ...env, PWD: nativeCwd }; const [name, ...rest] = args; if (name === `command`) { return pipe_1.makeProcess(rest[0], rest.slice(1), opts, { cwd: nativeCwd, env, }); } const builtin = opts.builtins.get(name); if (typeof builtin === `undefined`) throw new Error(`Assertion failed: A builtin should exist for "${name}"`); return pipe_1.makeBuiltin(async ({ stdin, stdout, stderr }) => { state.stdin = stdin; state.stdout = stdout; state.stderr = stderr; return await builtin(rest, opts, state); }); } function makeSubshellAction(ast, opts, state) { return (stdio) => { const stdin = new stream_1.PassThrough(); const promise = executeShellLine(ast, opts, cloneState(state, { stdin })); return { stdin, promise }; }; } function makeGroupAction(ast, opts, state) { return (stdio) => { const stdin = new stream_1.PassThrough(); const promise = executeShellLine(ast, opts, state); return { stdin, promise }; }; } function makeActionFromProcedure(procedure, args, opts, activeState) { if (args.length === 0) { return procedure; } else { let key; do { key = String(Math.random()); } while (Object.prototype.hasOwnProperty.call(activeState.procedures, key)); activeState.procedures = { ...activeState.procedures }; activeState.procedures[key] = procedure; return makeCommandAction([...args, `__ysh_run_procedure`, key], opts, activeState); } } async function executeCommandChain(node, opts, state) { let current = node; let pipeType = null; let execution = null; while (current) { // Only the final segment is allowed to modify the shell state; all the // other ones are isolated const activeState = current.then ? { ...state } : state; let action; switch (current.type) { case `command`: { const args = await interpolateArguments(current.args, opts, state); const environment = await applyEnvVariables(current.envs, opts, state); action = current.envs.length ? makeCommandAction(args, opts, cloneState(activeState, { environment })) : makeCommandAction(args, opts, activeState); } break; case `subshell`: { const args = await interpolateArguments(current.args, opts, state); // We don't interpolate the subshell because it will be recursively // interpolated within its own context const procedure = makeSubshellAction(current.subshell, opts, activeState); action = makeActionFromProcedure(procedure, args, opts, activeState); } break; case `group`: { const args = await interpolateArguments(current.args, opts, state); const procedure = makeGroupAction(current.group, opts, activeState); action = makeActionFromProcedure(procedure, args, opts, activeState); } break; case `envs`: { const environment = await applyEnvVariables(current.envs, opts, state); activeState.environment = { ...activeState.environment, ...environment }; action = makeCommandAction([`true`], opts, activeState); } break; } if (typeof action === `undefined`) throw new Error(`Assertion failed: An action should have been generated`); if (pipeType === null) { // If we're processing the left-most segment of the command, we start a // new execution pipeline execution = pipe_2.start(action, { stdin: new pipe_2.ProtectedStream(activeState.stdin), stdout: new pipe_2.ProtectedStream(activeState.stdout), stderr: new pipe_2.ProtectedStream(activeState.stderr), }); } else { if (execution === null) throw new Error(`Assertion failed: The execution pipeline should have been setup`); // Otherwise, depending on the exaxct pipe type, we either pipe stdout // only or stdout and stderr switch (pipeType) { case `|`: { execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT); } break; case `|&`: { execution = execution.pipeTo(action, pipe_2.Pipe.STDOUT | pipe_2.Pipe.STDERR); } break; } } if (current.then) { pipeType = current.then.type; current = current.then.chain; } else { current = null; } } if (execution === null) throw new Error(`Assertion failed: The execution pipeline should have been setup`); return await execution.run(); } /** * Execute a command line. A command line is a list of command shells linked * together thanks to the use of either of the `||` or `&&` operators. */ async function executeCommandLine(node, opts, state) { let code; const setCode = (newCode) => { code = newCode; // We must update $?, which always contains the exit code from // the right-most command state.variables[`?`] = String(newCode); }; const executeChain = async (chain) => { try { return await executeCommandChain(chain, opts, state); } catch (error) { if (!(error instanceof errors_1.ShellError)) throw error; state.stderr.write(`${error.message}\n`); return 1; } }; setCode(await executeChain(node.chain)); // We use a loop because we must make sure that we respect // the left associativity of lists, as per the bash spec. // (e.g. `inexistent && echo yes || echo no` must be // the same as `{inexistent && echo yes} || echo no`) while (node.then) { // If the execution aborted (usually through "exit"), we must bailout if (state.exitCode !== null) return state.exitCode; switch (node.then.type) { case `&&`: { if (code === 0) { setCode(await executeChain(node.then.line.chain)); } } break; case `||`: { if (code !== 0) { setCode(await executeChain(node.then.line.chain)); } } break; default: { throw new Error(`Assertion failed: Unsupported command type: "${node.then.type}"`); } break; } node = node.then.line; } return code; } async function executeShellLine(node, opts, state) { let rightMostExitCode = 0; for (const command of node) { rightMostExitCode = await executeCommandLine(command, opts, state); // If the execution aborted (usually through "exit"), we must bailout if (state.exitCode !== null) return state.exitCode; // We must update $?, which always contains the exit code from // the right-most command state.variables[`?`] = String(rightMostExitCode); } return rightMostExitCode; } function locateArgsVariableInSegment(segment) { switch (segment.type) { case `variable`: { return segment.name === `@` || segment.name === `#` || segment.name === `*` || Number.isFinite(parseInt(segment.name, 10)) || (`defaultValue` in segment && !!segment.defaultValue && segment.defaultValue.some(arg => locateArgsVariableInArgument(arg))); } break; case `arithmetic`: { return locateArgsVariableInArithmetic(segment.arithmetic); } break; case `shell`: { return locateArgsVariable(segment.shell); } break; default: { return false; } break; } } function locateArgsVariableInArgument(arg) { switch (arg.type) { case `redirection`: { return arg.args.some(arg => locateArgsVariableInArgument(arg)); } break; case `argument`: { return arg.segments.some(segment => locateArgsVariableInSegment(segment)); } break; default: throw new Error(`Assertion failed: Unsupported argument type: "${arg.type}"`); } } function locateArgsVariableInArithmetic(arg) { switch (arg.type) { case `variable`: { return locateArgsVariableInSegment(arg); } break; case `number`: { return false; } break; default: return locateArgsVariableInArithmetic(arg.left) || locateArgsVariableInArithmetic(arg.right); } } function locateArgsVariable(node) { return node.some(command => { while (command) { let chain = command.chain; while (chain) { let hasArgs; switch (chain.type) { case `subshell`: { hasArgs = locateArgsVariable(chain.subshell); } break; case `command`: { hasArgs = chain.envs.some(env => env.args.some(arg => { return locateArgsVariableInArgument(arg); })) || chain.args.some(arg => { return locateArgsVariableInArgument(arg); }); } break; } if (hasArgs) return true; if (!chain.then) break; chain = chain.then.chain; } if (!command.then) break; command = command.then.line; } return false; }); } async function execute(command, args = [], { baseFs = new fslib_1.NodeFS(), builtins = {}, cwd = fslib_1.npath.toPortablePath(process.cwd()), env = process.env, stdin = process.stdin, stdout = process.stdout, stderr = process.stderr, variables = {}, glob = globUtils, } = {}) { const normalizedEnv = {}; for (const [key, value] of Object.entries(env)) if (typeof value !== `undefined`) normalizedEnv[key] = value; const normalizedBuiltins = new Map(BUILTINS); for (const [key, builtin] of Object.entries(builtins)) normalizedBuiltins.set(key, builtin); // This is meant to be the equivalent of /dev/null if (stdin === null) { stdin = new stream_1.PassThrough(); stdin.end(); } const ast = parsers_1.parseShell(command, glob); // If the shell line doesn't use the args, inject it at the end of the // right-most command if (!locateArgsVariable(ast) && ast.length > 0 && args.length > 0) { let command = ast[ast.length - 1]; while (command.then) command = command.then.line; let chain = command.chain; while (chain.then) chain = chain.then.chain; if (chain.type === `command`) { chain.args = chain.args.concat(args.map(arg => { return { type: `argument`, segments: [{ type: `text`, text: arg, }], }; })); } } return await executeShellLine(ast, { args, baseFs, builtins: normalizedBuiltins, initialStdin: stdin, initialStdout: stdout, initialStderr: stderr, glob, }, { cwd, environment: normalizedEnv, exitCode: null, procedures: {}, stdin, stdout, stderr, variables: Object.assign({}, variables, { [`?`]: 0, }), }); } exports.execute = execute; /***/ }), /***/ 74253: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.start = exports.Handle = exports.ProtectedStream = exports.makeBuiltin = exports.makeProcess = exports.Pipe = void 0; const tslib_1 = __webpack_require__(70655); const cross_spawn_1 = tslib_1.__importDefault(__webpack_require__(13238)); const stream_1 = __webpack_require__(92413); var Pipe; (function (Pipe) { Pipe[Pipe["STDIN"] = 0] = "STDIN"; Pipe[Pipe["STDOUT"] = 1] = "STDOUT"; Pipe[Pipe["STDERR"] = 2] = "STDERR"; })(Pipe = exports.Pipe || (exports.Pipe = {})); function sigintHandler() { // We don't want SIGINT to kill our process; we want it to kill the // innermost process, whose end will cause our own to exit. } // Rather than attaching one SIGINT handler for each process, we // attach a single one and use a refcount to detect once it's no // longer needed. let sigintRefCount = 0; function makeProcess(name, args, opts, spawnOpts) { return (stdio) => { const stdin = stdio[0] instanceof stream_1.Transform ? `pipe` : stdio[0]; const stdout = stdio[1] instanceof stream_1.Transform ? `pipe` : stdio[1]; const stderr = stdio[2] instanceof stream_1.Transform ? `pipe` : stdio[2]; const child = cross_spawn_1.default(name, args, { ...spawnOpts, stdio: [ stdin, stdout, stderr, ] }); if (sigintRefCount++ === 0) process.on(`SIGINT`, sigintHandler); if (stdio[0] instanceof stream_1.Transform) stdio[0].pipe(child.stdin); if (stdio[1] instanceof stream_1.Transform) child.stdout.pipe(stdio[1], { end: false }); if (stdio[2] instanceof stream_1.Transform) child.stderr.pipe(stdio[2], { end: false }); return { stdin: child.stdin, promise: new Promise(resolve => { child.on(`error`, error => { if (--sigintRefCount === 0) process.off(`SIGINT`, sigintHandler); // @ts-expect-error switch (error.code) { case `ENOENT`: { stdio[2].write(`command not found: ${name}\n`); resolve(127); } break; case `EACCES`: { stdio[2].write(`permission denied: ${name}\n`); resolve(128); } break; default: { stdio[2].write(`uncaught error: ${error.message}\n`); resolve(1); } break; } }); child.on(`exit`, code => { if (--sigintRefCount === 0) process.off(`SIGINT`, sigintHandler); if (code !== null) { resolve(code); } else { resolve(129); } }); }), }; }; } exports.makeProcess = makeProcess; function makeBuiltin(builtin) { return (stdio) => { const stdin = stdio[0] === `pipe` ? new stream_1.PassThrough() : stdio[0]; return { stdin, promise: Promise.resolve().then(() => builtin({ stdin, stdout: stdio[1], stderr: stdio[2], })), }; }; } exports.makeBuiltin = makeBuiltin; class ProtectedStream { constructor(stream) { this.stream = stream; } close() { // Ignore close request } get() { return this.stream; } } exports.ProtectedStream = ProtectedStream; class PipeStream { constructor() { this.stream = null; } close() { if (this.stream === null) { throw new Error(`Assertion failed: No stream attached`); } else { this.stream.end(); } } attach(stream) { this.stream = stream; } get() { if (this.stream === null) { throw new Error(`Assertion failed: No stream attached`); } else { return this.stream; } } } class Handle { constructor(ancestor, implementation) { this.stdin = null; this.stdout = null; this.stderr = null; this.pipe = null; this.ancestor = ancestor; this.implementation = implementation; } static start(implementation, { stdin, stdout, stderr }) { const chain = new Handle(null, implementation); chain.stdin = stdin; chain.stdout = stdout; chain.stderr = stderr; return chain; } pipeTo(implementation, source = Pipe.STDOUT) { const next = new Handle(this, implementation); const pipe = new PipeStream(); next.pipe = pipe; next.stdout = this.stdout; next.stderr = this.stderr; if ((source & Pipe.STDOUT) === Pipe.STDOUT) this.stdout = pipe; else if (this.ancestor !== null) this.stderr = this.ancestor.stdout; if ((source & Pipe.STDERR) === Pipe.STDERR) this.stderr = pipe; else if (this.ancestor !== null) this.stderr = this.ancestor.stderr; return next; } async exec() { const stdio = [ `ignore`, `ignore`, `ignore`, ]; if (this.pipe) { stdio[0] = `pipe`; } else { if (this.stdin === null) { throw new Error(`Assertion failed: No input stream registered`); } else { stdio[0] = this.stdin.get(); } } let stdoutLock; if (this.stdout === null) { throw new Error(`Assertion failed: No output stream registered`); } else { stdoutLock = this.stdout; stdio[1] = stdoutLock.get(); } let stderrLock; if (this.stderr === null) { throw new Error(`Assertion failed: No error stream registered`); } else { stderrLock = this.stderr; stdio[2] = stderrLock.get(); } const child = this.implementation(stdio); if (this.pipe) this.pipe.attach(child.stdin); return await child.promise.then(code => { stdoutLock.close(); stderrLock.close(); return code; }); } async run() { const promises = []; for (let handle = this; handle; handle = handle.ancestor) promises.push(handle.exec()); const exitCodes = await Promise.all(promises); return exitCodes[0]; } } exports.Handle = Handle; function start(p, opts) { return Handle.start(p, opts); } exports.start = start; /***/ }), /***/ 13238: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const cp = __webpack_require__(63129); const parse = __webpack_require__(63458); const enoent = __webpack_require__(79546); function spawn(command, args, options) { // Parse the arguments const parsed = parse(command, args, options); // Spawn the child process const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); // Hook into child process "exit" event to emit an error if the command // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 enoent.hookChildProcess(spawned, parsed); return spawned; } function spawnSync(command, args, options) { // Parse the arguments const parsed = parse(command, args, options); // Spawn the child process const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); return result; } module.exports = spawn; module.exports.spawn = spawn; module.exports.sync = spawnSync; module.exports._parse = parse; module.exports._enoent = enoent; /***/ }), /***/ 79546: /***/ ((module) => { "use strict"; const isWin = process.platform === 'win32'; function notFoundError(original, syscall) { return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { code: 'ENOENT', errno: 'ENOENT', syscall: `${syscall} ${original.command}`, path: original.command, spawnargs: original.args, }); } function hookChildProcess(cp, parsed) { if (!isWin) { return; } const originalEmit = cp.emit; cp.emit = function (name, arg1) { // If emitting "exit" event and exit code is 1, we need to check if // the command exists and emit an "error" instead // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 if (name === 'exit') { const err = verifyENOENT(arg1, parsed, 'spawn'); if (err) { return originalEmit.call(cp, 'error', err); } } return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params }; } function verifyENOENT(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawn'); } return null; } function verifyENOENTSync(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawnSync'); } return null; } module.exports = { hookChildProcess, verifyENOENT, verifyENOENTSync, notFoundError, }; /***/ }), /***/ 63458: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const resolveCommand = __webpack_require__(56323); const escape = __webpack_require__(12791); const readShebang = __webpack_require__(93366); const isWin = process.platform === 'win32'; const isExecutableRegExp = /\.(?:com|exe)$/i; const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; function detectShebang(parsed) { parsed.file = resolveCommand(parsed); const shebang = parsed.file && readShebang(parsed.file); if (shebang) { parsed.args.unshift(parsed.file); parsed.command = shebang; return resolveCommand(parsed); } return parsed.file; } function parseNonShell(parsed) { if (!isWin) { return parsed; } // Detect & add support for shebangs const commandFile = detectShebang(parsed); // We don't need a shell if the command filename is an executable const needsShell = !isExecutableRegExp.test(commandFile); // If a shell is required, use cmd.exe and take care of escaping everything correctly // Note that `forceShell` is an hidden option used only in tests if (parsed.options.forceShell || needsShell) { // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, // we need to double escape them const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) // This is necessary otherwise it will always fail with ENOENT in those cases parsed.command = path.normalize(parsed.command); // Escape command & arguments parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(' '); parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; parsed.command = process.env.comspec || 'cmd.exe'; parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped } return parsed; } function parse(command, args, options) { // Normalize arguments, similar to nodejs if (args && !Array.isArray(args)) { options = args; args = null; } args = args ? args.slice(0) : []; // Clone array to avoid changing the original options = Object.assign({}, options); // Clone object to avoid changing the original // Build our parsed object const parsed = { command, args, options, file: undefined, original: { command, args, }, }; // Delegate further parsing to shell or non-shell return options.shell ? parsed : parseNonShell(parsed); } module.exports = parse; /***/ }), /***/ 12791: /***/ ((module) => { "use strict"; // See http://www.robvanderwoude.com/escapechars.php const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; function escapeCommand(arg) { // Escape meta chars arg = arg.replace(metaCharsRegExp, '^$1'); return arg; } function escapeArgument(arg, doubleEscapeMetaChars) { // Convert to string arg = `${arg}`; // Algorithm below is based on https://qntm.org/cmd // Sequence of backslashes followed by a double quote: // double up all the backslashes and escape the double quote arg = arg.replace(/(\\*)"/g, '$1$1\\"'); // Sequence of backslashes followed by the end of the string // (which will become a double quote later): // double up all the backslashes arg = arg.replace(/(\\*)$/, '$1$1'); // All other backslashes occur literally // Quote the whole thing: arg = `"${arg}"`; // Escape meta chars arg = arg.replace(metaCharsRegExp, '^$1'); // Double escape meta chars if necessary if (doubleEscapeMetaChars) { arg = arg.replace(metaCharsRegExp, '^$1'); } return arg; } module.exports.command = escapeCommand; module.exports.argument = escapeArgument; /***/ }), /***/ 93366: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const shebangCommand = __webpack_require__(81674); function readShebang(command) { // Read the first 150 bytes from the file const size = 150; const buffer = Buffer.alloc(size); let fd; try { fd = fs.openSync(command, 'r'); fs.readSync(fd, buffer, 0, size, 0); fs.closeSync(fd); } catch (e) { /* Empty */ } // Attempt to extract shebang (null is returned if not a shebang) return shebangCommand(buffer.toString()); } module.exports = readShebang; /***/ }), /***/ 56323: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const which = __webpack_require__(36702); const getPathKey = __webpack_require__(15867); function resolveCommandAttempt(parsed, withoutPathExt) { const env = parsed.options.env || process.env; const cwd = process.cwd(); const hasCustomCwd = parsed.options.cwd != null; // Worker threads do not have process.chdir() const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; // If a custom `cwd` was specified, we need to change the process cwd // because `which` will do stat calls but does not support a custom cwd if (shouldSwitchCwd) { try { process.chdir(parsed.options.cwd); } catch (err) { /* Empty */ } } let resolved; try { resolved = which.sync(parsed.command, { path: env[getPathKey({ env })], pathExt: withoutPathExt ? path.delimiter : undefined, }); } catch (e) { /* Empty */ } finally { if (shouldSwitchCwd) { process.chdir(cwd); } } // If we successfully resolved, ensure that an absolute path is returned // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it if (resolved) { resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); } return resolved; } function resolveCommand(parsed) { return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); } module.exports = resolveCommand; /***/ }), /***/ 15867: /***/ ((module) => { "use strict"; const pathKey = (options = {}) => { const environment = options.env || process.env; const platform = options.platform || process.platform; if (platform !== 'win32') { return 'PATH'; } return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; }; module.exports = pathKey; // TODO: Remove this for the next major release module.exports.default = pathKey; /***/ }), /***/ 81674: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const shebangRegex = __webpack_require__(98645); module.exports = (string = '') => { const match = string.match(shebangRegex); if (!match) { return null; } const [path, argument] = match[0].replace(/#! ?/, '').split(' '); const binary = path.split('/').pop(); if (binary === 'env') { return argument; } return argument ? `${binary} ${argument}` : binary; }; /***/ }), /***/ 98645: /***/ ((module) => { "use strict"; module.exports = /^#!(.*)/; /***/ }), /***/ 36702: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' const path = __webpack_require__(85622) const COLON = isWindows ? ';' : ':' const isexe = __webpack_require__(31959) const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) const getPathInfo = (cmd, opt) => { const colon = opt.colon || COLON // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] : ( [ // windows always checks the cwd first ...(isWindows ? [process.cwd()] : []), ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ '').split(colon), ] ) const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' : '' const pathExt = isWindows ? pathExtExe.split(colon) : [''] if (isWindows) { if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } return { pathEnv, pathExt, pathExtExe, } } const which = (cmd, opt, cb) => { if (typeof opt === 'function') { cb = opt opt = {} } if (!opt) opt = {} const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] const step = i => new Promise((resolve, reject) => { if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)) const ppRaw = pathEnv[i] const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw const pCmd = path.join(pathPart, cmd) const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd resolve(subStep(p, i, 0)) }) const subStep = (p, i, ii) => new Promise((resolve, reject) => { if (ii === pathExt.length) return resolve(step(i + 1)) const ext = pathExt[ii] isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { if (!er && is) { if (opt.all) found.push(p + ext) else return resolve(p + ext) } return resolve(subStep(p, i, ii + 1)) }) }) return cb ? step(0).then(res => cb(null, res), cb) : step(0) } const whichSync = (cmd, opt) => { opt = opt || {} const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] for (let i = 0; i < pathEnv.length; i ++) { const ppRaw = pathEnv[i] const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw const pCmd = path.join(pathPart, cmd) const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd for (let j = 0; j < pathExt.length; j ++) { const cur = p + pathExt[j] try { const 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) } module.exports = which which.sync = whichSync /***/ }), /***/ 56455: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const indentString = __webpack_require__(95602); const cleanStack = __webpack_require__(75281); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); class AggregateError extends Error { constructor(errors) { if (!Array.isArray(errors)) { throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); } errors = [...errors].map(error => { if (error instanceof Error) { return error; } if (error !== null && typeof error === 'object') { // Handle plain error objects with message property and/or possibly other metadata return Object.assign(new Error(error.message), error); } return new Error(error); }); let message = errors .map(error => { // The `stack` property is not standardized, so we can't assume it exists return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); }) .join('\n'); message = '\n' + indentString(message, 4); super(message); this.name = 'AggregateError'; Object.defineProperty(this, '_errors', {value: errors}); } * [Symbol.iterator]() { for (const error of this._errors) { yield error; } } } module.exports = AggregateError; /***/ }), /***/ 48811: /***/ ((module) => { "use strict"; // ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm var colorNums = { white : 37 , black : 30 , blue : 34 , cyan : 36 , green : 32 , magenta : 35 , red : 31 , yellow : 33 , brightBlack : 90 , brightRed : 91 , brightGreen : 92 , brightYellow : 93 , brightBlue : 94 , brightMagenta : 95 , brightCyan : 96 , brightWhite : 97 } , backgroundColorNums = { bgBlack : 40 , bgRed : 41 , bgGreen : 42 , bgYellow : 43 , bgBlue : 44 , bgMagenta : 45 , bgCyan : 46 , bgWhite : 47 , bgBrightBlack : 100 , bgBrightRed : 101 , bgBrightGreen : 102 , bgBrightYellow : 103 , bgBrightBlue : 104 , bgBrightMagenta : 105 , bgBrightCyan : 106 , bgBrightWhite : 107 } , open = {} , close = {} , colors = {} ; Object.keys(colorNums).forEach(function (k) { var o = open[k] = '\u001b[' + colorNums[k] + 'm'; var c = close[k] = '\u001b[39m'; colors[k] = function (s) { return o + s + c; }; }); Object.keys(backgroundColorNums).forEach(function (k) { var o = open[k] = '\u001b[' + backgroundColorNums[k] + 'm'; var c = close[k] = '\u001b[49m'; colors[k] = function (s) { return o + s + c; }; }); module.exports = colors; colors.open = open; colors.close = close; /***/ }), /***/ 40261: /***/ ((module) => { "use strict"; const arrayDiffer = (array, ...values) => { const rest = new Set([].concat(...values)); return array.filter(element => !rest.has(element)); }; module.exports = arrayDiffer; /***/ }), /***/ 93755: /***/ ((module) => { "use strict"; module.exports = (...arguments_) => { return [...new Set([].concat(...arguments_))]; }; /***/ }), /***/ 50579: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var rawAsap = __webpack_require__(89134); var freeTasks = []; /** * Calls a task as soon as possible after returning, in its own event, with * priority over IO events. An exception thrown in a task can be handled by * `process.on("uncaughtException") or `domain.on("error")`, but will otherwise * crash the process. If the error is handled, all subsequent tasks will * resume. * * @param {{call}} task A callable object, typically a function that takes no * arguments. */ module.exports = asap; function asap(task) { var rawTask; if (freeTasks.length) { rawTask = freeTasks.pop(); } else { rawTask = new RawTask(); } rawTask.task = task; rawTask.domain = process.domain; rawAsap(rawTask); } function RawTask() { this.task = null; this.domain = null; } RawTask.prototype.call = function () { if (this.domain) { this.domain.enter(); } var threw = true; try { this.task.call(); threw = false; // If the task throws an exception (presumably) Node.js restores the // domain stack for the next event. if (this.domain) { this.domain.exit(); } } finally { // We use try/finally and a threw flag to avoid messing up stack traces // when we catch and release errors. if (threw) { // In Node.js, uncaught exceptions are considered fatal errors. // Re-throw them to interrupt flushing! // Ensure that flushing continues if an uncaught exception is // suppressed listening process.on("uncaughtException") or // domain.on("error"). rawAsap.requestFlush(); } // If the task threw an error, we do not want to exit the domain here. // Exiting the domain would prevent the domain from catching the error. this.task = null; this.domain = null; freeTasks.push(this); } }; /***/ }), /***/ 89134: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var domain; // The domain module is executed on demand var hasSetImmediate = typeof setImmediate === "function"; // Use the fastest means possible to execute a task in its own turn, with // priority over other events including network IO events in Node.js. // // An exception thrown by a task will permanently interrupt the processing of // subsequent tasks. The higher level `asap` function ensures that if an // exception is thrown by a task, that the task queue will continue flushing as // soon as possible, but if you use `rawAsap` directly, you are responsible to // either ensure that no exceptions are thrown from your task, or to manually // call `rawAsap.requestFlush` if an exception is thrown. module.exports = rawAsap; function rawAsap(task) { if (!queue.length) { requestFlush(); flushing = true; } // Avoids a function call queue[queue.length] = task; } var queue = []; // Once a flush has been requested, no further calls to `requestFlush` are // necessary until the next `flush` completes. var flushing = false; // The position of the next task to execute in the task queue. This is // preserved between calls to `flush` so that it can be resumed if // a task throws an exception. var index = 0; // If a task schedules additional tasks recursively, the task queue can grow // unbounded. To prevent memory excaustion, the task queue will periodically // truncate already-completed tasks. var capacity = 1024; // The flush function processes all tasks that have been scheduled with // `rawAsap` unless and until one of those tasks throws an exception. // If a task throws an exception, `flush` ensures that its state will remain // consistent and will resume where it left off when called again. // However, `flush` does not make any arrangements to be called again if an // exception is thrown. function flush() { while (index < queue.length) { var currentIndex = index; // Advance the index before calling the task. This ensures that we will // begin flushing on the next task the task throws an error. index = index + 1; queue[currentIndex].call(); // Prevent leaking memory for long chains of recursive calls to `asap`. // If we call `asap` within tasks scheduled by `asap`, the queue will // grow, but to avoid an O(n) walk for every task we execute, we don't // shift tasks off the queue after they have been executed. // Instead, we periodically shift 1024 tasks off the queue. if (index > capacity) { // Manually shift all values starting at the index back to the // beginning of the queue. for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { queue[scan] = queue[scan + index]; } queue.length -= index; index = 0; } } queue.length = 0; index = 0; flushing = false; } rawAsap.requestFlush = requestFlush; function requestFlush() { // Ensure flushing is not bound to any domain. // It is not sufficient to exit the domain, because domains exist on a stack. // To execute code outside of any domain, the following dance is necessary. var parentDomain = process.domain; if (parentDomain) { if (!domain) { // Lazy execute the domain module. // Only employed if the user elects to use domains. domain = __webpack_require__(85229); } domain.active = process.domain = null; } // `setImmediate` is slower that `process.nextTick`, but `process.nextTick` // cannot handle recursion. // `requestFlush` will only be called recursively from `asap.js`, to resume // flushing after an error is thrown into a domain. // Conveniently, `setImmediate` was introduced in the same version // `process.nextTick` started throwing recursion errors. if (flushing && hasSetImmediate) { setImmediate(flush); } else { process.nextTick(flush); } if (parentDomain) { domain.active = process.domain = parentDomain; } } /***/ }), /***/ 83407: /***/ ((module) => { // Copyright 2011 Mark Cavage All rights reserved. module.exports = { newInvalidAsn1Error: function (msg) { var e = new Error(); e.name = 'InvalidAsn1Error'; e.message = msg || ''; return e; } }; /***/ }), /***/ 20279: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var errors = __webpack_require__(83407); var types = __webpack_require__(34478); var Reader = __webpack_require__(24578); var Writer = __webpack_require__(3609); // --- Exports module.exports = { Reader: Reader, Writer: Writer }; for (var t in types) { if (types.hasOwnProperty(t)) module.exports[t] = types[t]; } for (var e in errors) { if (errors.hasOwnProperty(e)) module.exports[e] = errors[e]; } /***/ }), /***/ 24578: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var assert = __webpack_require__(42357); var Buffer = __webpack_require__(2399).Buffer; var ASN1 = __webpack_require__(34478); var errors = __webpack_require__(83407); // --- Globals var newInvalidAsn1Error = errors.newInvalidAsn1Error; // --- API function Reader(data) { if (!data || !Buffer.isBuffer(data)) throw new TypeError('data must be a node Buffer'); this._buf = data; this._size = data.length; // These hold the "current" state this._len = 0; this._offset = 0; } Object.defineProperty(Reader.prototype, 'length', { enumerable: true, get: function () { return (this._len); } }); Object.defineProperty(Reader.prototype, 'offset', { enumerable: true, get: function () { return (this._offset); } }); Object.defineProperty(Reader.prototype, 'remain', { get: function () { return (this._size - this._offset); } }); Object.defineProperty(Reader.prototype, 'buffer', { get: function () { return (this._buf.slice(this._offset)); } }); /** * Reads a single byte and advances offset; you can pass in `true` to make this * a "peek" operation (i.e., get the byte, but don't advance the offset). * * @param {Boolean} peek true means don't move offset. * @return {Number} the next byte, null if not enough data. */ Reader.prototype.readByte = function (peek) { if (this._size - this._offset < 1) return null; var b = this._buf[this._offset] & 0xff; if (!peek) this._offset += 1; return b; }; Reader.prototype.peek = function () { return this.readByte(true); }; /** * Reads a (potentially) variable length off the BER buffer. This call is * not really meant to be called directly, as callers have to manipulate * the internal buffer afterwards. * * As a result of this call, you can call `Reader.length`, until the * next thing called that does a readLength. * * @return {Number} the amount of offset to advance the buffer. * @throws {InvalidAsn1Error} on bad ASN.1 */ Reader.prototype.readLength = function (offset) { if (offset === undefined) offset = this._offset; if (offset >= this._size) return null; var lenB = this._buf[offset++] & 0xff; if (lenB === null) return null; if ((lenB & 0x80) === 0x80) { lenB &= 0x7f; if (lenB === 0) throw newInvalidAsn1Error('Indefinite length not supported'); if (lenB > 4) throw newInvalidAsn1Error('encoding too long'); if (this._size - offset < lenB) return null; this._len = 0; for (var i = 0; i < lenB; i++) this._len = (this._len << 8) + (this._buf[offset++] & 0xff); } else { // Wasn't a variable length this._len = lenB; } return offset; }; /** * Parses the next sequence in this BER buffer. * * To get the length of the sequence, call `Reader.length`. * * @return {Number} the sequence's tag. */ Reader.prototype.readSequence = function (tag) { var seq = this.peek(); if (seq === null) return null; if (tag !== undefined && tag !== seq) throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + ': got 0x' + seq.toString(16)); var o = this.readLength(this._offset + 1); // stored in `length` if (o === null) return null; this._offset = o; return seq; }; Reader.prototype.readInt = function () { return this._readTag(ASN1.Integer); }; Reader.prototype.readBoolean = function () { return (this._readTag(ASN1.Boolean) === 0 ? false : true); }; Reader.prototype.readEnumeration = function () { return this._readTag(ASN1.Enumeration); }; Reader.prototype.readString = function (tag, retbuf) { if (!tag) tag = ASN1.OctetString; var b = this.peek(); if (b === null) return null; if (b !== tag) throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + ': got 0x' + b.toString(16)); var o = this.readLength(this._offset + 1); // stored in `length` if (o === null) return null; if (this.length > this._size - o) return null; this._offset = o; if (this.length === 0) return retbuf ? Buffer.alloc(0) : ''; var str = this._buf.slice(this._offset, this._offset + this.length); this._offset += this.length; return retbuf ? str : str.toString('utf8'); }; Reader.prototype.readOID = function (tag) { if (!tag) tag = ASN1.OID; var b = this.readString(tag, true); if (b === null) return null; var values = []; var value = 0; for (var i = 0; i < b.length; i++) { var byte = b[i] & 0xff; value <<= 7; value += byte & 0x7f; if ((byte & 0x80) === 0) { values.push(value); value = 0; } } value = values.shift(); values.unshift(value % 40); values.unshift((value / 40) >> 0); return values.join('.'); }; Reader.prototype._readTag = function (tag) { assert.ok(tag !== undefined); var b = this.peek(); if (b === null) return null; if (b !== tag) throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + ': got 0x' + b.toString(16)); var o = this.readLength(this._offset + 1); // stored in `length` if (o === null) return null; if (this.length > 4) throw newInvalidAsn1Error('Integer too long: ' + this.length); if (this.length > this._size - o) return null; this._offset = o; var fb = this._buf[this._offset]; var value = 0; for (var i = 0; i < this.length; i++) { value <<= 8; value |= (this._buf[this._offset++] & 0xff); } if ((fb & 0x80) === 0x80 && i !== 4) value -= (1 << (i * 8)); return value >> 0; }; // --- Exported API module.exports = Reader; /***/ }), /***/ 34478: /***/ ((module) => { // Copyright 2011 Mark Cavage All rights reserved. module.exports = { EOC: 0, Boolean: 1, Integer: 2, BitString: 3, OctetString: 4, Null: 5, OID: 6, ObjectDescriptor: 7, External: 8, Real: 9, // float Enumeration: 10, PDV: 11, Utf8String: 12, RelativeOID: 13, Sequence: 16, Set: 17, NumericString: 18, PrintableString: 19, T61String: 20, VideotexString: 21, IA5String: 22, UTCTime: 23, GeneralizedTime: 24, GraphicString: 25, VisibleString: 26, GeneralString: 28, UniversalString: 29, CharacterString: 30, BMPString: 31, Constructor: 32, Context: 128 }; /***/ }), /***/ 3609: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. var assert = __webpack_require__(42357); var Buffer = __webpack_require__(2399).Buffer; var ASN1 = __webpack_require__(34478); var errors = __webpack_require__(83407); // --- Globals var newInvalidAsn1Error = errors.newInvalidAsn1Error; var DEFAULT_OPTS = { size: 1024, growthFactor: 8 }; // --- Helpers function merge(from, to) { assert.ok(from); assert.equal(typeof (from), 'object'); assert.ok(to); assert.equal(typeof (to), 'object'); var keys = Object.getOwnPropertyNames(from); keys.forEach(function (key) { if (to[key]) return; var value = Object.getOwnPropertyDescriptor(from, key); Object.defineProperty(to, key, value); }); return to; } // --- API function Writer(options) { options = merge(DEFAULT_OPTS, options || {}); this._buf = Buffer.alloc(options.size || 1024); this._size = this._buf.length; this._offset = 0; this._options = options; // A list of offsets in the buffer where we need to insert // sequence tag/len pairs. this._seq = []; } Object.defineProperty(Writer.prototype, 'buffer', { get: function () { if (this._seq.length) throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); return (this._buf.slice(0, this._offset)); } }); Writer.prototype.writeByte = function (b) { if (typeof (b) !== 'number') throw new TypeError('argument must be a Number'); this._ensure(1); this._buf[this._offset++] = b; }; Writer.prototype.writeInt = function (i, tag) { if (typeof (i) !== 'number') throw new TypeError('argument must be a Number'); if (typeof (tag) !== 'number') tag = ASN1.Integer; var sz = 4; while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && (sz > 1)) { sz--; i <<= 8; } if (sz > 4) throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); this._ensure(2 + sz); this._buf[this._offset++] = tag; this._buf[this._offset++] = sz; while (sz-- > 0) { this._buf[this._offset++] = ((i & 0xff000000) >>> 24); i <<= 8; } }; Writer.prototype.writeNull = function () { this.writeByte(ASN1.Null); this.writeByte(0x00); }; Writer.prototype.writeEnumeration = function (i, tag) { if (typeof (i) !== 'number') throw new TypeError('argument must be a Number'); if (typeof (tag) !== 'number') tag = ASN1.Enumeration; return this.writeInt(i, tag); }; Writer.prototype.writeBoolean = function (b, tag) { if (typeof (b) !== 'boolean') throw new TypeError('argument must be a Boolean'); if (typeof (tag) !== 'number') tag = ASN1.Boolean; this._ensure(3); this._buf[this._offset++] = tag; this._buf[this._offset++] = 0x01; this._buf[this._offset++] = b ? 0xff : 0x00; }; Writer.prototype.writeString = function (s, tag) { if (typeof (s) !== 'string') throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); if (typeof (tag) !== 'number') tag = ASN1.OctetString; var len = Buffer.byteLength(s); this.writeByte(tag); this.writeLength(len); if (len) { this._ensure(len); this._buf.write(s, this._offset); this._offset += len; } }; Writer.prototype.writeBuffer = function (buf, tag) { if (typeof (tag) !== 'number') throw new TypeError('tag must be a number'); if (!Buffer.isBuffer(buf)) throw new TypeError('argument must be a buffer'); this.writeByte(tag); this.writeLength(buf.length); this._ensure(buf.length); buf.copy(this._buf, this._offset, 0, buf.length); this._offset += buf.length; }; Writer.prototype.writeStringArray = function (strings) { if ((!strings instanceof Array)) throw new TypeError('argument must be an Array[String]'); var self = this; strings.forEach(function (s) { self.writeString(s); }); }; // This is really to solve DER cases, but whatever for now Writer.prototype.writeOID = function (s, tag) { if (typeof (s) !== 'string') throw new TypeError('argument must be a string'); if (typeof (tag) !== 'number') tag = ASN1.OID; if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) throw new Error('argument is not a valid OID string'); function encodeOctet(bytes, octet) { if (octet < 128) { bytes.push(octet); } else if (octet < 16384) { bytes.push((octet >>> 7) | 0x80); bytes.push(octet & 0x7F); } else if (octet < 2097152) { bytes.push((octet >>> 14) | 0x80); bytes.push(((octet >>> 7) | 0x80) & 0xFF); bytes.push(octet & 0x7F); } else if (octet < 268435456) { bytes.push((octet >>> 21) | 0x80); bytes.push(((octet >>> 14) | 0x80) & 0xFF); bytes.push(((octet >>> 7) | 0x80) & 0xFF); bytes.push(octet & 0x7F); } else { bytes.push(((octet >>> 28) | 0x80) & 0xFF); bytes.push(((octet >>> 21) | 0x80) & 0xFF); bytes.push(((octet >>> 14) | 0x80) & 0xFF); bytes.push(((octet >>> 7) | 0x80) & 0xFF); bytes.push(octet & 0x7F); } } var tmp = s.split('.'); var bytes = []; bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); tmp.slice(2).forEach(function (b) { encodeOctet(bytes, parseInt(b, 10)); }); var self = this; this._ensure(2 + bytes.length); this.writeByte(tag); this.writeLength(bytes.length); bytes.forEach(function (b) { self.writeByte(b); }); }; Writer.prototype.writeLength = function (len) { if (typeof (len) !== 'number') throw new TypeError('argument must be a Number'); this._ensure(4); if (len <= 0x7f) { this._buf[this._offset++] = len; } else if (len <= 0xff) { this._buf[this._offset++] = 0x81; this._buf[this._offset++] = len; } else if (len <= 0xffff) { this._buf[this._offset++] = 0x82; this._buf[this._offset++] = len >> 8; this._buf[this._offset++] = len; } else if (len <= 0xffffff) { this._buf[this._offset++] = 0x83; this._buf[this._offset++] = len >> 16; this._buf[this._offset++] = len >> 8; this._buf[this._offset++] = len; } else { throw newInvalidAsn1Error('Length too long (> 4 bytes)'); } }; Writer.prototype.startSequence = function (tag) { if (typeof (tag) !== 'number') tag = ASN1.Sequence | ASN1.Constructor; this.writeByte(tag); this._seq.push(this._offset); this._ensure(3); this._offset += 3; }; Writer.prototype.endSequence = function () { var seq = this._seq.pop(); var start = seq + 3; var len = this._offset - start; if (len <= 0x7f) { this._shift(start, len, -2); this._buf[seq] = len; } else if (len <= 0xff) { this._shift(start, len, -1); this._buf[seq] = 0x81; this._buf[seq + 1] = len; } else if (len <= 0xffff) { this._buf[seq] = 0x82; this._buf[seq + 1] = len >> 8; this._buf[seq + 2] = len; } else if (len <= 0xffffff) { this._shift(start, len, 1); this._buf[seq] = 0x83; this._buf[seq + 1] = len >> 16; this._buf[seq + 2] = len >> 8; this._buf[seq + 3] = len; } else { throw newInvalidAsn1Error('Sequence too long'); } }; Writer.prototype._shift = function (start, len, shift) { assert.ok(start !== undefined); assert.ok(len !== undefined); assert.ok(shift); this._buf.copy(this._buf, start + shift, start, start + len); this._offset += shift; }; Writer.prototype._ensure = function (len) { assert.ok(len); if (this._size - this._offset < len) { var sz = this._size * this._options.growthFactor; if (sz - this._offset < len) sz += len; var buf = Buffer.alloc(sz); this._buf.copy(buf, 0, 0, this._offset); this._buf = buf; this._size = sz; } }; // --- Exported API module.exports = Writer; /***/ }), /***/ 90476: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Copyright 2011 Mark Cavage All rights reserved. // If you have no idea what ASN.1 or BER is, see this: // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc var Ber = __webpack_require__(20279); // --- Exported API module.exports = { Ber: Ber, BerReader: Ber.Reader, BerWriter: Ber.Writer }; /***/ }), /***/ 62703: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var crypto_hash_sha512 = __webpack_require__(50780).lowlevel.crypto_hash; /* * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a * result, it retains the original copyright and license. The two files are * under slightly different (but compatible) licenses, and are here combined in * one file. * * Credit for the actual porting work goes to: * Devi Mandiri */ /* * The Blowfish portions are under the following license: * * Blowfish block cipher for OpenBSD * Copyright 1997 Niels Provos * All rights reserved. * * Implementation advice by David Mazieres . * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */ /* * The bcrypt_pbkdf portions are under the following license: * * Copyright (c) 2013 Ted Unangst * * Permission to use, copy, modify, and 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. */ /* * Performance improvements (Javascript-specific): * * Copyright 2016, Joyent Inc * Author: Alex Wilson * * Permission to use, copy, modify, and 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. */ // Ported from OpenBSD bcrypt_pbkdf.c v1.9 var BLF_J = 0; var Blowfish = function() { this.S = [ new Uint32Array([ 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), new Uint32Array([ 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), new Uint32Array([ 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), new Uint32Array([ 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) ]; this.P = new Uint32Array([ 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b]); }; function F(S, x8, i) { return (((S[0][x8[i+3]] + S[1][x8[i+2]]) ^ S[2][x8[i+1]]) + S[3][x8[i]]); }; Blowfish.prototype.encipher = function(x, x8) { if (x8 === undefined) { x8 = new Uint8Array(x.buffer); if (x.byteOffset !== 0) x8 = x8.subarray(x.byteOffset); } x[0] ^= this.P[0]; for (var i = 1; i < 16; i += 2) { x[1] ^= F(this.S, x8, 0) ^ this.P[i]; x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; } var t = x[0]; x[0] = x[1] ^ this.P[17]; x[1] = t; }; Blowfish.prototype.decipher = function(x) { var x8 = new Uint8Array(x.buffer); if (x.byteOffset !== 0) x8 = x8.subarray(x.byteOffset); x[0] ^= this.P[17]; for (var i = 16; i > 0; i -= 2) { x[1] ^= F(this.S, x8, 0) ^ this.P[i]; x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; } var t = x[0]; x[0] = x[1] ^ this.P[0]; x[1] = t; }; function stream2word(data, databytes){ var i, temp = 0; for (i = 0; i < 4; i++, BLF_J++) { if (BLF_J >= databytes) BLF_J = 0; temp = (temp << 8) | data[BLF_J]; } return temp; }; Blowfish.prototype.expand0state = function(key, keybytes) { var d = new Uint32Array(2), i, k; var d8 = new Uint8Array(d.buffer); for (i = 0, BLF_J = 0; i < 18; i++) { this.P[i] ^= stream2word(key, keybytes); } BLF_J = 0; for (i = 0; i < 18; i += 2) { this.encipher(d, d8); this.P[i] = d[0]; this.P[i+1] = d[1]; } for (i = 0; i < 4; i++) { for (k = 0; k < 256; k += 2) { this.encipher(d, d8); this.S[i][k] = d[0]; this.S[i][k+1] = d[1]; } } }; Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { var d = new Uint32Array(2), i, k; for (i = 0, BLF_J = 0; i < 18; i++) { this.P[i] ^= stream2word(key, keybytes); } for (i = 0, BLF_J = 0; i < 18; i += 2) { d[0] ^= stream2word(data, databytes); d[1] ^= stream2word(data, databytes); this.encipher(d); this.P[i] = d[0]; this.P[i+1] = d[1]; } for (i = 0; i < 4; i++) { for (k = 0; k < 256; k += 2) { d[0] ^= stream2word(data, databytes); d[1] ^= stream2word(data, databytes); this.encipher(d); this.S[i][k] = d[0]; this.S[i][k+1] = d[1]; } } BLF_J = 0; }; Blowfish.prototype.enc = function(data, blocks) { for (var i = 0; i < blocks; i++) { this.encipher(data.subarray(i*2)); } }; Blowfish.prototype.dec = function(data, blocks) { for (var i = 0; i < blocks; i++) { this.decipher(data.subarray(i*2)); } }; var BCRYPT_BLOCKS = 8, BCRYPT_HASHSIZE = 32; function bcrypt_hash(sha2pass, sha2salt, out) { var state = new Blowfish(), cdata = new Uint32Array(BCRYPT_BLOCKS), i, ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, 105,116,101]); //"OxychromaticBlowfishSwatDynamite" state.expandstate(sha2salt, 64, sha2pass, 64); for (i = 0; i < 64; i++) { state.expand0state(sha2salt, 64); state.expand0state(sha2pass, 64); } for (i = 0; i < BCRYPT_BLOCKS; i++) cdata[i] = stream2word(ciphertext, ciphertext.byteLength); for (i = 0; i < 64; i++) state.enc(cdata, cdata.byteLength / 8); for (i = 0; i < BCRYPT_BLOCKS; i++) { out[4*i+3] = cdata[i] >>> 24; out[4*i+2] = cdata[i] >>> 16; out[4*i+1] = cdata[i] >>> 8; out[4*i+0] = cdata[i]; } }; function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { var sha2pass = new Uint8Array(64), sha2salt = new Uint8Array(64), out = new Uint8Array(BCRYPT_HASHSIZE), tmpout = new Uint8Array(BCRYPT_HASHSIZE), countsalt = new Uint8Array(saltlen+4), i, j, amt, stride, dest, count, origkeylen = keylen; if (rounds < 1) return -1; if (passlen === 0 || saltlen === 0 || keylen === 0 || keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) return -1; stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); amt = Math.floor((keylen + stride - 1) / stride); for (i = 0; i < saltlen; i++) countsalt[i] = salt[i]; crypto_hash_sha512(sha2pass, pass, passlen); for (count = 1; keylen > 0; count++) { countsalt[saltlen+0] = count >>> 24; countsalt[saltlen+1] = count >>> 16; countsalt[saltlen+2] = count >>> 8; countsalt[saltlen+3] = count; crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); bcrypt_hash(sha2pass, sha2salt, tmpout); for (i = out.byteLength; i--;) out[i] = tmpout[i]; for (i = 1; i < rounds; i++) { crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); bcrypt_hash(sha2pass, sha2salt, tmpout); for (j = 0; j < out.byteLength; j++) out[j] ^= tmpout[j]; } amt = Math.min(amt, keylen); for (i = 0; i < amt; i++) { dest = i * stride + (count - 1); if (dest >= origkeylen) break; key[dest] = out[i]; } keylen -= i; } return 0; }; module.exports = { BLOCKS: BCRYPT_BLOCKS, HASHSIZE: BCRYPT_HASHSIZE, hash: bcrypt_hash, pbkdf: bcrypt_pbkdf }; /***/ }), /***/ 95581: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getBinjumper = void 0; const zlib_1 = __webpack_require__(78761); let decompressedJumper = null; function getBinjumper() { if (!decompressedJumper) { decompressedJumper = zlib_1.gunzipSync(Buffer.from('H4sIAAAAAAAACu18DXgU1dXwzOwkLMmaWTUgYtQlXRRKCASwJRh0Q7IBJdHwE0BJCCHZhejmx91ZCELM4uxqpuPWaG1rW3wV0YqVT7GlCf4U80cSLNKIgAhUUWmdZdFGsCEhkP3OuXM32fBT+/Tp+3zv99bNc/f+nb977rnnnntnsjn31jE6hmF4SKEQw+xgtI+F+fa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f3PztFyvqf9MFnS5Wj/5lffP3u87/xw26zMAmQ0jwWhn/uOzv4z/2w5G5q1EW/+MuSX8iZfIn24bx2Z76kkWEeYAd70m6vKht4gDwzMSV5cqLJVl5cUQJhxczEvIVZE6cnmlwiBC1FDtiqZyautbkSb78tJq3I5bKVrXCsNQF+uWtmottZPsNVvMpWVuSaWFZa7KxwVdjFicUVZTOKXGXJq1MSTRCwldptLnFRJLPbYkymNNHpdol3lNsr/kliUwkaILpsEMSUimu1KjQ4bQ+4gYWtJNdZuhqivJU2V7gvstdaBYgYfWXbVtscJgd+z0wsct1Rvrrifpsz0eQuTS/GMHJmor3I4bIlThrgMOmyLNImRYqTNmlgVKCtSWF13fYvzvj/BUaIzSoAXAAA', 'base64')); } return decompressedJumper; } exports.getBinjumper = getBinjumper; /***/ }), /***/ 94372: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.makeBinjumperSync = exports.makeBinjumper = exports.getBinjumper = void 0; const path_1 = __webpack_require__(85622); const fs_1 = __webpack_require__(35747); const util_1 = __webpack_require__(31669); const binjumper_1 = __webpack_require__(95581); Object.defineProperty(exports, "getBinjumper", ({ enumerable: true, get: function () { return binjumper_1.getBinjumper; } })); async function makeBinjumper(opts) { const writeFilePromise = util_1.promisify(fs_1.writeFile); const mkdirPromise = util_1.promisify(fs_1.mkdir); await mkdirPromise(opts.dir, { recursive: true }); if (process.platform === 'win32') { await Promise.all([ writeFilePromise(path_1.join(opts.dir, `${opts.name}.exe`), binjumper_1.getBinjumper()), writeFilePromise(path_1.join(opts.dir, `${opts.name}.exe.info`), [opts.target, ...(opts.args || [])].join('\n')), ]); } await writeFilePromise(path_1.join(opts.dir, opts.name), `#!/bin/sh\nexec "${opts.target}" ${(opts.args || []) .map((arg) => `'${arg.replace(/'/g, `'"'"'`)}'`) .join(' ')} "$@"\n`, { mode: 0o755 }); } exports.makeBinjumper = makeBinjumper; function makeBinjumperSync(opts) { fs_1.mkdirSync(opts.dir, { recursive: true }); if (process.platform === 'win32') { fs_1.writeFileSync(path_1.join(opts.dir, `${opts.name}.exe`), binjumper_1.getBinjumper()); fs_1.writeFileSync(path_1.join(opts.dir, `${opts.name}.exe.info`), [opts.target, ...(opts.args || [])].join('\n')); } fs_1.writeFileSync(path_1.join(opts.dir, opts.name), `#!/bin/sh\nexec "${opts.target}" ${(opts.args || []) .map((arg) => `'${arg.replace(/'/g, `'"'"'`)}'`) .join(' ')} "$@"\n`, { mode: 0o755 }); } exports.makeBinjumperSync = makeBinjumperSync; /***/ }), /***/ 86744: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const stringify = __webpack_require__(13349); const compile = __webpack_require__(27529); const expand = __webpack_require__(98050); const parse = __webpack_require__(94339); /** * Expand the given pattern or create a regex-compatible string. * * ```js * const braces = require('braces'); * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] * ``` * @param {String} `str` * @param {Object} `options` * @return {String} * @api public */ const braces = (input, options = {}) => { let output = []; if (Array.isArray(input)) { for (let pattern of input) { let result = braces.create(pattern, options); if (Array.isArray(result)) { output.push(...result); } else { output.push(result); } } } else { output = [].concat(braces.create(input, options)); } if (options && options.expand === true && options.nodupes === true) { output = [...new Set(output)]; } return output; }; /** * Parse the given `str` with the given `options`. * * ```js * // braces.parse(pattern, [, options]); * const ast = braces.parse('a/{b,c}/d'); * console.log(ast); * ``` * @param {String} pattern Brace pattern to parse * @param {Object} options * @return {Object} Returns an AST * @api public */ braces.parse = (input, options = {}) => parse(input, options); /** * Creates a braces string from an AST, or an AST node. * * ```js * const braces = require('braces'); * let ast = braces.parse('foo/{a,b}/bar'); * console.log(stringify(ast.nodes[2])); //=> '{a,b}' * ``` * @param {String} `input` Brace pattern or AST. * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.stringify = (input, options = {}) => { if (typeof input === 'string') { return stringify(braces.parse(input, options), options); } return stringify(input, options); }; /** * Compiles a brace pattern into a regex-compatible, optimized string. * This method is called by the main [braces](#braces) function by default. * * ```js * const braces = require('braces'); * console.log(braces.compile('a/{b,c}/d')); * //=> ['a/(b|c)/d'] * ``` * @param {String} `input` Brace pattern or AST. * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.compile = (input, options = {}) => { if (typeof input === 'string') { input = braces.parse(input, options); } return compile(input, options); }; /** * Expands a brace pattern into an array. This method is called by the * main [braces](#braces) function when `options.expand` is true. Before * using this method it's recommended that you read the [performance notes](#performance)) * and advantages of using [.compile](#compile) instead. * * ```js * const braces = require('braces'); * console.log(braces.expand('a/{b,c}/d')); * //=> ['a/b/d', 'a/c/d']; * ``` * @param {String} `pattern` Brace pattern * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.expand = (input, options = {}) => { if (typeof input === 'string') { input = braces.parse(input, options); } let result = expand(input, options); // filter out empty strings if specified if (options.noempty === true) { result = result.filter(Boolean); } // filter out duplicates if specified if (options.nodupes === true) { result = [...new Set(result)]; } return result; }; /** * Processes a brace pattern and returns either an expanded array * (if `options.expand` is true), a highly optimized regex-compatible string. * This method is called by the main [braces](#braces) function. * * ```js * const braces = require('braces'); * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' * ``` * @param {String} `pattern` Brace pattern * @param {Object} `options` * @return {Array} Returns an array of expanded values. * @api public */ braces.create = (input, options = {}) => { if (input === '' || input.length < 3) { return [input]; } return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); }; /** * Expose "braces" */ module.exports = braces; /***/ }), /***/ 27529: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fill = __webpack_require__(2664); const utils = __webpack_require__(73083); const compile = (ast, options = {}) => { let walk = (node, parent = {}) => { let invalidBlock = utils.isInvalidBrace(parent); let invalidNode = node.invalid === true && options.escapeInvalid === true; let invalid = invalidBlock === true || invalidNode === true; let prefix = options.escapeInvalid === true ? '\\' : ''; let output = ''; if (node.isOpen === true) { return prefix + node.value; } if (node.isClose === true) { return prefix + node.value; } if (node.type === 'open') { return invalid ? (prefix + node.value) : '('; } if (node.type === 'close') { return invalid ? (prefix + node.value) : ')'; } if (node.type === 'comma') { return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); } if (node.value) { return node.value; } if (node.nodes && node.ranges > 0) { let args = utils.reduce(node.nodes); let range = fill(...args, { ...options, wrap: false, toRegex: true }); if (range.length !== 0) { return args.length > 1 && range.length > 1 ? `(${range})` : range; } } if (node.nodes) { for (let child of node.nodes) { output += walk(child, node); } } return output; }; return walk(ast); }; module.exports = compile; /***/ }), /***/ 86611: /***/ ((module) => { "use strict"; module.exports = { MAX_LENGTH: 1024 * 64, // Digits CHAR_0: '0', /* 0 */ CHAR_9: '9', /* 9 */ // Alphabet chars. CHAR_UPPERCASE_A: 'A', /* A */ CHAR_LOWERCASE_A: 'a', /* a */ CHAR_UPPERCASE_Z: 'Z', /* Z */ CHAR_LOWERCASE_Z: 'z', /* z */ CHAR_LEFT_PARENTHESES: '(', /* ( */ CHAR_RIGHT_PARENTHESES: ')', /* ) */ CHAR_ASTERISK: '*', /* * */ // Non-alphabetic chars. CHAR_AMPERSAND: '&', /* & */ CHAR_AT: '@', /* @ */ CHAR_BACKSLASH: '\\', /* \ */ CHAR_BACKTICK: '`', /* ` */ CHAR_CARRIAGE_RETURN: '\r', /* \r */ CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ CHAR_COLON: ':', /* : */ CHAR_COMMA: ',', /* , */ CHAR_DOLLAR: '$', /* . */ CHAR_DOT: '.', /* . */ CHAR_DOUBLE_QUOTE: '"', /* " */ CHAR_EQUAL: '=', /* = */ CHAR_EXCLAMATION_MARK: '!', /* ! */ CHAR_FORM_FEED: '\f', /* \f */ CHAR_FORWARD_SLASH: '/', /* / */ CHAR_HASH: '#', /* # */ CHAR_HYPHEN_MINUS: '-', /* - */ CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ CHAR_LEFT_CURLY_BRACE: '{', /* { */ CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ CHAR_LINE_FEED: '\n', /* \n */ CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ CHAR_PERCENT: '%', /* % */ CHAR_PLUS: '+', /* + */ CHAR_QUESTION_MARK: '?', /* ? */ CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ CHAR_RIGHT_CURLY_BRACE: '}', /* } */ CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ CHAR_SEMICOLON: ';', /* ; */ CHAR_SINGLE_QUOTE: '\'', /* ' */ CHAR_SPACE: ' ', /* */ CHAR_TAB: '\t', /* \t */ CHAR_UNDERSCORE: '_', /* _ */ CHAR_VERTICAL_LINE: '|', /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ }; /***/ }), /***/ 98050: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fill = __webpack_require__(2664); const stringify = __webpack_require__(13349); const utils = __webpack_require__(73083); const append = (queue = '', stash = '', enclose = false) => { let result = []; queue = [].concat(queue); stash = [].concat(stash); if (!stash.length) return queue; if (!queue.length) { return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; } for (let item of queue) { if (Array.isArray(item)) { for (let value of item) { result.push(append(value, stash, enclose)); } } else { for (let ele of stash) { if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); } } } return utils.flatten(result); }; const expand = (ast, options = {}) => { let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; let walk = (node, parent = {}) => { node.queue = []; let p = parent; let q = parent.queue; while (p.type !== 'brace' && p.type !== 'root' && p.parent) { p = p.parent; q = p.queue; } if (node.invalid || node.dollar) { q.push(append(q.pop(), stringify(node, options))); return; } if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { q.push(append(q.pop(), ['{}'])); return; } if (node.nodes && node.ranges > 0) { let args = utils.reduce(node.nodes); if (utils.exceedsLimit(...args, options.step, rangeLimit)) { throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); } let range = fill(...args, options); if (range.length === 0) { range = stringify(node, options); } q.push(append(q.pop(), range)); node.nodes = []; return; } let enclose = utils.encloseBrace(node); let queue = node.queue; let block = node; while (block.type !== 'brace' && block.type !== 'root' && block.parent) { block = block.parent; queue = block.queue; } for (let i = 0; i < node.nodes.length; i++) { let child = node.nodes[i]; if (child.type === 'comma' && node.type === 'brace') { if (i === 1) queue.push(''); queue.push(''); continue; } if (child.type === 'close') { q.push(append(q.pop(), queue, enclose)); continue; } if (child.value && child.type !== 'open') { queue.push(append(queue.pop(), child.value)); continue; } if (child.nodes) { walk(child, node); } } return queue; }; return utils.flatten(walk(ast)); }; module.exports = expand; /***/ }), /***/ 94339: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const stringify = __webpack_require__(13349); /** * Constants */ const { MAX_LENGTH, CHAR_BACKSLASH, /* \ */ CHAR_BACKTICK, /* ` */ CHAR_COMMA, /* , */ CHAR_DOT, /* . */ CHAR_LEFT_PARENTHESES, /* ( */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_LEFT_CURLY_BRACE, /* { */ CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_LEFT_SQUARE_BRACKET, /* [ */ CHAR_RIGHT_SQUARE_BRACKET, /* ] */ CHAR_DOUBLE_QUOTE, /* " */ CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = __webpack_require__(86611); /** * parse */ const parse = (input, options = {}) => { if (typeof input !== 'string') { throw new TypeError('Expected a string'); } let opts = options || {}; let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; if (input.length > max) { throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); } let ast = { type: 'root', input, nodes: [] }; let stack = [ast]; let block = ast; let prev = ast; let brackets = 0; let length = input.length; let index = 0; let depth = 0; let value; let memo = {}; /** * Helpers */ const advance = () => input[index++]; const push = node => { if (node.type === 'text' && prev.type === 'dot') { prev.type = 'text'; } if (prev && prev.type === 'text' && node.type === 'text') { prev.value += node.value; return; } block.nodes.push(node); node.parent = block; node.prev = prev; prev = node; return node; }; push({ type: 'bos' }); while (index < length) { block = stack[stack.length - 1]; value = advance(); /** * Invalid chars */ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { continue; } /** * Escaped chars */ if (value === CHAR_BACKSLASH) { push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); continue; } /** * Right square bracket (literal): ']' */ if (value === CHAR_RIGHT_SQUARE_BRACKET) { push({ type: 'text', value: '\\' + value }); continue; } /** * Left square bracket: '[' */ if (value === CHAR_LEFT_SQUARE_BRACKET) { brackets++; let closed = true; let next; while (index < length && (next = advance())) { value += next; if (next === CHAR_LEFT_SQUARE_BRACKET) { brackets++; continue; } if (next === CHAR_BACKSLASH) { value += advance(); continue; } if (next === CHAR_RIGHT_SQUARE_BRACKET) { brackets--; if (brackets === 0) { break; } } } push({ type: 'text', value }); continue; } /** * Parentheses */ if (value === CHAR_LEFT_PARENTHESES) { block = push({ type: 'paren', nodes: [] }); stack.push(block); push({ type: 'text', value }); continue; } if (value === CHAR_RIGHT_PARENTHESES) { if (block.type !== 'paren') { push({ type: 'text', value }); continue; } block = stack.pop(); push({ type: 'text', value }); block = stack[stack.length - 1]; continue; } /** * Quotes: '|"|` */ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { let open = value; let next; if (options.keepQuotes !== true) { value = ''; } while (index < length && (next = advance())) { if (next === CHAR_BACKSLASH) { value += next + advance(); continue; } if (next === open) { if (options.keepQuotes === true) value += next; break; } value += next; } push({ type: 'text', value }); continue; } /** * Left curly brace: '{' */ if (value === CHAR_LEFT_CURLY_BRACE) { depth++; let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; let brace = { type: 'brace', open: true, close: false, dollar, depth, commas: 0, ranges: 0, nodes: [] }; block = push(brace); stack.push(block); push({ type: 'open', value }); continue; } /** * Right curly brace: '}' */ if (value === CHAR_RIGHT_CURLY_BRACE) { if (block.type !== 'brace') { push({ type: 'text', value }); continue; } let type = 'close'; block = stack.pop(); block.close = true; push({ type, value }); depth--; block = stack[stack.length - 1]; continue; } /** * Comma: ',' */ if (value === CHAR_COMMA && depth > 0) { if (block.ranges > 0) { block.ranges = 0; let open = block.nodes.shift(); block.nodes = [open, { type: 'text', value: stringify(block) }]; } push({ type: 'comma', value }); block.commas++; continue; } /** * Dot: '.' */ if (value === CHAR_DOT && depth > 0 && block.commas === 0) { let siblings = block.nodes; if (depth === 0 || siblings.length === 0) { push({ type: 'text', value }); continue; } if (prev.type === 'dot') { block.range = []; prev.value += value; prev.type = 'range'; if (block.nodes.length !== 3 && block.nodes.length !== 5) { block.invalid = true; block.ranges = 0; prev.type = 'text'; continue; } block.ranges++; block.args = []; continue; } if (prev.type === 'range') { siblings.pop(); let before = siblings[siblings.length - 1]; before.value += prev.value + value; prev = before; block.ranges--; continue; } push({ type: 'dot', value }); continue; } /** * Text */ push({ type: 'text', value }); } // Mark imbalanced braces and brackets as invalid do { block = stack.pop(); if (block.type !== 'root') { block.nodes.forEach(node => { if (!node.nodes) { if (node.type === 'open') node.isOpen = true; if (node.type === 'close') node.isClose = true; if (!node.nodes) node.type = 'text'; node.invalid = true; } }); // get the location of the block on parent.nodes (block's siblings) let parent = stack[stack.length - 1]; let index = parent.nodes.indexOf(block); // replace the (invalid) block with it's nodes parent.nodes.splice(index, 1, ...block.nodes); } } while (stack.length > 0); push({ type: 'eos' }); return ast; }; module.exports = parse; /***/ }), /***/ 13349: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const utils = __webpack_require__(73083); module.exports = (ast, options = {}) => { let stringify = (node, parent = {}) => { let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); let invalidNode = node.invalid === true && options.escapeInvalid === true; let output = ''; if (node.value) { if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { return '\\' + node.value; } return node.value; } if (node.value) { return node.value; } if (node.nodes) { for (let child of node.nodes) { output += stringify(child); } } return output; }; return stringify(ast); }; /***/ }), /***/ 73083: /***/ ((__unused_webpack_module, exports) => { "use strict"; exports.isInteger = num => { if (typeof num === 'number') { return Number.isInteger(num); } if (typeof num === 'string' && num.trim() !== '') { return Number.isInteger(Number(num)); } return false; }; /** * Find a node of the given type */ exports.find = (node, type) => node.nodes.find(node => node.type === type); /** * Find a node of the given type */ exports.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; if (!exports.isInteger(min) || !exports.isInteger(max)) return false; return ((Number(max) - Number(min)) / Number(step)) >= limit; }; /** * Escape the given node with '\\' before node.value */ exports.escapeNode = (block, n = 0, type) => { let node = block.nodes[n]; if (!node) return; if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { if (node.escaped !== true) { node.value = '\\' + node.value; node.escaped = true; } } }; /** * Returns true if the given brace node should be enclosed in literal braces */ exports.encloseBrace = node => { if (node.type !== 'brace') return false; if ((node.commas >> 0 + node.ranges >> 0) === 0) { node.invalid = true; return true; } return false; }; /** * Returns true if a brace node is invalid. */ exports.isInvalidBrace = block => { if (block.type !== 'brace') return false; if (block.invalid === true || block.dollar) return true; if ((block.commas >> 0 + block.ranges >> 0) === 0) { block.invalid = true; return true; } if (block.open !== true || block.close !== true) { block.invalid = true; return true; } return false; }; /** * Returns true if a node is an open or close node */ exports.isOpenOrClose = node => { if (node.type === 'open' || node.type === 'close') { return true; } return node.open === true || node.close === true; }; /** * Reduce an array of text nodes. */ exports.reduce = nodes => nodes.reduce((acc, node) => { if (node.type === 'text') acc.push(node.value); if (node.type === 'range') node.type = 'text'; return acc; }, []); /** * Flatten an array */ exports.flatten = (...args) => { const result = []; const flat = arr => { for (let i = 0; i < arr.length; i++) { let ele = arr[i]; Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); } return result; }; flat(args); return result; }; /***/ }), /***/ 55420: /***/ ((module) => { /* eslint-disable node/no-deprecated-api */ var toString = Object.prototype.toString var isModern = ( typeof Buffer !== 'undefined' && typeof Buffer.alloc === 'function' && typeof Buffer.allocUnsafe === 'function' && typeof Buffer.from === 'function' ) function isArrayBuffer (input) { return toString.call(input).slice(8, -1) === 'ArrayBuffer' } function fromArrayBuffer (obj, byteOffset, length) { byteOffset >>>= 0 var maxLength = obj.byteLength - byteOffset if (maxLength < 0) { throw new RangeError("'offset' is out of bounds") } if (length === undefined) { length = maxLength } else { length >>>= 0 if (length > maxLength) { throw new RangeError("'length' is out of bounds") } } return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) } function fromString (string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding) } function bufferFrom (value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (isArrayBuffer(value)) { return fromArrayBuffer(value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(value, encodingOrOffset) } return isModern ? Buffer.from(value) : new Buffer(value) } module.exports = bufferFrom /***/ }), /***/ 78397: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const { V4MAPPED, ADDRCONFIG, ALL, promises: { Resolver: AsyncResolver }, lookup: dnsLookup } = __webpack_require__(40881); const {promisify} = __webpack_require__(31669); const os = __webpack_require__(12087); const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection'); const kCacheableLookupInstance = Symbol('cacheableLookupInstance'); const kExpires = Symbol('expires'); const supportsALL = typeof ALL === 'number'; const verifyAgent = agent => { if (!(agent && typeof agent.createConnection === 'function')) { throw new Error('Expected an Agent instance as the first argument'); } }; const map4to6 = entries => { for (const entry of entries) { if (entry.family === 6) { continue; } entry.address = `::ffff:${entry.address}`; entry.family = 6; } }; const getIfaceInfo = () => { let has4 = false; let has6 = false; for (const device of Object.values(os.networkInterfaces())) { for (const iface of device) { if (iface.internal) { continue; } if (iface.family === 'IPv6') { has6 = true; } else { has4 = true; } if (has4 && has6) { return {has4, has6}; } } } return {has4, has6}; }; const isIterable = map => { return Symbol.iterator in map; }; const ttl = {ttl: true}; const all = {all: true}; class CacheableLookup { constructor({ cache = new Map(), maxTtl = Infinity, fallbackDuration = 3600, errorTtl = 0.15, resolver = new AsyncResolver(), lookup = dnsLookup } = {}) { this.maxTtl = maxTtl; this.errorTtl = errorTtl; this._cache = cache; this._resolver = resolver; this._dnsLookup = promisify(lookup); if (this._resolver instanceof AsyncResolver) { this._resolve4 = this._resolver.resolve4.bind(this._resolver); this._resolve6 = this._resolver.resolve6.bind(this._resolver); } else { this._resolve4 = promisify(this._resolver.resolve4.bind(this._resolver)); this._resolve6 = promisify(this._resolver.resolve6.bind(this._resolver)); } this._iface = getIfaceInfo(); this._pending = {}; this._nextRemovalTime = false; this._hostnamesToFallback = new Set(); if (fallbackDuration < 1) { this._fallback = false; } else { this._fallback = true; const interval = setInterval(() => { this._hostnamesToFallback.clear(); }, fallbackDuration * 1000); /* istanbul ignore next: There is no `interval.unref()` when running inside an Electron renderer */ if (interval.unref) { interval.unref(); } } this.lookup = this.lookup.bind(this); this.lookupAsync = this.lookupAsync.bind(this); } set servers(servers) { this.clear(); this._resolver.setServers(servers); } get servers() { return this._resolver.getServers(); } lookup(hostname, options, callback) { if (typeof options === 'function') { callback = options; options = {}; } else if (typeof options === 'number') { options = { family: options }; } if (!callback) { throw new Error('Callback must be a function.'); } // eslint-disable-next-line promise/prefer-await-to-then this.lookupAsync(hostname, options).then(result => { if (options.all) { callback(null, result); } else { callback(null, result.address, result.family, result.expires, result.ttl); } }, callback); } async lookupAsync(hostname, options = {}) { if (typeof options === 'number') { options = { family: options }; } let cached = await this.query(hostname); if (options.family === 6) { const filtered = cached.filter(entry => entry.family === 6); if (options.hints & V4MAPPED) { if ((supportsALL && options.hints & ALL) || filtered.length === 0) { map4to6(cached); } else { cached = filtered; } } else { cached = filtered; } } else if (options.family === 4) { cached = cached.filter(entry => entry.family === 4); } if (options.hints & ADDRCONFIG) { const {_iface} = this; cached = cached.filter(entry => entry.family === 6 ? _iface.has6 : _iface.has4); } if (cached.length === 0) { const error = new Error(`cacheableLookup ENOTFOUND ${hostname}`); error.code = 'ENOTFOUND'; error.hostname = hostname; throw error; } if (options.all) { return cached; } return cached[0]; } async query(hostname) { let cached = await this._cache.get(hostname); if (!cached) { const pending = this._pending[hostname]; if (pending) { cached = await pending; } else { const newPromise = this.queryAndCache(hostname); this._pending[hostname] = newPromise; try { cached = await newPromise; } finally { delete this._pending[hostname]; } } } cached = cached.map(entry => { return {...entry}; }); return cached; } async _resolve(hostname) { const wrap = async promise => { try { return await promise; } catch (error) { if (error.code === 'ENODATA' || error.code === 'ENOTFOUND') { return []; } throw error; } }; // ANY is unsafe as it doesn't trigger new queries in the underlying server. const [A, AAAA] = await Promise.all([ this._resolve4(hostname, ttl), this._resolve6(hostname, ttl) ].map(promise => wrap(promise))); let aTtl = 0; let aaaaTtl = 0; let cacheTtl = 0; const now = Date.now(); for (const entry of A) { entry.family = 4; entry.expires = now + (entry.ttl * 1000); aTtl = Math.max(aTtl, entry.ttl); } for (const entry of AAAA) { entry.family = 6; entry.expires = now + (entry.ttl * 1000); aaaaTtl = Math.max(aaaaTtl, entry.ttl); } if (A.length > 0) { if (AAAA.length > 0) { cacheTtl = Math.min(aTtl, aaaaTtl); } else { cacheTtl = aTtl; } } else { cacheTtl = aaaaTtl; } return { entries: [ ...A, ...AAAA ], cacheTtl }; } async _lookup(hostname) { try { const entries = await this._dnsLookup(hostname, { all: true }); return { entries, cacheTtl: 0 }; } catch (_) { return { entries: [], cacheTtl: 0 }; } } async _set(hostname, data, cacheTtl) { if (this.maxTtl > 0 && cacheTtl > 0) { cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000; data[kExpires] = Date.now() + cacheTtl; try { await this._cache.set(hostname, data, cacheTtl); } catch (error) { this.lookupAsync = async () => { const cacheError = new Error('Cache Error. Please recreate the CacheableLookup instance.'); cacheError.cause = error; throw cacheError; }; } if (isIterable(this._cache)) { this._tick(cacheTtl); } } } async queryAndCache(hostname) { if (this._hostnamesToFallback.has(hostname)) { return this._dnsLookup(hostname, all); } let query = await this._resolve(hostname); if (query.entries.length === 0 && this._fallback) { query = await this._lookup(hostname); if (query.entries.length !== 0) { // Use `dns.lookup(...)` for that particular hostname this._hostnamesToFallback.add(hostname); } } const cacheTtl = query.entries.length === 0 ? this.errorTtl : query.cacheTtl; await this._set(hostname, query.entries, cacheTtl); return query.entries; } _tick(ms) { const nextRemovalTime = this._nextRemovalTime; if (!nextRemovalTime || ms < nextRemovalTime) { clearTimeout(this._removalTimeout); this._nextRemovalTime = ms; this._removalTimeout = setTimeout(() => { this._nextRemovalTime = false; let nextExpiry = Infinity; const now = Date.now(); for (const [hostname, entries] of this._cache) { const expires = entries[kExpires]; if (now >= expires) { this._cache.delete(hostname); } else if (expires < nextExpiry) { nextExpiry = expires; } } if (nextExpiry !== Infinity) { this._tick(nextExpiry - now); } }, ms); /* istanbul ignore next: There is no `timeout.unref()` when running inside an Electron renderer */ if (this._removalTimeout.unref) { this._removalTimeout.unref(); } } } install(agent) { verifyAgent(agent); if (kCacheableLookupCreateConnection in agent) { throw new Error('CacheableLookup has been already installed'); } agent[kCacheableLookupCreateConnection] = agent.createConnection; agent[kCacheableLookupInstance] = this; agent.createConnection = (options, callback) => { if (!('lookup' in options)) { options.lookup = this.lookup; } return agent[kCacheableLookupCreateConnection](options, callback); }; } uninstall(agent) { verifyAgent(agent); if (agent[kCacheableLookupCreateConnection]) { if (agent[kCacheableLookupInstance] !== this) { throw new Error('The agent is not owned by this CacheableLookup instance'); } agent.createConnection = agent[kCacheableLookupCreateConnection]; delete agent[kCacheableLookupCreateConnection]; delete agent[kCacheableLookupInstance]; } } updateInterfaceInfo() { const {_iface} = this; this._iface = getIfaceInfo(); if ((_iface.has4 && !this._iface.has4) || (_iface.has6 && !this._iface.has6)) { this._cache.clear(); } } clear(hostname) { if (hostname) { this._cache.delete(hostname); return; } this._cache.clear(); } } module.exports = CacheableLookup; module.exports.default = CacheableLookup; /***/ }), /***/ 20490: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {PassThrough: PassThroughStream} = __webpack_require__(92413); module.exports = options => { options = {...options}; const {array} = options; let {encoding} = options; const isBuffer = encoding === 'buffer'; let objectMode = false; if (array) { objectMode = !(encoding || isBuffer); } else { encoding = encoding || 'utf8'; } if (isBuffer) { encoding = null; } const stream = new PassThroughStream({objectMode}); if (encoding) { stream.setEncoding(encoding); } let length = 0; const chunks = []; stream.on('data', chunk => { chunks.push(chunk); if (objectMode) { length = chunks.length; } else { length += chunk.length; } }); stream.getBufferedValue = () => { if (array) { return chunks; } return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); }; stream.getBufferedLength = () => length; return stream; }; /***/ }), /***/ 50404: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {constants: BufferConstants} = __webpack_require__(64293); const pump = __webpack_require__(74286); const bufferStream = __webpack_require__(20490); class MaxBufferError extends Error { constructor() { super('maxBuffer exceeded'); this.name = 'MaxBufferError'; } } async function getStream(inputStream, options) { if (!inputStream) { return Promise.reject(new Error('Expected a stream')); } options = { maxBuffer: Infinity, ...options }; const {maxBuffer} = options; let stream; await new Promise((resolve, reject) => { const rejectPromise = error => { // Don't retrieve an oversized buffer. if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) { error.bufferedData = stream.getBufferedValue(); } reject(error); }; stream = pump(inputStream, bufferStream(options), error => { if (error) { rejectPromise(error); return; } resolve(); }); stream.on('data', () => { if (stream.getBufferedLength() > maxBuffer) { rejectPromise(new MaxBufferError()); } }); }); return stream.getBufferedValue(); } module.exports = getStream; // TODO: Remove this for the next major release module.exports.default = getStream; module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); module.exports.MaxBufferError = MaxBufferError; /***/ }), /***/ 59844: /***/ ((module) => { "use strict"; // rfc7231 6.1 const statusCodeCacheableByDefault = new Set([ 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501, ]); // This implementation does not understand partial responses (206) const understoodStatuses = new Set([ 200, 203, 204, 300, 301, 302, 303, 307, 308, 404, 405, 410, 414, 501, ]); const errorStatusCodes = new Set([ 500, 502, 503, 504, ]); const hopByHopHeaders = { date: true, // included, because we add Age update Date connection: true, 'keep-alive': true, 'proxy-authenticate': true, 'proxy-authorization': true, te: true, trailer: true, 'transfer-encoding': true, upgrade: true, }; const excludedFromRevalidationUpdate = { // Since the old body is reused, it doesn't make sense to change properties of the body 'content-length': true, 'content-encoding': true, 'transfer-encoding': true, 'content-range': true, }; function toNumberOrZero(s) { const n = parseInt(s, 10); return isFinite(n) ? n : 0; } // RFC 5861 function isErrorResponse(response) { // consider undefined response as faulty if(!response) { return true } return errorStatusCodes.has(response.status); } function parseCacheControl(header) { const cc = {}; if (!header) return cc; // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing for (const part of parts) { const [k, v] = part.split(/\s*=\s*/, 2); cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting } return cc; } function formatCacheControl(cc) { let parts = []; for (const k in cc) { const v = cc[k]; parts.push(v === true ? k : k + '=' + v); } if (!parts.length) { return undefined; } return parts.join(', '); } module.exports = class CachePolicy { constructor( req, res, { shared, cacheHeuristic, immutableMinTimeToLive, ignoreCargoCult, _fromObject, } = {} ) { if (_fromObject) { this._fromObject(_fromObject); return; } if (!res || !res.headers) { throw Error('Response headers missing'); } this._assertRequestHasHeaders(req); this._responseTime = this.now(); this._isShared = shared !== false; this._cacheHeuristic = undefined !== cacheHeuristic ? cacheHeuristic : 0.1; // 10% matches IE this._immutableMinTtl = undefined !== immutableMinTimeToLive ? immutableMinTimeToLive : 24 * 3600 * 1000; this._status = 'status' in res ? res.status : 200; this._resHeaders = res.headers; this._rescc = parseCacheControl(res.headers['cache-control']); this._method = 'method' in req ? req.method : 'GET'; this._url = req.url; this._host = req.headers.host; this._noAuthorization = !req.headers.authorization; this._reqHeaders = res.headers.vary ? req.headers : null; // Don't keep all request headers if they won't be used this._reqcc = parseCacheControl(req.headers['cache-control']); // Assume that if someone uses legacy, non-standard uncecessary options they don't understand caching, // so there's no point stricly adhering to the blindly copy&pasted directives. if ( ignoreCargoCult && 'pre-check' in this._rescc && 'post-check' in this._rescc ) { delete this._rescc['pre-check']; delete this._rescc['post-check']; delete this._rescc['no-cache']; delete this._rescc['no-store']; delete this._rescc['must-revalidate']; this._resHeaders = Object.assign({}, this._resHeaders, { 'cache-control': formatCacheControl(this._rescc), }); delete this._resHeaders.expires; delete this._resHeaders.pragma; } // When the Cache-Control header field is not present in a request, caches MUST consider the no-cache request pragma-directive // as having the same effect as if "Cache-Control: no-cache" were present (see Section 5.2.1). if ( res.headers['cache-control'] == null && /no-cache/.test(res.headers.pragma) ) { this._rescc['no-cache'] = true; } } now() { return Date.now(); } storable() { // The "no-store" request directive indicates that a cache MUST NOT store any part of either this request or any response to it. return !!( !this._reqcc['no-store'] && // A cache MUST NOT store a response to any request, unless: // The request method is understood by the cache and defined as being cacheable, and ('GET' === this._method || 'HEAD' === this._method || ('POST' === this._method && this._hasExplicitExpiration())) && // the response status code is understood by the cache, and understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and !this._rescc['no-store'] && // the "private" response directive does not appear in the response, if the cache is shared, and (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared, (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either: // contains an Expires header field, or (this._resHeaders.expires || // contains a max-age response directive, or // contains a s-maxage response directive and the cache is shared, or // contains a public response directive. this._rescc['max-age'] || (this._isShared && this._rescc['s-maxage']) || this._rescc.public || // has a status code that is defined as cacheable by default statusCodeCacheableByDefault.has(this._status)) ); } _hasExplicitExpiration() { // 4.2.1 Calculating Freshness Lifetime return ( (this._isShared && this._rescc['s-maxage']) || this._rescc['max-age'] || this._resHeaders.expires ); } _assertRequestHasHeaders(req) { if (!req || !req.headers) { throw Error('Request headers missing'); } } satisfiesWithoutRevalidation(req) { this._assertRequestHasHeaders(req); // When presented with a request, a cache MUST NOT reuse a stored response, unless: // the presented request does not contain the no-cache pragma (Section 5.4), nor the no-cache cache directive, // unless the stored response is successfully validated (Section 4.3), and const requestCC = parseCacheControl(req.headers['cache-control']); if (requestCC['no-cache'] || /no-cache/.test(req.headers.pragma)) { return false; } if (requestCC['max-age'] && this.age() > requestCC['max-age']) { return false; } if ( requestCC['min-fresh'] && this.timeToLive() < 1000 * requestCC['min-fresh'] ) { return false; } // the stored response is either: // fresh, or allowed to be served stale if (this.stale()) { const allowsStale = requestCC['max-stale'] && !this._rescc['must-revalidate'] && (true === requestCC['max-stale'] || requestCC['max-stale'] > this.age() - this.maxAge()); if (!allowsStale) { return false; } } return this._requestMatches(req, false); } _requestMatches(req, allowHeadMethod) { // The presented effective request URI and that of the stored response match, and return ( (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and (!req.method || this._method === req.method || (allowHeadMethod && 'HEAD' === req.method)) && // selecting header fields nominated by the stored response (if any) match those presented, and this._varyMatches(req) ); } _allowsStoringAuthenticated() { // following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage. return ( this._rescc['must-revalidate'] || this._rescc.public || this._rescc['s-maxage'] ); } _varyMatches(req) { if (!this._resHeaders.vary) { return true; } // A Vary header field-value of "*" always fails to match if (this._resHeaders.vary === '*') { return false; } const fields = this._resHeaders.vary .trim() .toLowerCase() .split(/\s*,\s*/); for (const name of fields) { if (req.headers[name] !== this._reqHeaders[name]) return false; } return true; } _copyWithoutHopByHopHeaders(inHeaders) { const headers = {}; for (const name in inHeaders) { if (hopByHopHeaders[name]) continue; headers[name] = inHeaders[name]; } // 9.1. Connection if (inHeaders.connection) { const tokens = inHeaders.connection.trim().split(/\s*,\s*/); for (const name of tokens) { delete headers[name]; } } if (headers.warning) { const warnings = headers.warning.split(/,/).filter(warning => { return !/^\s*1[0-9][0-9]/.test(warning); }); if (!warnings.length) { delete headers.warning; } else { headers.warning = warnings.join(',').trim(); } } return headers; } responseHeaders() { const headers = this._copyWithoutHopByHopHeaders(this._resHeaders); const age = this.age(); // A cache SHOULD generate 113 warning if it heuristically chose a freshness // lifetime greater than 24 hours and the response's age is greater than 24 hours. if ( age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 ) { headers.warning = (headers.warning ? `${headers.warning}, ` : '') + '113 - "rfc7234 5.5.4"'; } headers.age = `${Math.round(age)}`; headers.date = new Date(this.now()).toUTCString(); return headers; } /** * Value of the Date response header or current time if Date was invalid * @return timestamp */ date() { const serverDate = Date.parse(this._resHeaders.date); if (isFinite(serverDate)) { return serverDate; } return this._responseTime; } /** * Value of the Age header, in seconds, updated for the current time. * May be fractional. * * @return Number */ age() { let age = this._ageValue(); const residentTime = (this.now() - this._responseTime) / 1000; return age + residentTime; } _ageValue() { return toNumberOrZero(this._resHeaders.age); } /** * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. * * For an up-to-date value, see `timeToLive()`. * * @return Number */ maxAge() { if (!this.storable() || this._rescc['no-cache']) { return 0; } // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default // so this implementation requires explicit opt-in via public header if ( this._isShared && (this._resHeaders['set-cookie'] && !this._rescc.public && !this._rescc.immutable) ) { return 0; } if (this._resHeaders.vary === '*') { return 0; } if (this._isShared) { if (this._rescc['proxy-revalidate']) { return 0; } // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field. if (this._rescc['s-maxage']) { return toNumberOrZero(this._rescc['s-maxage']); } } // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field. if (this._rescc['max-age']) { return toNumberOrZero(this._rescc['max-age']); } const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0; const serverDate = this.date(); if (this._resHeaders.expires) { const expires = Date.parse(this._resHeaders.expires); // A cache recipient MUST interpret invalid date formats, especially the value "0", as representing a time in the past (i.e., "already expired"). if (Number.isNaN(expires) || expires < serverDate) { return 0; } return Math.max(defaultMinTtl, (expires - serverDate) / 1000); } if (this._resHeaders['last-modified']) { const lastModified = Date.parse(this._resHeaders['last-modified']); if (isFinite(lastModified) && serverDate > lastModified) { return Math.max( defaultMinTtl, ((serverDate - lastModified) / 1000) * this._cacheHeuristic ); } } return defaultMinTtl; } timeToLive() { const age = this.maxAge() - this.age(); const staleIfErrorAge = age + toNumberOrZero(this._rescc['stale-if-error']); const staleWhileRevalidateAge = age + toNumberOrZero(this._rescc['stale-while-revalidate']); return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1000; } stale() { return this.maxAge() <= this.age(); } _useStaleIfError() { return this.maxAge() + toNumberOrZero(this._rescc['stale-if-error']) > this.age(); } useStaleWhileRevalidate() { return this.maxAge() + toNumberOrZero(this._rescc['stale-while-revalidate']) > this.age(); } static fromObject(obj) { return new this(undefined, undefined, { _fromObject: obj }); } _fromObject(obj) { if (this._responseTime) throw Error('Reinitialized'); if (!obj || obj.v !== 1) throw Error('Invalid serialization'); this._responseTime = obj.t; this._isShared = obj.sh; this._cacheHeuristic = obj.ch; this._immutableMinTtl = obj.imm !== undefined ? obj.imm : 24 * 3600 * 1000; this._status = obj.st; this._resHeaders = obj.resh; this._rescc = obj.rescc; this._method = obj.m; this._url = obj.u; this._host = obj.h; this._noAuthorization = obj.a; this._reqHeaders = obj.reqh; this._reqcc = obj.reqcc; } toObject() { return { v: 1, t: this._responseTime, sh: this._isShared, ch: this._cacheHeuristic, imm: this._immutableMinTtl, st: this._status, resh: this._resHeaders, rescc: this._rescc, m: this._method, u: this._url, h: this._host, a: this._noAuthorization, reqh: this._reqHeaders, reqcc: this._reqcc, }; } /** * Headers for sending to the origin server to revalidate stale response. * Allows server to return 304 to allow reuse of the previous response. * * Hop by hop headers are always stripped. * Revalidation headers may be added or removed, depending on request. */ revalidationHeaders(incomingReq) { this._assertRequestHasHeaders(incomingReq); const headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); // This implementation does not understand range requests delete headers['if-range']; if (!this._requestMatches(incomingReq, true) || !this.storable()) { // revalidation allowed via HEAD // not for the same resource, or wasn't allowed to be cached anyway delete headers['if-none-match']; delete headers['if-modified-since']; return headers; } /* MUST send that entity-tag in any cache validation request (using If-Match or If-None-Match) if an entity-tag has been provided by the origin server. */ if (this._resHeaders.etag) { headers['if-none-match'] = headers['if-none-match'] ? `${headers['if-none-match']}, ${this._resHeaders.etag}` : this._resHeaders.etag; } // Clients MAY issue simple (non-subrange) GET requests with either weak validators or strong validators. Clients MUST NOT use weak validators in other forms of request. const forbidsWeakValidators = headers['accept-ranges'] || headers['if-match'] || headers['if-unmodified-since'] || (this._method && this._method != 'GET'); /* SHOULD send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since) if only a Last-Modified value has been provided by the origin server. Note: This implementation does not understand partial responses (206) */ if (forbidsWeakValidators) { delete headers['if-modified-since']; if (headers['if-none-match']) { const etags = headers['if-none-match'] .split(/,/) .filter(etag => { return !/^\s*W\//.test(etag); }); if (!etags.length) { delete headers['if-none-match']; } else { headers['if-none-match'] = etags.join(',').trim(); } } } else if ( this._resHeaders['last-modified'] && !headers['if-modified-since'] ) { headers['if-modified-since'] = this._resHeaders['last-modified']; } return headers; } /** * Creates new CachePolicy with information combined from the previews response, * and the new revalidation response. * * Returns {policy, modified} where modified is a boolean indicating * whether the response body has been modified, and old cached body can't be used. * * @return {Object} {policy: CachePolicy, modified: Boolean} */ revalidatedPolicy(request, response) { this._assertRequestHasHeaders(request); if(this._useStaleIfError() && isErrorResponse(response)) { // I consider the revalidation request unsuccessful return { modified: false, matches: false, policy: this, }; } if (!response || !response.headers) { throw Error('Response headers missing'); } // These aren't going to be supported exactly, since one CachePolicy object // doesn't know about all the other cached objects. let matches = false; if (response.status !== undefined && response.status != 304) { matches = false; } else if ( response.headers.etag && !/^\s*W\//.test(response.headers.etag) ) { // "All of the stored responses with the same strong validator are selected. // If none of the stored responses contain the same strong validator, // then the cache MUST NOT use the new response to update any stored responses." matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag; } else if (this._resHeaders.etag && response.headers.etag) { // "If the new response contains a weak validator and that validator corresponds // to one of the cache's stored responses, // then the most recent of those matching stored responses is selected for update." matches = this._resHeaders.etag.replace(/^\s*W\//, '') === response.headers.etag.replace(/^\s*W\//, ''); } else if (this._resHeaders['last-modified']) { matches = this._resHeaders['last-modified'] === response.headers['last-modified']; } else { // If the new response does not include any form of validator (such as in the case where // a client generates an If-Modified-Since request from a source other than the Last-Modified // response header field), and there is only one stored response, and that stored response also // lacks a validator, then that stored response is selected for update. if ( !this._resHeaders.etag && !this._resHeaders['last-modified'] && !response.headers.etag && !response.headers['last-modified'] ) { matches = true; } } if (!matches) { return { policy: new this.constructor(request, response), // Client receiving 304 without body, even if it's invalid/mismatched has no option // but to reuse a cached body. We don't have a good way to tell clients to do // error recovery in such case. modified: response.status != 304, matches: false, }; } // use other header fields provided in the 304 (Not Modified) response to replace all instances // of the corresponding header fields in the stored response. const headers = {}; for (const k in this._resHeaders) { headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k]; } const newResponse = Object.assign({}, response, { status: this._status, method: this._method, headers, }); return { policy: new this.constructor(request, newResponse, { shared: this._isShared, cacheHeuristic: this._cacheHeuristic, immutableMinTimeToLive: this._immutableMinTtl, }), modified: false, matches: true, }; } }; /***/ }), /***/ 93481: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const urlLib = __webpack_require__(78835); const normalizeUrl = __webpack_require__(40015); const getStream = __webpack_require__(50404); const CachePolicy = __webpack_require__(59844); const Response = __webpack_require__(24259); const lowercaseKeys = __webpack_require__(25989); const cloneResponse = __webpack_require__(79715); const Keyv = __webpack_require__(64958); class CacheableRequest { constructor(request, cacheAdapter) { if (typeof request !== 'function') { throw new TypeError('Parameter `request` must be a function'); } this.cache = new Keyv({ uri: typeof cacheAdapter === 'string' && cacheAdapter, store: typeof cacheAdapter !== 'string' && cacheAdapter, namespace: 'cacheable-request' }); return this.createCacheableRequest(request); } createCacheableRequest(request) { return (opts, cb) => { let url; if (typeof opts === 'string') { url = normalizeUrlObject(urlLib.parse(opts)); opts = {}; } else if (opts instanceof urlLib.URL) { url = normalizeUrlObject(urlLib.parse(opts.toString())); opts = {}; } else { const [pathname, ...searchParts] = (opts.path || '').split('?'); const search = searchParts.length > 0 ? `?${searchParts.join('?')}` : ''; url = normalizeUrlObject({ ...opts, pathname, search }); } opts = { headers: {}, method: 'GET', cache: true, strictTtl: false, automaticFailover: false, ...opts, ...urlObjectToRequestOptions(url) }; opts.headers = lowercaseKeys(opts.headers); const ee = new EventEmitter(); const normalizedUrlString = normalizeUrl( urlLib.format(url), { stripWWW: false, removeTrailingSlash: false, stripAuthentication: false } ); const key = `${opts.method}:${normalizedUrlString}`; let revalidate = false; let madeRequest = false; const makeRequest = opts => { madeRequest = true; let requestErrored = false; let requestErrorCallback; const requestErrorPromise = new Promise(resolve => { requestErrorCallback = () => { if (!requestErrored) { requestErrored = true; resolve(); } }; }); const handler = response => { if (revalidate && !opts.forceRefresh) { response.status = response.statusCode; const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response); if (!revalidatedPolicy.modified) { const headers = revalidatedPolicy.policy.responseHeaders(); response = new Response(revalidate.statusCode, headers, revalidate.body, revalidate.url); response.cachePolicy = revalidatedPolicy.policy; response.fromCache = true; } } if (!response.fromCache) { response.cachePolicy = new CachePolicy(opts, response, opts); response.fromCache = false; } let clonedResponse; if (opts.cache && response.cachePolicy.storable()) { clonedResponse = cloneResponse(response); (async () => { try { const bodyPromise = getStream.buffer(response); await Promise.race([ requestErrorPromise, new Promise(resolve => response.once('end', resolve)) ]); if (requestErrored) { return; } const body = await bodyPromise; const value = { cachePolicy: response.cachePolicy.toObject(), url: response.url, statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, body }; let ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined; if (opts.maxTtl) { ttl = ttl ? Math.min(ttl, opts.maxTtl) : opts.maxTtl; } await this.cache.set(key, value, ttl); } catch (error) { ee.emit('error', new CacheableRequest.CacheError(error)); } })(); } else if (opts.cache && revalidate) { (async () => { try { await this.cache.delete(key); } catch (error) { ee.emit('error', new CacheableRequest.CacheError(error)); } })(); } ee.emit('response', clonedResponse || response); if (typeof cb === 'function') { cb(clonedResponse || response); } }; try { const req = request(opts, handler); req.once('error', requestErrorCallback); req.once('abort', requestErrorCallback); ee.emit('request', req); } catch (error) { ee.emit('error', new CacheableRequest.RequestError(error)); } }; (async () => { const get = async opts => { await Promise.resolve(); const cacheEntry = opts.cache ? await this.cache.get(key) : undefined; if (typeof cacheEntry === 'undefined') { return makeRequest(opts); } const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); if (policy.satisfiesWithoutRevalidation(opts) && !opts.forceRefresh) { const headers = policy.responseHeaders(); const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); response.cachePolicy = policy; response.fromCache = true; ee.emit('response', response); if (typeof cb === 'function') { cb(response); } } else { revalidate = cacheEntry; opts.headers = policy.revalidationHeaders(opts); makeRequest(opts); } }; const errorHandler = error => ee.emit('error', new CacheableRequest.CacheError(error)); this.cache.once('error', errorHandler); ee.on('response', () => this.cache.removeListener('error', errorHandler)); try { await get(opts); } catch (error) { if (opts.automaticFailover && !madeRequest) { makeRequest(opts); } ee.emit('error', new CacheableRequest.CacheError(error)); } })(); return ee; }; } } function urlObjectToRequestOptions(url) { const options = { ...url }; options.path = `${url.pathname || '/'}${url.search || ''}`; delete options.pathname; delete options.search; return options; } function normalizeUrlObject(url) { // If url was parsed by url.parse or new URL: // - hostname will be set // - host will be hostname[:port] // - port will be set if it was explicit in the parsed string // Otherwise, url was from request options: // - hostname or host may be set // - host shall not have port encoded return { protocol: url.protocol, auth: url.auth, hostname: url.hostname || url.host || 'localhost', port: url.port, pathname: url.pathname, search: url.search }; } CacheableRequest.RequestError = class extends Error { constructor(error) { super(error.message); this.name = 'RequestError'; Object.assign(this, error); } }; CacheableRequest.CacheError = class extends Error { constructor(error) { super(error.message); this.name = 'CacheError'; Object.assign(this, error); } }; module.exports = CacheableRequest; /***/ }), /***/ 75281: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const os = __webpack_require__(12087); const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); module.exports = (stack, options) => { options = Object.assign({pretty: false}, options); return stack.replace(/\\/g, '/') .split('\n') .filter(line => { const pathMatches = line.match(extractPathRegex); if (pathMatches === null || !pathMatches[1]) { return true; } const match = pathMatches[1]; // Electron if ( match.includes('.app/Contents/Resources/electron.asar') || match.includes('.app/Contents/Resources/default_app.asar') ) { return false; } return !pathRegex.test(match); }) .filter(line => line.trim() !== '') .map(line => { if (options.pretty) { return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); } return line; }) .join('\n'); }; /***/ }), /***/ 87730: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const NODE_INITIAL = 0; const NODE_SUCCESS = 1; const NODE_ERRORED = 2; const START_OF_INPUT = `\u0001`; const END_OF_INPUT = `\u0000`; const HELP_COMMAND_INDEX = -1; const HELP_REGEX = /^(-h|--help)(?:=([0-9]+))?$/; const OPTION_REGEX = /^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/; const BATCH_REGEX = /^-[a-zA-Z]{2,}$/; const BINDING_REGEX = /^([^=]+)=([\s\S]*)$/; const DEBUG = process.env.DEBUG_CLI === `1`; /** * A generic usage error with the name `UsageError`. * * It should be used over `Error` only when it's the user's fault. */ class UsageError extends Error { constructor(message) { super(message); this.clipanion = { type: `usage` }; this.name = `UsageError`; } } class UnknownSyntaxError extends Error { constructor(input, candidates) { super(); this.input = input; this.candidates = candidates; this.clipanion = { type: `none` }; this.name = `UnknownSyntaxError`; if (this.candidates.length === 0) { this.message = `Command not found, but we're not sure what's the alternative.`; } else if (this.candidates.length === 1 && this.candidates[0].reason !== null) { const [{ usage, reason }] = this.candidates; this.message = `${reason}\n\n$ ${usage}`; } else if (this.candidates.length === 1) { const [{ usage }] = this.candidates; this.message = `Command not found; did you mean:\n\n$ ${usage}\n${whileRunning(input)}`; } else { this.message = `Command not found; did you mean one of:\n\n${this.candidates.map(({ usage }, index) => { return `${`${index}.`.padStart(4)} ${usage}`; }).join(`\n`)}\n\n${whileRunning(input)}`; } } } class AmbiguousSyntaxError extends Error { constructor(input, usages) { super(); this.input = input; this.usages = usages; this.clipanion = { type: `none` }; this.name = `AmbiguousSyntaxError`; this.message = `Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((usage, index) => { return `${`${index}.`.padStart(4)} ${usage}`; }).join(`\n`)}\n\n${whileRunning(input)}`; } } const whileRunning = (input) => `While running ${input.filter(token => { return token !== END_OF_INPUT; }).map(token => { const json = JSON.stringify(token); if (token.match(/\s/) || token.length === 0 || json !== `"${token}"`) { return json; } else { return token; } }).join(` `)}`; // ------------------------------------------------------------------------ function debug(str) { if (DEBUG) { console.log(str); } } const basicHelpState = { candidateUsage: null, errorMessage: null, ignoreOptions: false, path: [], positionals: [], options: [], remainder: null, selectedIndex: HELP_COMMAND_INDEX }; function makeStateMachine() { return { nodes: [makeNode(), makeNode(), makeNode()], }; } function makeAnyOfMachine(inputs) { const output = makeStateMachine(); const heads = []; let offset = output.nodes.length; for (const input of inputs) { heads.push(offset); for (let t = 0; t < input.nodes.length; ++t) if (!isTerminalNode(t)) output.nodes.push(cloneNode(input.nodes[t], offset)); offset += input.nodes.length - 2; } for (const head of heads) registerShortcut(output, NODE_INITIAL, head); return output; } function injectNode(machine, node) { machine.nodes.push(node); return machine.nodes.length - 1; } function simplifyMachine(input) { const visited = new Set(); const process = (node) => { if (visited.has(node)) return; visited.add(node); const nodeDef = input.nodes[node]; for (const transitions of Object.values(nodeDef.statics)) for (const { to } of transitions) process(to); for (const [, { to }] of nodeDef.dynamics) process(to); for (const { to } of nodeDef.shortcuts) process(to); const shortcuts = new Set(nodeDef.shortcuts.map(({ to }) => to)); while (nodeDef.shortcuts.length > 0) { const { to } = nodeDef.shortcuts.shift(); const toDef = input.nodes[to]; for (const [segment, transitions] of Object.entries(toDef.statics)) { let store = !Object.prototype.hasOwnProperty.call(nodeDef.statics, segment) ? nodeDef.statics[segment] = [] : nodeDef.statics[segment]; for (const transition of transitions) { if (!store.some(({ to }) => transition.to === to)) { store.push(transition); } } } for (const [test, transition] of toDef.dynamics) if (!nodeDef.dynamics.some(([otherTest, { to }]) => test === otherTest && transition.to === to)) nodeDef.dynamics.push([test, transition]); for (const transition of toDef.shortcuts) { if (!shortcuts.has(transition.to)) { nodeDef.shortcuts.push(transition); shortcuts.add(transition.to); } } } }; process(NODE_INITIAL); } function debugMachine(machine, { prefix = `` } = {}) { debug(`${prefix}Nodes are:`); for (let t = 0; t < machine.nodes.length; ++t) { debug(`${prefix} ${t}: ${JSON.stringify(machine.nodes[t])}`); } } function runMachineInternal(machine, input, partial = false) { debug(`Running a vm on ${JSON.stringify(input)}`); let branches = [{ node: NODE_INITIAL, state: { candidateUsage: null, errorMessage: null, ignoreOptions: false, options: [], path: [], positionals: [], remainder: null, selectedIndex: null, } }]; debugMachine(machine, { prefix: ` ` }); const tokens = [START_OF_INPUT, ...input]; for (let t = 0; t < tokens.length; ++t) { const segment = tokens[t]; debug(` Processing ${JSON.stringify(segment)}`); const nextBranches = []; for (const { node, state } of branches) { debug(` Current node is ${node}`); const nodeDef = machine.nodes[node]; if (node === NODE_ERRORED) { nextBranches.push({ node, state }); continue; } console.assert(nodeDef.shortcuts.length === 0, `Shortcuts should have been eliminated by now`); const hasExactMatch = Object.prototype.hasOwnProperty.call(nodeDef.statics, segment); if (!partial || t < tokens.length - 1 || hasExactMatch) { if (hasExactMatch) { const transitions = nodeDef.statics[segment]; for (const { to, reducer } of transitions) { nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); debug(` Static transition to ${to} found`); } } else { debug(` No static transition found`); } } else { let hasMatches = false; for (const candidate of Object.keys(nodeDef.statics)) { if (!candidate.startsWith(segment)) continue; if (segment === candidate) { for (const { to, reducer } of nodeDef.statics[candidate]) { nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); debug(` Static transition to ${to} found`); } } else { for (const { to, reducer } of nodeDef.statics[candidate]) { nextBranches.push({ node: to, state: Object.assign(Object.assign({}, state), { remainder: candidate.slice(segment.length) }) }); debug(` Static transition to ${to} found (partial match)`); } } hasMatches = true; } if (!hasMatches) { debug(` No partial static transition found`); } } if (segment !== END_OF_INPUT) { for (const [test, { to, reducer }] of nodeDef.dynamics) { if (execute(tests, test, state, segment)) { nextBranches.push({ node: to, state: typeof reducer !== `undefined` ? execute(reducers, reducer, state, segment) : state }); debug(` Dynamic transition to ${to} found (via ${test})`); } } } } if (nextBranches.length === 0 && segment === END_OF_INPUT && input.length === 1) { return [{ node: NODE_INITIAL, state: basicHelpState, }]; } if (nextBranches.length === 0) { throw new UnknownSyntaxError(input, branches.filter(({ node }) => { return node !== NODE_ERRORED; }).map(({ state }) => { return { usage: state.candidateUsage, reason: null }; })); } if (nextBranches.every(({ node }) => node === NODE_ERRORED)) { throw new UnknownSyntaxError(input, nextBranches.map(({ state }) => { return { usage: state.candidateUsage, reason: state.errorMessage }; })); } branches = trimSmallerBranches(nextBranches); } if (branches.length > 0) { debug(` Results:`); for (const branch of branches) { debug(` - ${branch.node} -> ${JSON.stringify(branch.state)}`); } } else { debug(` No results`); } return branches; } function checkIfNodeIsFinished(node, state) { if (state.selectedIndex !== null) return true; if (Object.prototype.hasOwnProperty.call(node.statics, END_OF_INPUT)) for (const { to } of node.statics[END_OF_INPUT]) if (to === NODE_SUCCESS) return true; return false; } function suggestMachine(machine, input, partial) { // If we're accepting partial matches, then exact matches need to be // prefixed with an extra space. const prefix = partial && input.length > 0 ? [``] : []; const branches = runMachineInternal(machine, input, partial); const suggestions = []; const suggestionsJson = new Set(); const traverseSuggestion = (suggestion, node, skipFirst = true) => { let nextNodes = [node]; while (nextNodes.length > 0) { const currentNodes = nextNodes; nextNodes = []; for (const node of currentNodes) { const nodeDef = machine.nodes[node]; const keys = Object.keys(nodeDef.statics); for (const key of Object.keys(nodeDef.statics)) { const segment = keys[0]; for (const { to, reducer } of nodeDef.statics[segment]) { if (reducer !== `pushPath`) continue; if (!skipFirst) suggestion.push(segment); nextNodes.push(to); } } } skipFirst = false; } const json = JSON.stringify(suggestion); if (suggestionsJson.has(json)) return; suggestions.push(suggestion); suggestionsJson.add(json); }; for (const { node, state } of branches) { if (state.remainder !== null) { traverseSuggestion([state.remainder], node); continue; } const nodeDef = machine.nodes[node]; const isFinished = checkIfNodeIsFinished(nodeDef, state); for (const [candidate, transitions] of Object.entries(nodeDef.statics)) if ((isFinished && candidate !== END_OF_INPUT) || (!candidate.startsWith(`-`) && transitions.some(({ reducer }) => reducer === `pushPath`))) traverseSuggestion([...prefix, candidate], node); if (!isFinished) continue; for (const [test, { to }] of nodeDef.dynamics) { if (to === NODE_ERRORED) continue; const tokens = suggest(test, state); if (tokens === null) continue; for (const token of tokens) { traverseSuggestion([...prefix, token], node); } } } return [...suggestions].sort(); } function runMachine(machine, input) { const branches = runMachineInternal(machine, [...input, END_OF_INPUT]); return selectBestState(input, branches.map(({ state }) => { return state; })); } function trimSmallerBranches(branches) { let maxPathSize = 0; for (const { state } of branches) if (state.path.length > maxPathSize) maxPathSize = state.path.length; return branches.filter(({ state }) => { return state.path.length === maxPathSize; }); } function selectBestState(input, states) { const terminalStates = states.filter(state => { return state.selectedIndex !== null; }); if (terminalStates.length === 0) throw new Error(); let maxPathSize = 0; for (const state of terminalStates) if (state.path.length > maxPathSize) maxPathSize = state.path.length; const bestPathBranches = terminalStates.filter(state => { return state.path.length === maxPathSize; }); const getPositionalCount = (state) => state.positionals.filter(({ extra }) => { return !extra; }).length + state.options.length; const statesWithPositionalCount = bestPathBranches.map(state => { return { state, positionalCount: getPositionalCount(state) }; }); let maxPositionalCount = 0; for (const { positionalCount } of statesWithPositionalCount) if (positionalCount > maxPositionalCount) maxPositionalCount = positionalCount; const bestPositionalStates = statesWithPositionalCount.filter(({ positionalCount }) => { return positionalCount === maxPositionalCount; }).map(({ state }) => { return state; }); const fixedStates = aggregateHelpStates(bestPositionalStates); if (fixedStates.length > 1) throw new AmbiguousSyntaxError(input, fixedStates.map(state => state.candidateUsage)); return fixedStates[0]; } function aggregateHelpStates(states) { const notHelps = []; const helps = []; for (const state of states) { if (state.selectedIndex === HELP_COMMAND_INDEX) { helps.push(state); } else { notHelps.push(state); } } if (helps.length > 0) { notHelps.push(Object.assign(Object.assign({}, basicHelpState), { path: findCommonPrefix(...helps.map(state => state.path)), options: helps.reduce((options, state) => options.concat(state.options), []) })); } return notHelps; } function findCommonPrefix(firstPath, secondPath, ...rest) { if (secondPath === undefined) return Array.from(firstPath); return findCommonPrefix(firstPath.filter((segment, i) => segment === secondPath[i]), ...rest); } function makeNode() { return { dynamics: [], shortcuts: [], statics: {}, }; } function isTerminalNode(node) { return node === NODE_SUCCESS || node === NODE_ERRORED; } function cloneTransition(input, offset = 0) { return { to: !isTerminalNode(input.to) ? input.to > 2 ? input.to + offset - 2 : input.to + offset : input.to, reducer: input.reducer, }; } function cloneNode(input, offset = 0) { const output = makeNode(); for (const [test, transition] of input.dynamics) output.dynamics.push([test, cloneTransition(transition, offset)]); for (const transition of input.shortcuts) output.shortcuts.push(cloneTransition(transition, offset)); for (const [segment, transitions] of Object.entries(input.statics)) output.statics[segment] = transitions.map(transition => cloneTransition(transition, offset)); return output; } function registerDynamic(machine, from, test, to, reducer) { machine.nodes[from].dynamics.push([ test, { to, reducer: reducer } ]); } function registerShortcut(machine, from, to, reducer) { machine.nodes[from].shortcuts.push({ to, reducer: reducer }); } function registerStatic(machine, from, test, to, reducer) { let store = !Object.prototype.hasOwnProperty.call(machine.nodes[from].statics, test) ? machine.nodes[from].statics[test] = [] : machine.nodes[from].statics[test]; store.push({ to, reducer: reducer }); } function execute(store, callback, state, segment) { // TypeScript's control flow can't properly narrow // generic conditionals for some mysterious reason if (Array.isArray(callback)) { const [name, ...args] = callback; return store[name](state, segment, ...args); } else { return store[callback](state, segment); } } function suggest(callback, state) { const fn = Array.isArray(callback) ? tests[callback[0]] : tests[callback]; // @ts-ignore if (typeof fn.suggest === `undefined`) return null; const args = Array.isArray(callback) ? callback.slice(1) : []; // @ts-ignore return fn.suggest(state, ...args); } const tests = { always: () => { return true; }, isOptionLike: (state, segment) => { return !state.ignoreOptions && segment.startsWith(`-`); }, isNotOptionLike: (state, segment) => { return state.ignoreOptions || !segment.startsWith(`-`); }, isOption: (state, segment, name, hidden) => { return !state.ignoreOptions && segment === name; }, isBatchOption: (state, segment, names) => { return !state.ignoreOptions && BATCH_REGEX.test(segment) && [...segment.slice(1)].every(name => names.includes(`-${name}`)); }, isBoundOption: (state, segment, names, options) => { const optionParsing = segment.match(BINDING_REGEX); return !state.ignoreOptions && !!optionParsing && OPTION_REGEX.test(optionParsing[1]) && names.includes(optionParsing[1]) // Disallow bound options with no arguments (i.e. booleans) && options.filter(opt => opt.names.includes(optionParsing[1])).every(opt => opt.allowBinding); }, isNegatedOption: (state, segment, name) => { return !state.ignoreOptions && segment === `--no-${name.slice(2)}`; }, isHelp: (state, segment) => { return !state.ignoreOptions && HELP_REGEX.test(segment); }, isUnsupportedOption: (state, segment, names) => { return !state.ignoreOptions && segment.startsWith(`-`) && OPTION_REGEX.test(segment) && !names.includes(segment); }, isInvalidOption: (state, segment) => { return !state.ignoreOptions && segment.startsWith(`-`) && !OPTION_REGEX.test(segment); }, }; // @ts-ignore tests.isOption.suggest = (state, name, hidden = true) => { return !hidden ? [name] : null; }; const reducers = { setCandidateUsage: (state, segment, usage) => { return Object.assign(Object.assign({}, state), { candidateUsage: usage }); }, setSelectedIndex: (state, segment, index) => { return Object.assign(Object.assign({}, state), { selectedIndex: index }); }, pushBatch: (state, segment) => { return Object.assign(Object.assign({}, state), { options: state.options.concat([...segment.slice(1)].map(name => ({ name: `-${name}`, value: true }))) }); }, pushBound: (state, segment) => { const [, name, value] = segment.match(BINDING_REGEX); return Object.assign(Object.assign({}, state), { options: state.options.concat({ name, value }) }); }, pushPath: (state, segment) => { return Object.assign(Object.assign({}, state), { path: state.path.concat(segment) }); }, pushPositional: (state, segment) => { return Object.assign(Object.assign({}, state), { positionals: state.positionals.concat({ value: segment, extra: false }) }); }, pushExtra: (state, segment) => { return Object.assign(Object.assign({}, state), { positionals: state.positionals.concat({ value: segment, extra: true }) }); }, pushExtraNoLimits: (state, segment) => { return Object.assign(Object.assign({}, state), { positionals: state.positionals.concat({ value: segment, extra: NoLimits }) }); }, pushTrue: (state, segment, name = segment) => { return Object.assign(Object.assign({}, state), { options: state.options.concat({ name: segment, value: true }) }); }, pushFalse: (state, segment, name = segment) => { return Object.assign(Object.assign({}, state), { options: state.options.concat({ name, value: false }) }); }, pushUndefined: (state, segment) => { return Object.assign(Object.assign({}, state), { options: state.options.concat({ name: segment, value: undefined }) }); }, pushStringValue: (state, segment) => { var _a; const copy = Object.assign(Object.assign({}, state), { options: [...state.options] }); const lastOption = state.options[state.options.length - 1]; lastOption.value = ((_a = lastOption.value) !== null && _a !== void 0 ? _a : []).concat([segment]); return copy; }, setStringValue: (state, segment) => { const copy = Object.assign(Object.assign({}, state), { options: [...state.options] }); const lastOption = state.options[state.options.length - 1]; lastOption.value = segment; return copy; }, inhibateOptions: (state) => { return Object.assign(Object.assign({}, state), { ignoreOptions: true }); }, useHelp: (state, segment, command) => { const [, name, index] = segment.match(HELP_REGEX); if (typeof index !== `undefined`) { return Object.assign(Object.assign({}, state), { options: [{ name: `-c`, value: String(command) }, { name: `-i`, value: index }] }); } else { return Object.assign(Object.assign({}, state), { options: [{ name: `-c`, value: String(command) }] }); } }, setError: (state, segment, errorMessage) => { if (segment === END_OF_INPUT) { return Object.assign(Object.assign({}, state), { errorMessage: `${errorMessage}.` }); } else { return Object.assign(Object.assign({}, state), { errorMessage: `${errorMessage} ("${segment}").` }); } }, setOptionArityError: (state, segment) => { const lastOption = state.options[state.options.length - 1]; return Object.assign(Object.assign({}, state), { errorMessage: `Not enough arguments to option ${lastOption.name}.` }); }, }; // ------------------------------------------------------------------------ const NoLimits = Symbol(); class CommandBuilder { constructor(cliIndex, cliOpts) { this.allOptionNames = []; this.arity = { leading: [], trailing: [], extra: [], proxy: false }; this.options = []; this.paths = []; this.cliIndex = cliIndex; this.cliOpts = cliOpts; } addPath(path) { this.paths.push(path); } setArity({ leading = this.arity.leading, trailing = this.arity.trailing, extra = this.arity.extra, proxy = this.arity.proxy }) { Object.assign(this.arity, { leading, trailing, extra, proxy }); } addPositional({ name = 'arg', required = true } = {}) { if (!required && this.arity.extra === NoLimits) throw new Error(`Optional parameters cannot be declared when using .rest() or .proxy()`); if (!required && this.arity.trailing.length > 0) throw new Error(`Optional parameters cannot be declared after the required trailing positional arguments`); if (!required && this.arity.extra !== NoLimits) { this.arity.extra.push(name); } else if (this.arity.extra !== NoLimits && this.arity.extra.length === 0) { this.arity.leading.push(name); } else { this.arity.trailing.push(name); } } addRest({ name = 'arg', required = 0 } = {}) { if (this.arity.extra === NoLimits) throw new Error(`Infinite lists cannot be declared multiple times in the same command`); if (this.arity.trailing.length > 0) throw new Error(`Infinite lists cannot be declared after the required trailing positional arguments`); for (let t = 0; t < required; ++t) this.addPositional({ name }); this.arity.extra = NoLimits; } addProxy({ required = 0 } = {}) { this.addRest({ required }); this.arity.proxy = true; } addOption({ names, description, arity = 0, hidden = false, allowBinding = true }) { if (!allowBinding && arity > 1) throw new Error(`The arity cannot be higher than 1 when the option only supports the --arg=value syntax`); if (!Number.isInteger(arity)) throw new Error(`The arity must be an integer, got ${arity}`); if (arity < 0) throw new Error(`The arity must be positive, got ${arity}`); this.allOptionNames.push(...names); this.options.push({ names, description, arity, hidden, allowBinding }); } setContext(context) { this.context = context; } usage({ detailed = true, inlineOptions = true } = {}) { const segments = [this.cliOpts.binaryName]; const detailedOptionList = []; if (this.paths.length > 0) segments.push(...this.paths[0]); if (detailed) { for (const { names, arity, hidden, description } of this.options) { if (hidden) continue; const args = []; for (let t = 0; t < arity; ++t) args.push(` #${t}`); const definition = `${names.join(`,`)}${args.join(``)}`; if (!inlineOptions && description) { detailedOptionList.push({ definition, description }); } else { segments.push(`[${definition}]`); } } segments.push(...this.arity.leading.map(name => `<${name}>`)); if (this.arity.extra === NoLimits) segments.push(`...`); else segments.push(...this.arity.extra.map(name => `[${name}]`)); segments.push(...this.arity.trailing.map(name => `<${name}>`)); } let usage = segments.join(` `); return { usage, options: detailedOptionList }; } compile() { if (typeof this.context === `undefined`) throw new Error(`Assertion failed: No context attached`); const machine = makeStateMachine(); let firstNode = NODE_INITIAL; firstNode = injectNode(machine, makeNode()); registerStatic(machine, NODE_INITIAL, START_OF_INPUT, firstNode, [`setCandidateUsage`, this.usage().usage]); const positionalArgument = this.arity.proxy ? `always` : `isNotOptionLike`; const paths = this.paths.length > 0 ? this.paths : [[]]; for (const path of paths) { let lastPathNode = firstNode; // We allow options to be specified before the path. Note that we // only do this when there is a path, otherwise there would be // some redundancy with the options attached later. if (path.length > 0) { const optionPathNode = injectNode(machine, makeNode()); registerShortcut(machine, lastPathNode, optionPathNode); this.registerOptions(machine, optionPathNode); lastPathNode = optionPathNode; } for (let t = 0; t < path.length; ++t) { const nextPathNode = injectNode(machine, makeNode()); registerStatic(machine, lastPathNode, path[t], nextPathNode, `pushPath`); lastPathNode = nextPathNode; } if (this.arity.leading.length > 0 || !this.arity.proxy) { const helpNode = injectNode(machine, makeNode()); registerDynamic(machine, lastPathNode, `isHelp`, helpNode, [`useHelp`, this.cliIndex]); registerStatic(machine, helpNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, HELP_COMMAND_INDEX]); this.registerOptions(machine, lastPathNode); } if (this.arity.leading.length > 0) registerStatic(machine, lastPathNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); let lastLeadingNode = lastPathNode; for (let t = 0; t < this.arity.leading.length; ++t) { const nextLeadingNode = injectNode(machine, makeNode()); if (!this.arity.proxy) this.registerOptions(machine, nextLeadingNode); if (this.arity.trailing.length > 0 || t + 1 !== this.arity.leading.length) registerStatic(machine, nextLeadingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); registerDynamic(machine, lastLeadingNode, `isNotOptionLike`, nextLeadingNode, `pushPositional`); lastLeadingNode = nextLeadingNode; } let lastExtraNode = lastLeadingNode; if (this.arity.extra === NoLimits || this.arity.extra.length > 0) { const extraShortcutNode = injectNode(machine, makeNode()); registerShortcut(machine, lastLeadingNode, extraShortcutNode); if (this.arity.extra === NoLimits) { const extraNode = injectNode(machine, makeNode()); if (!this.arity.proxy) this.registerOptions(machine, extraNode); registerDynamic(machine, lastLeadingNode, positionalArgument, extraNode, `pushExtraNoLimits`); registerDynamic(machine, extraNode, positionalArgument, extraNode, `pushExtraNoLimits`); registerShortcut(machine, extraNode, extraShortcutNode); } else { for (let t = 0; t < this.arity.extra.length; ++t) { const nextExtraNode = injectNode(machine, makeNode()); if (!this.arity.proxy) this.registerOptions(machine, nextExtraNode); registerDynamic(machine, lastExtraNode, positionalArgument, nextExtraNode, `pushExtra`); registerShortcut(machine, nextExtraNode, extraShortcutNode); lastExtraNode = nextExtraNode; } } lastExtraNode = extraShortcutNode; } if (this.arity.trailing.length > 0) registerStatic(machine, lastExtraNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); let lastTrailingNode = lastExtraNode; for (let t = 0; t < this.arity.trailing.length; ++t) { const nextTrailingNode = injectNode(machine, makeNode()); if (!this.arity.proxy) this.registerOptions(machine, nextTrailingNode); if (t + 1 < this.arity.trailing.length) registerStatic(machine, nextTrailingNode, END_OF_INPUT, NODE_ERRORED, [`setError`, `Not enough positional arguments`]); registerDynamic(machine, lastTrailingNode, `isNotOptionLike`, nextTrailingNode, `pushPositional`); lastTrailingNode = nextTrailingNode; } registerDynamic(machine, lastTrailingNode, positionalArgument, NODE_ERRORED, [`setError`, `Extraneous positional argument`]); registerStatic(machine, lastTrailingNode, END_OF_INPUT, NODE_SUCCESS, [`setSelectedIndex`, this.cliIndex]); } return { machine, context: this.context, }; } registerOptions(machine, node) { registerDynamic(machine, node, [`isOption`, `--`], node, `inhibateOptions`); registerDynamic(machine, node, [`isBatchOption`, this.allOptionNames], node, `pushBatch`); registerDynamic(machine, node, [`isBoundOption`, this.allOptionNames, this.options], node, `pushBound`); registerDynamic(machine, node, [`isUnsupportedOption`, this.allOptionNames], NODE_ERRORED, [`setError`, `Unsupported option name`]); registerDynamic(machine, node, [`isInvalidOption`], NODE_ERRORED, [`setError`, `Invalid option name`]); for (const option of this.options) { const longestName = option.names.reduce((longestName, name) => { return name.length > longestName.length ? name : longestName; }, ``); if (option.arity === 0) { for (const name of option.names) { registerDynamic(machine, node, [`isOption`, name, option.hidden || name !== longestName], node, `pushTrue`); if (name.startsWith(`--`) && !name.startsWith(`--no-`)) { registerDynamic(machine, node, [`isNegatedOption`, name], node, [`pushFalse`, name]); } } } else { // We inject a new node at the end of the state machine let lastNode = injectNode(machine, makeNode()); // We register transitions from the starting node to this new node for (const name of option.names) { registerDynamic(machine, node, [`isOption`, name, option.hidden || name !== longestName], lastNode, `pushUndefined`); } // For each argument, we inject a new node at the end and we // register a transition from the current node to this new node for (let t = 0; t < option.arity; ++t) { const nextNode = injectNode(machine, makeNode()); // We can provide better errors when another option or END_OF_INPUT is encountered registerStatic(machine, lastNode, END_OF_INPUT, NODE_ERRORED, `setOptionArityError`); registerDynamic(machine, lastNode, `isOptionLike`, NODE_ERRORED, `setOptionArityError`); // If the option has a single argument, no need to store it in an array const action = option.arity === 1 ? `setStringValue` : `pushStringValue`; registerDynamic(machine, lastNode, `isNotOptionLike`, nextNode, action); lastNode = nextNode; } // In the end, we register a shortcut from // the last node back to the starting node registerShortcut(machine, lastNode, node); } } } } class CliBuilder { constructor({ binaryName = `...` } = {}) { this.builders = []; this.opts = { binaryName }; } static build(cbs, opts = {}) { return new CliBuilder(opts).commands(cbs).compile(); } getBuilderByIndex(n) { if (!(n >= 0 && n < this.builders.length)) throw new Error(`Assertion failed: Out-of-bound command index (${n})`); return this.builders[n]; } commands(cbs) { for (const cb of cbs) cb(this.command()); return this; } command() { const builder = new CommandBuilder(this.builders.length, this.opts); this.builders.push(builder); return builder; } compile() { const machines = []; const contexts = []; for (const builder of this.builders) { const { machine, context } = builder.compile(); machines.push(machine); contexts.push(context); } const machine = makeAnyOfMachine(machines); simplifyMachine(machine); return { machine, contexts, process: (input) => { return runMachine(machine, input); }, suggest: (input, partial) => { return suggestMachine(machine, input, partial); }, }; } } class Command { constructor() { /** * Predefined that will be set to true if `-h,--help` has been used, in which case `Command#execute` shouldn't be called. */ this.help = false; } static getMeta(prototype) { const base = prototype.constructor; return base.meta = Object.prototype.hasOwnProperty.call(base, `meta`) ? base.meta : { definitions: [], transformers: [ (state, command) => { for (const { name, value } of state.options) { if (name === `-h` || name === `--help`) { // @ts-ignore: The property is meant to have been defined by the child class command.help = value; } } }, ], }; } static resolveMeta(prototype) { const definitions = []; const transformers = []; for (let proto = prototype; proto instanceof Command; proto = proto.__proto__) { const meta = this.getMeta(proto); for (const definition of meta.definitions) definitions.push(definition); for (const transformer of meta.transformers) { transformers.push(transformer); } } return { definitions, transformers, }; } static registerDefinition(prototype, definition) { this.getMeta(prototype).definitions.push(definition); } static registerTransformer(prototype, transformer) { this.getMeta(prototype).transformers.push(transformer); } static addPath(...path) { this.Path(...path)(this.prototype, `execute`); } static addOption(name, builder) { builder(this.prototype, name); } /** * Wrap the specified command to be attached to the given path on the command line. * The first path thus attached will be considered the "main" one, and all others will be aliases. * @param path The command path. */ static Path(...path) { return (prototype, propertyName) => { this.registerDefinition(prototype, command => { command.addPath(path); }); }; } /** * Register a boolean listener for the given option names. When Clipanion detects that this argument is present, the value will be set to false. The value won't be set unless the option is found, so you must remember to set it to an appropriate default value. * @param descriptor the option names. */ static Boolean(descriptor, { hidden = false, description } = {}) { return (prototype, propertyName) => { const optNames = descriptor.split(`,`); this.registerDefinition(prototype, command => { command.addOption({ names: optNames, arity: 0, hidden, allowBinding: false, description }); }); this.registerTransformer(prototype, (state, command) => { for (const { name, value } of state.options) { if (optNames.includes(name)) { // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = value; } } }); }; } /** * Register a boolean listener for the given option names. Each time Clipanion detects that this argument is present, the counter will be incremented. Each time the argument is negated, the counter will be reset to `0`. The counter won't be set unless the option is found, so you must remember to set it to an appropriate default value. * @param descriptor A comma-separated list of option names. */ static Counter(descriptor, { hidden = false, description } = {}) { return (prototype, propertyName) => { const optNames = descriptor.split(`,`); this.registerDefinition(prototype, command => { command.addOption({ names: optNames, arity: 0, hidden, allowBinding: false, description }); }); this.registerTransformer(prototype, (state, command) => { var _a; for (const { name, value } of state.options) { if (optNames.includes(name)) { // @ts-ignore: The property is meant to have been defined by the child class (_a = command[propertyName]) !== null && _a !== void 0 ? _a : (command[propertyName] = 0); // Negated options reset the counter if (!value) { // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = 0; } else { // @ts-ignore: The property is meant to have been defined by the child class command[propertyName]++; } } } }); }; } static String(descriptor = {}, { arity = 1, tolerateBoolean = false, hidden = false, description } = {}) { return (prototype, propertyName) => { if (typeof descriptor === `string`) { const optNames = descriptor.split(`,`); this.registerDefinition(prototype, command => { // If tolerateBoolean is specified, the command will only accept a string value // using the bind syntax and will otherwise act like a boolean option command.addOption({ names: optNames, arity: tolerateBoolean ? 0 : arity, hidden, description }); }); this.registerTransformer(prototype, (state, command) => { for (const { name, value } of state.options) { if (optNames.includes(name)) { // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = value; } } }); } else { const { name = propertyName, required = true } = descriptor; this.registerDefinition(prototype, command => { command.addPositional({ name, required }); }); this.registerTransformer(prototype, (state, command) => { for (let i = 0; i < state.positionals.length; ++i) { // We skip NoLimits extras. We only care about // required and optional finite positionals. if (state.positionals[i].extra === NoLimits) continue; // We skip optional positionals when we only // care about required positionals. if (required && state.positionals[i].extra === true) continue; // We skip required positionals when we only // care about optional positionals. if (!required && state.positionals[i].extra === false) continue; // We remove the positional from the list const [positional] = state.positionals.splice(i, 1); // We assign its value to the property. // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = positional.value; // We stop after the first successful iteration. break; } }); } }; } /** * Register a listener that looks for an option and its followup argument. When Clipanion detects that this argument is present, the value will be pushed into the array represented in the property. */ static Array(descriptor, { arity = 1, hidden = false, description } = {}) { return (prototype, propertyName) => { if (arity === 0) throw new Error(`Array options are expected to have at least an arity of 1`); const optNames = descriptor.split(`,`); this.registerDefinition(prototype, command => { command.addOption({ names: optNames, arity, hidden, description }); }); this.registerTransformer(prototype, (state, command) => { for (const { name, value } of state.options) { if (optNames.includes(name)) { // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = command[propertyName] || []; // @ts-ignore: The property is meant to have been defined by the child class command[propertyName].push(value); } } }); }; } static Rest({ required = 0 } = {}) { return (prototype, propertyName) => { this.registerDefinition(prototype, command => { command.addRest({ name: propertyName, required }); }); this.registerTransformer(prototype, (state, command, builder) => { // The builder's arity.extra will always be NoLimits, // because it is set when we call registerDefinition const isRestPositional = (index) => { const positional = state.positionals[index]; // A NoLimits extra (i.e. an optional rest argument) if (positional.extra === NoLimits) return true; // A leading positional (i.e. a required rest argument) if (positional.extra === false && index < builder.arity.leading.length) return true; return false; }; let count = 0; while (count < state.positionals.length && isRestPositional(count)) count += 1; // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = state.positionals .splice(0, count) .map(({ value }) => value); }); }; } /** * Register a listener that takes all the arguments remaining (including options and such) and store them into the selected property. * Note that all methods affecting positional arguments are evaluated in the definition order; don't mess with it (for example sorting your properties in ascendent order might have adverse results). */ static Proxy({ required = 0 } = {}) { return (prototype, propertyName) => { this.registerDefinition(prototype, command => { command.addProxy({ required }); }); this.registerTransformer(prototype, (state, command) => { // No need to filter / splice any positionals for Command.Proxy. // Once inside a proxy, we've already reached the point of no return. // @ts-ignore: The property is meant to have been defined by the child class command[propertyName] = state.positionals.map(({ value }) => value); }); }; } /** * Defines the usage information for the given command. * @param usage */ static Usage(usage) { return usage; } /** * Defines the schema for the given command. * @param schema */ static Schema(schema) { return schema; } /** * Standard error handler which will simply rethrow the error. Can be used to add custom logic to handle errors * from the command or simply return the parent class error handling. * @param error */ async catch(error) { throw error; } async validateAndExecute() { const commandClass = this.constructor; const schema = commandClass.schema; if (typeof schema !== `undefined`) { try { await schema.validate(this); } catch (error) { if (error.name === `ValidationError`) error.clipanion = { type: `usage` }; throw error; } } const exitCode = await this.execute(); if (typeof exitCode !== `undefined`) { return exitCode; } else { return 0; } } } /** * A list of useful semi-opinionated command entries that have to be registered manually. * * They cover the basic needs of most CLIs (e.g. help command, version command). * * @example * cli.register(Command.Entries.Help); * cli.register(Command.Entries.Version); */ Command.Entries = {}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. 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. ***************************************************************************** */ function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } class HelpCommand extends Command { async execute() { this.context.stdout.write(this.cli.usage(null)); } } __decorate([ Command.Path(`--help`), Command.Path(`-h`) ], HelpCommand.prototype, "execute", null); class VersionCommand extends Command { async execute() { var _a; this.context.stdout.write(`${(_a = this.cli.binaryVersion) !== null && _a !== void 0 ? _a : ``}\n`); } } __decorate([ Command.Path(`--version`), Command.Path(`-v`) ], VersionCommand.prototype, "execute", null); const richFormat = { bold: str => `\x1b[1m${str}\x1b[22m`, error: str => `\x1b[31m\x1b[1m${str}\x1b[22m\x1b[39m`, code: str => `\x1b[36m${str}\x1b[39m`, }; const textFormat = { bold: str => str, error: str => str, code: str => str, }; function formatMarkdownish(text, { format, paragraphs }) { // Enforce \n as newline character text = text.replace(/\r\n?/g, `\n`); // Remove the indentation, since it got messed up with the JS indentation text = text.replace(/^[\t ]+|[\t ]+$/gm, ``); // Remove surrounding newlines, since they got added for JS formatting text = text.replace(/^\n+|\n+$/g, ``); // List items always end with at least two newlines (in order to not be collapsed) text = text.replace(/^-([^\n]*?)\n+/gm, `-$1\n\n`); // Single newlines are removed; larger than that are collapsed into one text = text.replace(/\n(\n)?\n*/g, `$1`); if (paragraphs) { text = text.split(/\n/).map(function (paragraph) { // Does the paragraph starts with a list? let bulletMatch = paragraph.match(/^[*-][\t ]+(.*)/); if (!bulletMatch) // No, cut the paragraphs into segments of 80 characters return paragraph.match(/(.{1,80})(?: |$)/g).join('\n'); // Yes, cut the paragraphs into segments of 78 characters (to account for the prefix) return bulletMatch[1].match(/(.{1,78})(?: |$)/g).map((line, index) => { return (index === 0 ? `- ` : ` `) + line; }).join(`\n`); }).join(`\n\n`); } // Highlight the code segments text = text.replace(/(`+)((?:.|[\n])*?)\1/g, function ($0, $1, $2) { return format.code($1 + $2 + $1); }); return text ? text + `\n` : ``; } class HelpCommand$1 extends Command { constructor(contexts) { super(); this.contexts = contexts; this.commands = []; } static from(state, contexts) { const command = new HelpCommand$1(contexts); command.path = state.path; for (const opt of state.options) { switch (opt.name) { case `-c`: { command.commands.push(Number(opt.value)); } break; case `-i`: { command.index = Number(opt.value); } break; } } return command; } async execute() { let commands = this.commands; if (typeof this.index !== `undefined` && this.index >= 0 && this.index < commands.length) commands = [commands[this.index]]; if (commands.length === 0) { this.context.stdout.write(this.cli.usage()); } else if (commands.length === 1) { this.context.stdout.write(this.cli.usage(this.contexts[commands[0]].commandClass, { detailed: true })); } else if (commands.length > 1) { this.context.stdout.write(`Multiple commands match your selection:\n`); this.context.stdout.write(`\n`); let index = 0; for (const command of this.commands) this.context.stdout.write(this.cli.usage(this.contexts[command].commandClass, { prefix: `${index++}. `.padStart(5) })); this.context.stdout.write(`\n`); this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands.\n`); } } } function getDefaultColorSettings() { if (process.env.FORCE_COLOR === `0`) return false; if (process.env.FORCE_COLOR === `1`) return true; if (typeof process.stdout !== `undefined` && process.stdout.isTTY) return true; return false; } /** * @template Context The context shared by all commands. Contexts are a set of values, defined when calling the `run`/`runExit` functions from the CLI instance, that will be made available to the commands via `this.context`. */ class Cli { constructor({ binaryLabel, binaryName: binaryNameOpt = `...`, binaryVersion, enableColors = getDefaultColorSettings() } = {}) { this.registrations = new Map(); this.builder = new CliBuilder({ binaryName: binaryNameOpt }); this.binaryLabel = binaryLabel; this.binaryName = binaryNameOpt; this.binaryVersion = binaryVersion; this.enableColors = enableColors; } /** * Creates a new Cli and registers all commands passed as parameters. * * @param commandClasses The Commands to register * @returns The created `Cli` instance */ static from(commandClasses, options = {}) { const cli = new Cli(options); for (const commandClass of commandClasses) cli.register(commandClass); return cli; } /** * Registers a command inside the CLI. */ register(commandClass) { const commandBuilder = this.builder.command(); this.registrations.set(commandClass, commandBuilder.cliIndex); const { definitions } = commandClass.resolveMeta(commandClass.prototype); for (const definition of definitions) definition(commandBuilder); commandBuilder.setContext({ commandClass, }); } process(input) { const { contexts, process } = this.builder.compile(); const state = process(input); switch (state.selectedIndex) { case HELP_COMMAND_INDEX: { return HelpCommand$1.from(state, contexts); } default: { const { commandClass } = contexts[state.selectedIndex]; const index = this.registrations.get(commandClass); if (typeof index === `undefined`) throw new Error(`Assertion failed: Expected the command class to have been registered.`); const commandBuilder = this.builder.getBuilderByIndex(index); const command = new commandClass(); command.path = state.path; const { transformers } = commandClass.resolveMeta(commandClass.prototype); for (const transformer of transformers) transformer(state, command, commandBuilder); return command; } } } async run(input, context) { let command; if (!Array.isArray(input)) { command = input; } else { try { command = this.process(input); } catch (error) { context.stdout.write(this.error(error)); return 1; } } if (command.help) { context.stdout.write(this.usage(command, { detailed: true })); return 0; } command.context = context; command.cli = { binaryLabel: this.binaryLabel, binaryName: this.binaryName, binaryVersion: this.binaryVersion, enableColors: this.enableColors, definitions: () => this.definitions(), error: (error, opts) => this.error(error, opts), process: input => this.process(input), run: (input, subContext) => this.run(input, Object.assign(Object.assign({}, context), subContext)), usage: (command, opts) => this.usage(command, opts), }; let exitCode; try { exitCode = await command.validateAndExecute().catch(error => command.catch(error).then(() => 0)); } catch (error) { context.stdout.write(this.error(error, { command })); return 1; } return exitCode; } /** * Runs a command and exits the current `process` with the exit code returned by the command. * * @param input An array containing the name of the command and its arguments. * * @example * cli.runExit(process.argv.slice(2), Cli.defaultContext) */ async runExit(input, context) { process.exitCode = await this.run(input, context); } suggest(input, partial) { const { contexts, process, suggest } = this.builder.compile(); return suggest(input, partial); } definitions({ colored = false } = {}) { const data = []; for (const [commandClass, number] of this.registrations) { if (typeof commandClass.usage === `undefined`) continue; const { usage: path } = this.getUsageByIndex(number, { detailed: false }); const { usage, options } = this.getUsageByIndex(number, { detailed: true, inlineOptions: false }); const category = typeof commandClass.usage.category !== `undefined` ? formatMarkdownish(commandClass.usage.category, { format: this.format(colored), paragraphs: false }) : undefined; const description = typeof commandClass.usage.description !== `undefined` ? formatMarkdownish(commandClass.usage.description, { format: this.format(colored), paragraphs: false }) : undefined; const details = typeof commandClass.usage.details !== `undefined` ? formatMarkdownish(commandClass.usage.details, { format: this.format(colored), paragraphs: true }) : undefined; const examples = typeof commandClass.usage.examples !== `undefined` ? commandClass.usage.examples.map(([label, cli]) => [formatMarkdownish(label, { format: this.format(colored), paragraphs: false }), cli.replace(/\$0/g, this.binaryName)]) : undefined; data.push({ path, usage, category, description, details, examples, options }); } return data; } usage(command = null, { colored, detailed = false, prefix = `$ ` } = {}) { // @ts-ignore const commandClass = command !== null && typeof command.getMeta === `undefined` ? command.constructor : command; let result = ``; if (!commandClass) { const commandsByCategories = new Map(); for (const [commandClass, number] of this.registrations.entries()) { if (typeof commandClass.usage === `undefined`) continue; const category = typeof commandClass.usage.category !== `undefined` ? formatMarkdownish(commandClass.usage.category, { format: this.format(colored), paragraphs: false }) : null; let categoryCommands = commandsByCategories.get(category); if (typeof categoryCommands === `undefined`) commandsByCategories.set(category, categoryCommands = []); const { usage } = this.getUsageByIndex(number); categoryCommands.push({ commandClass, usage }); } const categoryNames = Array.from(commandsByCategories.keys()).sort((a, b) => { if (a === null) return -1; if (b === null) return +1; return a.localeCompare(b, `en`, { usage: `sort`, caseFirst: `upper` }); }); const hasLabel = typeof this.binaryLabel !== `undefined`; const hasVersion = typeof this.binaryVersion !== `undefined`; if (hasLabel || hasVersion) { if (hasLabel && hasVersion) result += `${this.format(colored).bold(`${this.binaryLabel} - ${this.binaryVersion}`)}\n\n`; else if (hasLabel) result += `${this.format(colored).bold(`${this.binaryLabel}`)}\n`; else result += `${this.format(colored).bold(`${this.binaryVersion}`)}\n`; result += ` ${this.format(colored).bold(prefix)}${this.binaryName} \n`; } else { result += `${this.format(colored).bold(prefix)}${this.binaryName} \n`; } for (let categoryName of categoryNames) { const commands = commandsByCategories.get(categoryName).slice().sort((a, b) => { return a.usage.localeCompare(b.usage, `en`, { usage: `sort`, caseFirst: `upper` }); }); const header = categoryName !== null ? categoryName.trim() : `Where is one of`; result += `\n`; result += `${this.format(colored).bold(`${header}:`)}\n`; for (let { commandClass, usage } of commands) { const doc = commandClass.usage.description || `undocumented`; result += `\n`; result += ` ${this.format(colored).bold(usage)}\n`; result += ` ${formatMarkdownish(doc, { format: this.format(colored), paragraphs: false })}`; } } result += `\n`; result += formatMarkdownish(`You can also print more details about any of these commands by calling them after adding the \`-h,--help\` flag right after the command name.`, { format: this.format(colored), paragraphs: true }); } else { if (!detailed) { const { usage } = this.getUsageByRegistration(commandClass); result += `${this.format(colored).bold(prefix)}${usage}\n`; } else { const { description = ``, details = ``, examples = [], } = commandClass.usage || {}; if (description !== ``) { result += formatMarkdownish(description, { format: this.format(colored), paragraphs: false }).replace(/^./, $0 => $0.toUpperCase()); result += `\n`; } if (details !== `` || examples.length > 0) { result += `${this.format(colored).bold(`Usage:`)}\n`; result += `\n`; } const { usage, options } = this.getUsageByRegistration(commandClass, { inlineOptions: false }); result += `${this.format(colored).bold(prefix)}${usage}\n`; if (options.length > 0) { result += `\n`; result += `${richFormat.bold('Options:')}\n`; const maxDefinitionLength = options.reduce((length, option) => { return Math.max(length, option.definition.length); }, 0); result += `\n`; for (const { definition, description } of options) { result += ` ${definition.padEnd(maxDefinitionLength)} ${formatMarkdownish(description, { format: this.format(colored), paragraphs: false })}`; } } if (details !== ``) { result += `\n`; result += `${this.format(colored).bold(`Details:`)}\n`; result += `\n`; result += formatMarkdownish(details, { format: this.format(colored), paragraphs: true }); } if (examples.length > 0) { result += `\n`; result += `${this.format(colored).bold(`Examples:`)}\n`; for (let [description, example] of examples) { result += `\n`; result += formatMarkdownish(description, { format: this.format(colored), paragraphs: false }); result += example .replace(/^/m, ` ${this.format(colored).bold(prefix)}`) .replace(/\$0/g, this.binaryName) + `\n`; } } } } return result; } error(error, { colored, command = null } = {}) { if (!(error instanceof Error)) error = new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(error)})`); let result = ``; let name = error.name.replace(/([a-z])([A-Z])/g, `$1 $2`); if (name === `Error`) name = `Internal Error`; result += `${this.format(colored).error(name)}: ${error.message}\n`; // @ts-ignore const meta = error.clipanion; if (typeof meta !== `undefined`) { if (meta.type === `usage`) { result += `\n`; result += this.usage(command); } } else { if (error.stack) { result += `${error.stack.replace(/^.*\n/, ``)}\n`; } } return result; } getUsageByRegistration(klass, opts) { const index = this.registrations.get(klass); if (typeof index === `undefined`) throw new Error(`Assertion failed: Unregistered command`); return this.getUsageByIndex(index, opts); } getUsageByIndex(n, opts) { return this.builder.getBuilderByIndex(n).usage(opts); } format(colored = this.enableColors) { return colored ? richFormat : textFormat; } } /** * The default context of the CLI. * * Contains the stdio of the current `process`. */ Cli.defaultContext = { stdin: process.stdin, stdout: process.stdout, stderr: process.stderr, }; Command.Entries.Help = HelpCommand; Command.Entries.Version = VersionCommand; exports.Cli = Cli; exports.Command = Command; exports.UsageError = UsageError; /***/ }), /***/ 79715: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const PassThrough = __webpack_require__(92413).PassThrough; const mimicResponse = __webpack_require__(66344); const cloneResponse = response => { if (!(response && response.pipe)) { throw new TypeError('Parameter `response` must be a response stream.'); } const clone = new PassThrough(); mimicResponse(response, clone); return response.pipe(clone); }; module.exports = cloneResponse; /***/ }), /***/ 16497: /***/ ((__unused_webpack_module, exports) => { // 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. // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(arg) { if (Array.isArray) { return Array.isArray(arg); } return objectToString(arg) === '[object Array]'; } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg !== null; } exports.isObject = isObject; function isDate(d) { return objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return (objectToString(e) === '[object Error]' || e instanceof Error); } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; exports.isBuffer = Buffer.isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); } /***/ }), /***/ 75487: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const binding = __webpack_require__(62536); module.exports = binding.getCPUInfo; /***/ }), /***/ 10346: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Transform, PassThrough} = __webpack_require__(92413); const zlib = __webpack_require__(78761); const mimicResponse = __webpack_require__(91511); module.exports = response => { const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) { return response; } // TODO: Remove this when targeting Node.js 12. const isBrotli = contentEncoding === 'br'; if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') { response.destroy(new Error('Brotli is not supported on Node.js < 12')); return response; } let isEmpty = true; const checker = new Transform({ transform(data, _encoding, callback) { isEmpty = false; callback(null, data); }, flush(callback) { callback(); } }); const finalStream = new PassThrough({ autoDestroy: false, destroy(error, callback) { response.destroy(); callback(error); } }); const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip(); decompressStream.once('error', error => { if (isEmpty && !response.readable) { finalStream.end(); return; } finalStream.destroy(error); }); mimicResponse(response, finalStream); response.pipe(checker).pipe(decompressStream).pipe(finalStream); return finalStream; }; /***/ }), /***/ 91511: /***/ ((module) => { "use strict"; // We define these manually to ensure they're always copied // even if they would move up the prototype chain // https://nodejs.org/api/http.html#http_class_http_incomingmessage const knownProperties = [ 'aborted', 'complete', 'headers', 'httpVersion', 'httpVersionMinor', 'httpVersionMajor', 'method', 'rawHeaders', 'rawTrailers', 'setTimeout', 'socket', 'statusCode', 'statusMessage', 'trailers', 'url' ]; module.exports = (fromStream, toStream) => { if (toStream._readableState.autoDestroy) { throw new Error('The second stream must have the `autoDestroy` option set to `false`'); } const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties)); const properties = {}; for (const property of fromProperties) { // Don't overwrite existing properties. if (property in toStream) { continue; } properties[property] = { get() { const value = fromStream[property]; const isFunction = typeof value === 'function'; return isFunction ? value.bind(fromStream) : value; }, set(value) { fromStream[property] = value; }, enumerable: true, configurable: false }; } Object.defineProperties(toStream, properties); fromStream.once('aborted', () => { toStream.destroy(); toStream.emit('aborted'); }); fromStream.once('close', () => { if (fromStream.complete) { if (toStream.readable) { toStream.once('end', () => { toStream.emit('close'); }); } else { toStream.emit('close'); } } else { toStream.emit('close'); } }); return toStream; }; /***/ }), /***/ 1313: /***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); function isTLSSocket(socket) { return socket.encrypted; } const deferToConnect = (socket, fn) => { let listeners; if (typeof fn === 'function') { const connect = fn; listeners = { connect }; } else { listeners = fn; } const hasConnectListener = typeof listeners.connect === 'function'; const hasSecureConnectListener = typeof listeners.secureConnect === 'function'; const hasCloseListener = typeof listeners.close === 'function'; const onConnect = () => { if (hasConnectListener) { listeners.connect(); } if (isTLSSocket(socket) && hasSecureConnectListener) { if (socket.authorized) { listeners.secureConnect(); } else if (!socket.authorizationError) { socket.once('secureConnect', listeners.secureConnect); } } if (hasCloseListener) { socket.once('close', listeners.close); } }; if (socket.writable && !socket.connecting) { onConnect(); } else if (socket.connecting) { socket.once('connect', onConnect); } else if (socket.destroyed && hasCloseListener) { listeners.close(socket._hadError); } }; exports.default = deferToConnect; // For CommonJS default export support module.exports = deferToConnect; module.exports.default = deferToConnect; /***/ }), /***/ 88507: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Diff": () => (/* binding */ Diff), /* harmony export */ "diffChars": () => (/* binding */ diffChars), /* harmony export */ "diffWords": () => (/* binding */ diffWords), /* harmony export */ "diffWordsWithSpace": () => (/* binding */ diffWordsWithSpace), /* harmony export */ "diffLines": () => (/* binding */ diffLines), /* harmony export */ "diffTrimmedLines": () => (/* binding */ diffTrimmedLines), /* harmony export */ "diffSentences": () => (/* binding */ diffSentences), /* harmony export */ "diffCss": () => (/* binding */ diffCss), /* harmony export */ "diffJson": () => (/* binding */ diffJson), /* harmony export */ "diffArrays": () => (/* binding */ diffArrays), /* harmony export */ "structuredPatch": () => (/* binding */ structuredPatch), /* harmony export */ "createTwoFilesPatch": () => (/* binding */ createTwoFilesPatch), /* harmony export */ "createPatch": () => (/* binding */ createPatch), /* harmony export */ "applyPatch": () => (/* binding */ applyPatch), /* harmony export */ "applyPatches": () => (/* binding */ applyPatches), /* harmony export */ "parsePatch": () => (/* binding */ parsePatch), /* harmony export */ "merge": () => (/* binding */ merge), /* harmony export */ "convertChangesToDMP": () => (/* binding */ convertChangesToDMP), /* harmony export */ "convertChangesToXML": () => (/* binding */ convertChangesToXML), /* harmony export */ "canonicalize": () => (/* binding */ canonicalize) /* harmony export */ }); function Diff() {} Diff.prototype = { diff: function diff(oldString, newString) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var callback = options.callback; if (typeof options === 'function') { callback = options; options = {}; } this.options = options; var self = this; function done(value) { if (callback) { setTimeout(function () { callback(undefined, value); }, 0); return true; } else { return value; } } // Allow subclasses to massage the input prior to running oldString = this.castInput(oldString); newString = this.castInput(newString); oldString = this.removeEmpty(this.tokenize(oldString)); newString = this.removeEmpty(this.tokenize(newString)); var newLen = newString.length, oldLen = oldString.length; var editLength = 1; var maxEditLength = newLen + oldLen; var bestPath = [{ newPos: -1, components: [] }]; // Seed editLength = 0, i.e. the content starts with the same values var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { // Identity per the equality and tokenizer return done([{ value: this.join(newString), count: newString.length }]); } // Main worker method. checks all permutations of a given edit length for acceptance. function execEditLength() { for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { var basePath = void 0; var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; if (addPath) { // No one else is going to attempt to use this value, clear it bestPath[diagonalPath - 1] = undefined; } var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; if (!canAdd && !canRemove) { // If this path is a terminal then prune bestPath[diagonalPath] = undefined; continue; } // Select the diagonal that we want to branch from. We select the prior // path whose position in the new string is the farthest from the origin // and does not pass the bounds of the diff graph if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { basePath = clonePath(removePath); self.pushComponent(basePath.components, undefined, true); } else { basePath = addPath; // No need to clone, we've pulled it from the list basePath.newPos++; self.pushComponent(basePath.components, true, undefined); } _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); } else { // Otherwise track this path as a potential candidate and continue. bestPath[diagonalPath] = basePath; } } editLength++; } // Performs the length of edit iteration. Is a bit fugly as this has to support the // sync and async mode which is never fun. Loops over execEditLength until a value // is produced. if (callback) { (function exec() { setTimeout(function () { // This should not happen, but we want to be safe. /* istanbul ignore next */ if (editLength > maxEditLength) { return callback(); } if (!execEditLength()) { exec(); } }, 0); })(); } else { while (editLength <= maxEditLength) { var ret = execEditLength(); if (ret) { return ret; } } } }, pushComponent: function pushComponent(components, added, removed) { var last = components[components.length - 1]; if (last && last.added === added && last.removed === removed) { // We need to clone here as the component clone operation is just // as shallow array clone components[components.length - 1] = { count: last.count + 1, added: added, removed: removed }; } else { components.push({ count: 1, added: added, removed: removed }); } }, extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { newPos++; oldPos++; commonCount++; } if (commonCount) { basePath.components.push({ count: commonCount }); } basePath.newPos = newPos; return oldPos; }, equals: function equals(left, right) { if (this.options.comparator) { return this.options.comparator(left, right); } else { return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); } }, removeEmpty: function removeEmpty(array) { var ret = []; for (var i = 0; i < array.length; i++) { if (array[i]) { ret.push(array[i]); } } return ret; }, castInput: function castInput(value) { return value; }, tokenize: function tokenize(value) { return value.split(''); }, join: function join(chars) { return chars.join(''); } }; function buildValues(diff, components, newString, oldString, useLongestToken) { var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; for (; componentPos < componentLen; componentPos++) { var component = components[componentPos]; if (!component.removed) { if (!component.added && useLongestToken) { var value = newString.slice(newPos, newPos + component.count); value = value.map(function (value, i) { var oldValue = oldString[oldPos + i]; return oldValue.length > value.length ? oldValue : value; }); component.value = diff.join(value); } else { component.value = diff.join(newString.slice(newPos, newPos + component.count)); } newPos += component.count; // Common case if (!component.added) { oldPos += component.count; } } else { component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); oldPos += component.count; // Reverse add and remove so removes are output first to match common convention // The diffing algorithm is tied to add then remove output and this is the simplest // route to get the desired output with minimal overhead. if (componentPos && components[componentPos - 1].added) { var tmp = components[componentPos - 1]; components[componentPos - 1] = components[componentPos]; components[componentPos] = tmp; } } } // Special case handle for when one terminal is ignored (i.e. whitespace). // For this case we merge the terminal into the prior string and drop the change. // This is only available for string mode. var lastComponent = components[componentLen - 1]; if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { components[componentLen - 2].value += lastComponent.value; components.pop(); } return components; } function clonePath(path) { return { newPos: path.newPos, components: path.components.slice(0) }; } var characterDiff = new Diff(); function diffChars(oldStr, newStr, options) { return characterDiff.diff(oldStr, newStr, options); } function generateOptions(options, defaults) { if (typeof options === 'function') { defaults.callback = options; } else if (options) { for (var name in options) { /* istanbul ignore else */ if (options.hasOwnProperty(name)) { defaults[name] = options[name]; } } } return defaults; } // // Ranges and exceptions: // Latin-1 Supplement, 0080–00FF // - U+00D7 × Multiplication sign // - U+00F7 ÷ Division sign // Latin Extended-A, 0100–017F // Latin Extended-B, 0180–024F // IPA Extensions, 0250–02AF // Spacing Modifier Letters, 02B0–02FF // - U+02C7 ˇ ˇ Caron // - U+02D8 ˘ ˘ Breve // - U+02D9 ˙ ˙ Dot Above // - U+02DA ˚ ˚ Ring Above // - U+02DB ˛ ˛ Ogonek // - U+02DC ˜ ˜ Small Tilde // - U+02DD ˝ ˝ Double Acute Accent // Latin Extended Additional, 1E00–1EFF var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; var reWhitespace = /\S/; var wordDiff = new Diff(); wordDiff.equals = function (left, right) { if (this.options.ignoreCase) { left = left.toLowerCase(); right = right.toLowerCase(); } return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); }; wordDiff.tokenize = function (value) { var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. for (var i = 0; i < tokens.length - 1; i++) { // If we have an empty string in the next field and we have only word chars before and after, merge if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { tokens[i] += tokens[i + 2]; tokens.splice(i + 1, 2); i--; } } return tokens; }; function diffWords(oldStr, newStr, options) { options = generateOptions(options, { ignoreWhitespace: true }); return wordDiff.diff(oldStr, newStr, options); } function diffWordsWithSpace(oldStr, newStr, options) { return wordDiff.diff(oldStr, newStr, options); } var lineDiff = new Diff(); lineDiff.tokenize = function (value) { var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line if (!linesAndNewlines[linesAndNewlines.length - 1]) { linesAndNewlines.pop(); } // Merge the content and line separators into single tokens for (var i = 0; i < linesAndNewlines.length; i++) { var line = linesAndNewlines[i]; if (i % 2 && !this.options.newlineIsToken) { retLines[retLines.length - 1] += line; } else { if (this.options.ignoreWhitespace) { line = line.trim(); } retLines.push(line); } } return retLines; }; function diffLines(oldStr, newStr, callback) { return lineDiff.diff(oldStr, newStr, callback); } function diffTrimmedLines(oldStr, newStr, callback) { var options = generateOptions(callback, { ignoreWhitespace: true }); return lineDiff.diff(oldStr, newStr, options); } var sentenceDiff = new Diff(); sentenceDiff.tokenize = function (value) { return value.split(/(\S.+?[.!?])(?=\s+|$)/); }; function diffSentences(oldStr, newStr, callback) { return sentenceDiff.diff(oldStr, newStr, callback); } var cssDiff = new Diff(); cssDiff.tokenize = function (value) { return value.split(/([{}:;,]|\s+)/); }; function diffCss(oldStr, newStr, callback) { return cssDiff.diff(oldStr, newStr, callback); } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } var objectPrototypeToString = Object.prototype.toString; var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: jsonDiff.useLongestToken = true; jsonDiff.tokenize = lineDiff.tokenize; jsonDiff.castInput = function (value) { var _this$options = this.options, undefinedReplacement = _this$options.undefinedReplacement, _this$options$stringi = _this$options.stringifyReplacer, stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { return typeof v === 'undefined' ? undefinedReplacement : v; } : _this$options$stringi; return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); }; jsonDiff.equals = function (left, right) { return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); }; function diffJson(oldObj, newObj, options) { return jsonDiff.diff(oldObj, newObj, options); } // This function handles the presence of circular references by bailing out when encountering an // object that is already on the "stack" of items being processed. Accepts an optional replacer function canonicalize(obj, stack, replacementStack, replacer, key) { stack = stack || []; replacementStack = replacementStack || []; if (replacer) { obj = replacer(key, obj); } var i; for (i = 0; i < stack.length; i += 1) { if (stack[i] === obj) { return replacementStack[i]; } } var canonicalizedObj; if ('[object Array]' === objectPrototypeToString.call(obj)) { stack.push(obj); canonicalizedObj = new Array(obj.length); replacementStack.push(canonicalizedObj); for (i = 0; i < obj.length; i += 1) { canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); } stack.pop(); replacementStack.pop(); return canonicalizedObj; } if (obj && obj.toJSON) { obj = obj.toJSON(); } if (_typeof(obj) === 'object' && obj !== null) { stack.push(obj); canonicalizedObj = {}; replacementStack.push(canonicalizedObj); var sortedKeys = [], _key; for (_key in obj) { /* istanbul ignore else */ if (obj.hasOwnProperty(_key)) { sortedKeys.push(_key); } } sortedKeys.sort(); for (i = 0; i < sortedKeys.length; i += 1) { _key = sortedKeys[i]; canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); } stack.pop(); replacementStack.pop(); } else { canonicalizedObj = obj; } return canonicalizedObj; } var arrayDiff = new Diff(); arrayDiff.tokenize = function (value) { return value.slice(); }; arrayDiff.join = arrayDiff.removeEmpty = function (value) { return value; }; function diffArrays(oldArr, newArr, callback) { return arrayDiff.diff(oldArr, newArr, callback); } function parsePatch(uniDiff) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], list = [], i = 0; function parseIndex() { var index = {}; list.push(index); // Parse diff metadata while (i < diffstr.length) { var line = diffstr[i]; // File header found, end parsing diff metadata if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { break; } // Diff index var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); if (header) { index.index = header[1]; } i++; } // Parse file headers if they are defined. Unified diff requires them, but // there's no technical issues to have an isolated hunk without file header parseFileHeader(index); parseFileHeader(index); // Parse hunks index.hunks = []; while (i < diffstr.length) { var _line = diffstr[i]; if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { break; } else if (/^@@/.test(_line)) { index.hunks.push(parseHunk()); } else if (_line && options.strict) { // Ignore unexpected content unless in strict mode throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); } else { i++; } } } // Parses the --- and +++ headers, if none are found, no lines // are consumed. function parseFileHeader(index) { var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]); if (fileHeader) { var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; var data = fileHeader[2].split('\t', 2); var fileName = data[0].replace(/\\\\/g, '\\'); if (/^".*"$/.test(fileName)) { fileName = fileName.substr(1, fileName.length - 2); } index[keyPrefix + 'FileName'] = fileName; index[keyPrefix + 'Header'] = (data[1] || '').trim(); i++; } } // Parses a hunk // This assumes that we are at the start of a hunk. function parseHunk() { var chunkHeaderIndex = i, chunkHeaderLine = diffstr[i++], chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); var hunk = { oldStart: +chunkHeader[1], oldLines: +chunkHeader[2] || 1, newStart: +chunkHeader[3], newLines: +chunkHeader[4] || 1, lines: [], linedelimiters: [] }; var addCount = 0, removeCount = 0; for (; i < diffstr.length; i++) { // Lines starting with '---' could be mistaken for the "remove line" operation // But they could be the header for the next file. Therefore prune such cases out. if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { break; } var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { hunk.lines.push(diffstr[i]); hunk.linedelimiters.push(delimiters[i] || '\n'); if (operation === '+') { addCount++; } else if (operation === '-') { removeCount++; } else if (operation === ' ') { addCount++; removeCount++; } } else { break; } } // Handle the empty block count case if (!addCount && hunk.newLines === 1) { hunk.newLines = 0; } if (!removeCount && hunk.oldLines === 1) { hunk.oldLines = 0; } // Perform optional sanity checking if (options.strict) { if (addCount !== hunk.newLines) { throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); } if (removeCount !== hunk.oldLines) { throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); } } return hunk; } while (i < diffstr.length) { parseIndex(); } return list; } // Iterator that traverses in the range of [min, max], stepping // by distance from a given start position. I.e. for [0, 4], with // start of 2, this will iterate 2, 3, 1, 4, 0. function distanceIterator (start, minLine, maxLine) { var wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1; return function iterator() { if (wantForward && !forwardExhausted) { if (backwardExhausted) { localOffset++; } else { wantForward = false; } // Check if trying to fit beyond text length, and if not, check it fits // after offset location (or desired location on first iteration) if (start + localOffset <= maxLine) { return localOffset; } forwardExhausted = true; } if (!backwardExhausted) { if (!forwardExhausted) { wantForward = true; } // Check if trying to fit before text beginning, and if not, check it fits // before offset location if (minLine <= start - localOffset) { return -localOffset++; } backwardExhausted = true; return iterator(); } // We tried to fit hunk before text beginning and beyond text length, then // hunk can't fit on the text. Return undefined }; } function applyPatch(source, uniDiff) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; if (typeof uniDiff === 'string') { uniDiff = parsePatch(uniDiff); } if (Array.isArray(uniDiff)) { if (uniDiff.length > 1) { throw new Error('applyPatch only works with a single input.'); } uniDiff = uniDiff[0]; } // Apply the diff to the input var lines = source.split(/\r\n|[\n\v\f\r\x85]/), delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], hunks = uniDiff.hunks, compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { return line === patchContent; }, errorCount = 0, fuzzFactor = options.fuzzFactor || 0, minLine = 0, offset = 0, removeEOFNL, addEOFNL; /** * Checks if the hunk exactly fits on the provided location */ function hunkFits(hunk, toPos) { for (var j = 0; j < hunk.lines.length; j++) { var line = hunk.lines[j], operation = line.length > 0 ? line[0] : ' ', content = line.length > 0 ? line.substr(1) : line; if (operation === ' ' || operation === '-') { // Context sanity check if (!compareLine(toPos + 1, lines[toPos], operation, content)) { errorCount++; if (errorCount > fuzzFactor) { return false; } } toPos++; } } return true; } // Search best fit offsets for each hunk based on the previous ones for (var i = 0; i < hunks.length; i++) { var hunk = hunks[i], maxLine = lines.length - hunk.oldLines, localOffset = 0, toPos = offset + hunk.oldStart - 1; var iterator = distanceIterator(toPos, minLine, maxLine); for (; localOffset !== undefined; localOffset = iterator()) { if (hunkFits(hunk, toPos + localOffset)) { hunk.offset = offset += localOffset; break; } } if (localOffset === undefined) { return false; } // Set lower text limit to end of the current hunk, so next ones don't try // to fit over already patched text minLine = hunk.offset + hunk.oldStart + hunk.oldLines; } // Apply patch hunks var diffOffset = 0; for (var _i = 0; _i < hunks.length; _i++) { var _hunk = hunks[_i], _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; diffOffset += _hunk.newLines - _hunk.oldLines; if (_toPos < 0) { // Creating a new file _toPos = 0; } for (var j = 0; j < _hunk.lines.length; j++) { var line = _hunk.lines[j], operation = line.length > 0 ? line[0] : ' ', content = line.length > 0 ? line.substr(1) : line, delimiter = _hunk.linedelimiters[j]; if (operation === ' ') { _toPos++; } else if (operation === '-') { lines.splice(_toPos, 1); delimiters.splice(_toPos, 1); /* istanbul ignore else */ } else if (operation === '+') { lines.splice(_toPos, 0, content); delimiters.splice(_toPos, 0, delimiter); _toPos++; } else if (operation === '\\') { var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; if (previousOperation === '+') { removeEOFNL = true; } else if (previousOperation === '-') { addEOFNL = true; } } } } // Handle EOFNL insertion/removal if (removeEOFNL) { while (!lines[lines.length - 1]) { lines.pop(); delimiters.pop(); } } else if (addEOFNL) { lines.push(''); delimiters.push('\n'); } for (var _k = 0; _k < lines.length - 1; _k++) { lines[_k] = lines[_k] + delimiters[_k]; } return lines.join(''); } // Wrapper that supports multiple file patches via callbacks. function applyPatches(uniDiff, options) { if (typeof uniDiff === 'string') { uniDiff = parsePatch(uniDiff); } var currentIndex = 0; function processIndex() { var index = uniDiff[currentIndex++]; if (!index) { return options.complete(); } options.loadFile(index, function (err, data) { if (err) { return options.complete(err); } var updatedContent = applyPatch(data, index, options); options.patched(index, updatedContent, function (err) { if (err) { return options.complete(err); } processIndex(); }); }); } processIndex(); } function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { if (!options) { options = {}; } if (typeof options.context === 'undefined') { options.context = 4; } var diff = diffLines(oldStr, newStr, options); diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier function contextLines(lines) { return lines.map(function (entry) { return ' ' + entry; }); } var hunks = []; var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; var _loop = function _loop(i) { var current = diff[i], lines = current.lines || current.value.replace(/\n$/, '').split('\n'); current.lines = lines; if (current.added || current.removed) { var _curRange; // If we have previous context, start with that if (!oldRangeStart) { var prev = diff[i - 1]; oldRangeStart = oldLine; newRangeStart = newLine; if (prev) { curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; oldRangeStart -= curRange.length; newRangeStart -= curRange.length; } } // Output our changes (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { return (current.added ? '+' : '-') + entry; }))); // Track the updated file position if (current.added) { newLine += lines.length; } else { oldLine += lines.length; } } else { // Identical context lines. Track line changes if (oldRangeStart) { // Close out any changes that have been output (or join overlapping) if (lines.length <= options.context * 2 && i < diff.length - 2) { var _curRange2; // Overlapping (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); } else { var _curRange3; // end the range and output var contextSize = Math.min(lines.length, options.context); (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); var hunk = { oldStart: oldRangeStart, oldLines: oldLine - oldRangeStart + contextSize, newStart: newRangeStart, newLines: newLine - newRangeStart + contextSize, lines: curRange }; if (i >= diff.length - 2 && lines.length <= options.context) { // EOF is inside this hunk var oldEOFNewline = /\n$/.test(oldStr); var newEOFNewline = /\n$/.test(newStr); var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; if (!oldEOFNewline && noNlBeforeAdds) { // special case: old has no eol and no trailing context; no-nl can end up before adds curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); } if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { curRange.push('\\ No newline at end of file'); } } hunks.push(hunk); oldRangeStart = 0; newRangeStart = 0; curRange = []; } } oldLine += lines.length; newLine += lines.length; } }; for (var i = 0; i < diff.length; i++) { _loop(i); } return { oldFileName: oldFileName, newFileName: newFileName, oldHeader: oldHeader, newHeader: newHeader, hunks: hunks }; } function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); var ret = []; if (oldFileName == newFileName) { ret.push('Index: ' + oldFileName); } ret.push('==================================================================='); ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); for (var i = 0; i < diff.hunks.length; i++) { var hunk = diff.hunks[i]; ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); ret.push.apply(ret, hunk.lines); } return ret.join('\n') + '\n'; } function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); } function arrayEqual(a, b) { if (a.length !== b.length) { return false; } return arrayStartsWith(a, b); } function arrayStartsWith(array, start) { if (start.length > array.length) { return false; } for (var i = 0; i < start.length; i++) { if (start[i] !== array[i]) { return false; } } return true; } function calcLineCount(hunk) { var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), oldLines = _calcOldNewLineCount.oldLines, newLines = _calcOldNewLineCount.newLines; if (oldLines !== undefined) { hunk.oldLines = oldLines; } else { delete hunk.oldLines; } if (newLines !== undefined) { hunk.newLines = newLines; } else { delete hunk.newLines; } } function merge(mine, theirs, base) { mine = loadPatch(mine, base); theirs = loadPatch(theirs, base); var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. // Leaving sanity checks on this to the API consumer that may know more about the // meaning in their own context. if (mine.index || theirs.index) { ret.index = mine.index || theirs.index; } if (mine.newFileName || theirs.newFileName) { if (!fileNameChanged(mine)) { // No header or no change in ours, use theirs (and ours if theirs does not exist) ret.oldFileName = theirs.oldFileName || mine.oldFileName; ret.newFileName = theirs.newFileName || mine.newFileName; ret.oldHeader = theirs.oldHeader || mine.oldHeader; ret.newHeader = theirs.newHeader || mine.newHeader; } else if (!fileNameChanged(theirs)) { // No header or no change in theirs, use ours ret.oldFileName = mine.oldFileName; ret.newFileName = mine.newFileName; ret.oldHeader = mine.oldHeader; ret.newHeader = mine.newHeader; } else { // Both changed... figure it out ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); } } ret.hunks = []; var mineIndex = 0, theirsIndex = 0, mineOffset = 0, theirsOffset = 0; while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { var mineCurrent = mine.hunks[mineIndex] || { oldStart: Infinity }, theirsCurrent = theirs.hunks[theirsIndex] || { oldStart: Infinity }; if (hunkBefore(mineCurrent, theirsCurrent)) { // This patch does not overlap with any of the others, yay. ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); mineIndex++; theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; } else if (hunkBefore(theirsCurrent, mineCurrent)) { // This patch does not overlap with any of the others, yay. ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); theirsIndex++; mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; } else { // Overlap, merge as best we can var mergedHunk = { oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), oldLines: 0, newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), newLines: 0, lines: [] }; mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); theirsIndex++; mineIndex++; ret.hunks.push(mergedHunk); } } return ret; } function loadPatch(param, base) { if (typeof param === 'string') { if (/^@@/m.test(param) || /^Index:/m.test(param)) { return parsePatch(param)[0]; } if (!base) { throw new Error('Must provide a base reference or pass in a patch'); } return structuredPatch(undefined, undefined, base, param); } return param; } function fileNameChanged(patch) { return patch.newFileName && patch.newFileName !== patch.oldFileName; } function selectField(index, mine, theirs) { if (mine === theirs) { return mine; } else { index.conflict = true; return { mine: mine, theirs: theirs }; } } function hunkBefore(test, check) { return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; } function cloneHunk(hunk, offset) { return { oldStart: hunk.oldStart, oldLines: hunk.oldLines, newStart: hunk.newStart + offset, newLines: hunk.newLines, lines: hunk.lines }; } function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { // This will generally result in a conflicted hunk, but there are cases where the context // is the only overlap where we can successfully merge the content here. var mine = { offset: mineOffset, lines: mineLines, index: 0 }, their = { offset: theirOffset, lines: theirLines, index: 0 }; // Handle any leading content insertLeading(hunk, mine, their); insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. while (mine.index < mine.lines.length && their.index < their.lines.length) { var mineCurrent = mine.lines[mine.index], theirCurrent = their.lines[their.index]; if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { // Both modified ... mutualChange(hunk, mine, their); } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { var _hunk$lines; // Mine inserted (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { var _hunk$lines2; // Theirs inserted (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { // Mine removed or edited removal(hunk, mine, their); } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { // Their removed or edited removal(hunk, their, mine, true); } else if (mineCurrent === theirCurrent) { // Context identity hunk.lines.push(mineCurrent); mine.index++; their.index++; } else { // Context mismatch conflict(hunk, collectChange(mine), collectChange(their)); } } // Now push anything that may be remaining insertTrailing(hunk, mine); insertTrailing(hunk, their); calcLineCount(hunk); } function mutualChange(hunk, mine, their) { var myChanges = collectChange(mine), theirChanges = collectChange(their); if (allRemoves(myChanges) && allRemoves(theirChanges)) { // Special case for remove changes that are supersets of one another if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { var _hunk$lines3; (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); return; } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { var _hunk$lines4; (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); return; } } else if (arrayEqual(myChanges, theirChanges)) { var _hunk$lines5; (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); return; } conflict(hunk, myChanges, theirChanges); } function removal(hunk, mine, their, swap) { var myChanges = collectChange(mine), theirChanges = collectContext(their, myChanges); if (theirChanges.merged) { var _hunk$lines6; (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); } else { conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); } } function conflict(hunk, mine, their) { hunk.conflict = true; hunk.lines.push({ conflict: true, mine: mine, theirs: their }); } function insertLeading(hunk, insert, their) { while (insert.offset < their.offset && insert.index < insert.lines.length) { var line = insert.lines[insert.index++]; hunk.lines.push(line); insert.offset++; } } function insertTrailing(hunk, insert) { while (insert.index < insert.lines.length) { var line = insert.lines[insert.index++]; hunk.lines.push(line); } } function collectChange(state) { var ret = [], operation = state.lines[state.index][0]; while (state.index < state.lines.length) { var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. if (operation === '-' && line[0] === '+') { operation = '+'; } if (operation === line[0]) { ret.push(line); state.index++; } else { break; } } return ret; } function collectContext(state, matchChanges) { var changes = [], merged = [], matchIndex = 0, contextChanges = false, conflicted = false; while (matchIndex < matchChanges.length && state.index < state.lines.length) { var change = state.lines[state.index], match = matchChanges[matchIndex]; // Once we've hit our add, then we are done if (match[0] === '+') { break; } contextChanges = contextChanges || change[0] !== ' '; merged.push(match); matchIndex++; // Consume any additions in the other block as a conflict to attempt // to pull in the remaining context after this if (change[0] === '+') { conflicted = true; while (change[0] === '+') { changes.push(change); change = state.lines[++state.index]; } } if (match.substr(1) === change.substr(1)) { changes.push(change); state.index++; } else { conflicted = true; } } if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { conflicted = true; } if (conflicted) { return changes; } while (matchIndex < matchChanges.length) { merged.push(matchChanges[matchIndex++]); } return { merged: merged, changes: changes }; } function allRemoves(changes) { return changes.reduce(function (prev, change) { return prev && change[0] === '-'; }, true); } function skipRemoveSuperset(state, removeChanges, delta) { for (var i = 0; i < delta; i++) { var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); if (state.lines[state.index + i] !== ' ' + changeContent) { return false; } } state.index += delta; return true; } function calcOldNewLineCount(lines) { var oldLines = 0; var newLines = 0; lines.forEach(function (line) { if (typeof line !== 'string') { var myCount = calcOldNewLineCount(line.mine); var theirCount = calcOldNewLineCount(line.theirs); if (oldLines !== undefined) { if (myCount.oldLines === theirCount.oldLines) { oldLines += myCount.oldLines; } else { oldLines = undefined; } } if (newLines !== undefined) { if (myCount.newLines === theirCount.newLines) { newLines += myCount.newLines; } else { newLines = undefined; } } } else { if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { newLines++; } if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { oldLines++; } } }); return { oldLines: oldLines, newLines: newLines }; } // See: http://code.google.com/p/google-diff-match-patch/wiki/API function convertChangesToDMP(changes) { var ret = [], change, operation; for (var i = 0; i < changes.length; i++) { change = changes[i]; if (change.added) { operation = 1; } else if (change.removed) { operation = -1; } else { operation = 0; } ret.push([operation, change.value]); } return ret; } function convertChangesToXML(changes) { var ret = []; for (var i = 0; i < changes.length; i++) { var change = changes[i]; if (change.added) { ret.push(''); } else if (change.removed) { ret.push(''); } ret.push(escapeHTML(change.value)); if (change.added) { ret.push(''); } else if (change.removed) { ret.push(''); } } return ret.join(''); } function escapeHTML(s) { var n = s; n = n.replace(/&/g, '&'); n = n.replace(//g, '>'); n = n.replace(/"/g, '"'); return n; } /* See LICENSE file for terms of use */ /***/ }), /***/ 50367: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const path = __webpack_require__(85622); const pathType = __webpack_require__(29847); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; const getPath = (filepath, cwd) => { const pth = filepath[0] === '!' ? filepath.slice(1) : filepath; return path.isAbsolute(pth) ? pth : path.join(cwd, pth); }; const addExtensions = (file, extensions) => { if (path.extname(file)) { return `**/${file}`; } return `**/${file}.${getExtensions(extensions)}`; }; const getGlob = (directory, options) => { if (options.files && !Array.isArray(options.files)) { throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); } if (options.extensions && !Array.isArray(options.extensions)) { throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); } if (options.files && options.extensions) { return options.files.map(x => path.posix.join(directory, addExtensions(x, options.extensions))); } if (options.files) { return options.files.map(x => path.posix.join(directory, `**/${x}`)); } if (options.extensions) { return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; } return [path.posix.join(directory, '**')]; }; module.exports = async (input, options) => { options = { cwd: process.cwd(), ...options }; if (typeof options.cwd !== 'string') { throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); } const globs = await Promise.all([].concat(input).map(async x => { const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); return isDirectory ? getGlob(x, options) : x; })); return [].concat.apply([], globs); // eslint-disable-line prefer-spread }; module.exports.sync = (input, options) => { options = { cwd: process.cwd(), ...options }; if (typeof options.cwd !== 'string') { throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); } const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); return [].concat.apply([], globs); // eslint-disable-line prefer-spread }; /***/ }), /***/ 38360: /***/ ((module, exports, __webpack_require__) => { //Based on follow-redirects v0.0.x var nativeHttps = __webpack_require__(57211), nativeHttp = __webpack_require__(98605), url = __webpack_require__(78835), utils = __webpack_require__(76174); var maxRedirects = module.exports.maxRedirects = 5; var protocols = { https: nativeHttps, http: nativeHttp }; for (var protocol in protocols) { var h = function() {}; h.prototype = protocols[protocol]; h = new h(); h.request = function(h) { return function(options, callback, redirectOptions) { redirectOptions = redirectOptions || {}; var max = (typeof options === 'object' && 'maxRedirects' in options) ? options.maxRedirects : exports.maxRedirects; var redirect = utils.extend({ count: 0, max: max, clientRequest: null, userCallback: callback }, redirectOptions); if (redirect.count > redirect.max) { var err = new Error('Max redirects exceeded. To allow more redirects, pass options.maxRedirects property.'); redirect.clientRequest.emit('error', err); return redirect.clientRequest; } redirect.count++; var reqUrl; if (typeof options === 'string') { reqUrl = options; } else { reqUrl = url.format(utils.extend({ protocol: protocol }, options)); } var clientRequest = Object.getPrototypeOf(h).request(options, redirectCallback(reqUrl, redirect)); if (!redirect.clientRequest) redirect.clientRequest = clientRequest; function redirectCallback(reqUrl, redirect) { return function(res) { if (res.statusCode < 300 || res.statusCode > 399) { return redirect.userCallback(res); } if (!('location' in res.headers)) { return redirect.userCallback(res); } var redirectUrl = url.resolve(reqUrl, res.headers.location); var proto = url.parse(redirectUrl).protocol; proto = proto.substr(0, proto.length - 1); return module.exports[proto].get(redirectUrl, redirectCallback(reqUrl, redirect), redirect); }; } return clientRequest; }; }(h); // see https://github.com/joyent/node/blob/master/lib/http.js#L1623 h.get = function(h) { return function(options, cb, redirectOptions) { var req = h.request(options, cb, redirectOptions); req.end(); return req; }; }(h); module.exports[protocol] = h; } /***/ }), /***/ 7009: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = HttpDuplex; var util = __webpack_require__(31669), stream = __webpack_require__(11451); util.inherits(HttpDuplex, stream.Duplex); function HttpDuplex(req, res, options) { var self = this; if (!(self instanceof HttpDuplex)) return new HttpDuplex(req, res, options); stream.Duplex.call(self, options); self._output = null; self.connect(req, res); } HttpDuplex.prototype.connect = function(req, res) { var self = this; self.req = req; self._output = res; self.emit('response', res); res.on('data', function(c) { if (!self.push(c)) self._output.pause(); }); res.on('end', function() { self.push(null); }); }; HttpDuplex.prototype._read = function(n) { if (this._output) this._output.resume(); }; HttpDuplex.prototype._write = function(chunk, encoding, cb) { this.req.write(chunk, encoding); cb(); }; HttpDuplex.prototype.end = function(chunk, encoding, cb) { this._output.socket.destroy(); return this.req.end(chunk, encoding, cb); }; HttpDuplex.prototype.destroy = function() { this.req.destroy(); this._output.socket.destroy(); }; /***/ }), /***/ 89168: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var querystring = __webpack_require__(71191), http = __webpack_require__(38360), fs = __webpack_require__(35747), path = __webpack_require__(85622), url = __webpack_require__(78835), ssh = __webpack_require__(44456), HttpDuplex = __webpack_require__(7009), debug = __webpack_require__(15158)('modem'), utils = __webpack_require__(76174), util = __webpack_require__(31669), url = __webpack_require__(78835), splitca = __webpack_require__(22714), isWin = __webpack_require__(12087).type() === 'Windows_NT'; var defaultOpts = function () { var host; var opts = {}; if (!process.env.DOCKER_HOST) { // Windows socket path: //./pipe/docker_engine ( Windows 10 ) // Linux & Darwin socket path: /var/run/docker.sock opts.socketPath = isWin ? '//./pipe/docker_engine' : '/var/run/docker.sock'; } else if (process.env.DOCKER_HOST.indexOf('unix://') === 0) { // Strip off unix://, fall back to default of /var/run/docker.sock if // unix:// was passed without a path opts.socketPath = process.env.DOCKER_HOST.substring(7) || '/var/run/docker.sock'; } else if (process.env.DOCKER_HOST.indexOf('npipe://') === 0) { // Strip off npipe://, fall back to default of //./pipe/docker_engine if // npipe:// was passed without a path opts.socketPath = process.env.DOCKER_HOST.substring(8) || '//./pipe/docker_engine'; } else { var hostStr = process.env.DOCKER_HOST; if (hostStr.indexOf('\/\/') < 0) { hostStr = 'tcp://' + hostStr; } try { host = new url.URL(hostStr); } catch (err) { throw new Error('DOCKER_HOST env variable should be something like tcp://localhost:1234'); } opts.port = host.port; if (process.env.DOCKER_TLS_VERIFY === '1' || opts.port === '2376') { opts.protocol = 'https'; } else if (host.protocol === 'ssh:') { opts.protocol = 'ssh'; opts.username = host.username; opts.sshOptions = { agent: process.env.SSH_AUTH_SOCK, } } else { opts.protocol = 'http'; } opts.host = host.hostname; if (process.env.DOCKER_CERT_PATH) { opts.ca = splitca(path.join(process.env.DOCKER_CERT_PATH, 'ca.pem')); opts.cert = fs.readFileSync(path.join(process.env.DOCKER_CERT_PATH, 'cert.pem')); opts.key = fs.readFileSync(path.join(process.env.DOCKER_CERT_PATH, 'key.pem')); } if (process.env.DOCKER_CLIENT_TIMEOUT) { opts.timeout = parseInt(process.env.DOCKER_CLIENT_TIMEOUT, 10); } } return opts; }; var Modem = function (options) { var optDefaults = defaultOpts(); var opts = Object.assign({}, optDefaults, options); this.host = opts.host; if(!this.host) { this.socketPath = opts.socketPath; } this.port = opts.port; this.username = opts.username; this.password = opts.password; this.version = opts.version; this.key = opts.key; this.cert = opts.cert; this.ca = opts.ca; this.timeout = opts.timeout; this.connectionTimeout = opts.connectionTimeout; this.checkServerIdentity = opts.checkServerIdentity; this.agent = opts.agent; this.headers = opts.headers || {}; this.sshOptions = Object.assign({}, options ? options.sshOptions : {}, optDefaults.sshOptions); //retrocompabitlity if(this.sshOptions.agentForward === undefined) { this.sshOptions.agentForward = opts.agentForward; } if (this.key && this.cert && this.ca) { this.protocol = 'https'; } this.protocol = opts.protocol || this.protocol || 'http'; }; Modem.prototype.dial = function (options, callback) { var opts, address, data; var self = this; if (options.options) { opts = options.options; } // Prevent credentials from showing up in URL if (opts && opts.authconfig) { delete opts.authconfig; } // Prevent abortsignal from showing up in the URL if (opts && opts.abortSignal) { delete opts.abortSignal; } if (this.version) { options.path = '/' + this.version + options.path; } if (this.host) { var parsed = url.parse(self.host); address = url.format({ 'protocol': parsed.protocol || self.protocol, 'hostname': parsed.hostname || self.host, 'port': self.port }); address = url.resolve(address, options.path); } else { address = options.path; } if (options.path.indexOf('?') !== -1) { if (opts && Object.keys(opts).length > 0) { address += this.buildQuerystring(opts._query || opts); } else { address = address.substring(0, address.length - 1); } } var optionsf = { path: address, method: options.method, headers: options.headers || Object.assign({}, self.headers), key: self.key, cert: self.cert, ca: self.ca }; if (this.checkServerIdentity) { optionsf.checkServerIdentity = this.checkServerIdentity; } if (this.agent) { optionsf.agent = this.agent; } if (options.authconfig) { optionsf.headers['X-Registry-Auth'] = options.authconfig.key || options.authconfig.base64 || Buffer.from(JSON.stringify(options.authconfig)).toString('base64'); } if (options.registryconfig) { optionsf.headers['X-Registry-Config'] = options.registryconfig.base64 || Buffer.from(JSON.stringify(options.registryconfig)).toString('base64'); } if (options.abortSignal) { optionsf.signal = options.abortSignal; } if (options.file) { if (typeof options.file === 'string') { data = fs.createReadStream(path.resolve(options.file)); } else { data = options.file; } optionsf.headers['Content-Type'] = 'application/tar'; } else if (opts && options.method === 'POST') { data = JSON.stringify(opts._body || opts); if (options.allowEmpty) { optionsf.headers['Content-Type'] = 'application/json'; } else { if (data !== '{}' && data !== '""') { optionsf.headers['Content-Type'] = 'application/json'; } else { data = undefined; } } } if (typeof data === 'string') { optionsf.headers['Content-Length'] = Buffer.byteLength(data); } else if (Buffer.isBuffer(data) === true) { optionsf.headers['Content-Length'] = data.length; } else if (optionsf.method === 'PUT' || options.hijack || options.openStdin) { optionsf.headers['Transfer-Encoding'] = 'chunked'; } if (options.hijack) { optionsf.headers.Connection = 'Upgrade'; optionsf.headers.Upgrade = 'tcp'; } if (this.socketPath) { optionsf.socketPath = this.socketPath; } else { var urlp = url.parse(address); optionsf.hostname = urlp.hostname; optionsf.port = urlp.port; optionsf.path = urlp.path; } this.buildRequest(optionsf, options, data, callback); }; Modem.prototype.buildRequest = function (options, context, data, callback) { var self = this; var connectionTimeoutTimer; var opts = self.protocol === 'ssh' ? Object.assign(options, { agent: ssh(Object.assign({}, self.sshOptions, { 'host': self.host, 'port': self.port, 'username': self.username, 'password': self.password, })), protocol: 'http:', }) : options; var req = http[self.protocol === 'ssh' ? 'http' : self.protocol].request(opts, function () { }); debug('Sending: %s', util.inspect(options, { showHidden: true, depth: null })); if (self.connectionTimeout) { connectionTimeoutTimer = setTimeout(function () { debug('Connection Timeout of %s ms exceeded', self.connectionTimeout); req.abort(); }, self.connectionTimeout); } if (self.timeout) { req.on('socket', function (socket) { socket.setTimeout(self.timeout); socket.on('timeout', function () { debug('Timeout of %s ms exceeded', self.timeout); req.abort(); }); }); } if (context.hijack === true) { clearTimeout(connectionTimeoutTimer); req.on('upgrade', function (res, sock, head) { return callback(null, sock); }); } req.on('connect', function () { clearTimeout(connectionTimeoutTimer); }); req.on('disconnect', function () { clearTimeout(connectionTimeoutTimer); }); req.on('response', function (res) { clearTimeout(connectionTimeoutTimer); if (context.isStream === true) { self.buildPayload(null, context.isStream, context.statusCodes, context.openStdin, req, res, null, callback); } else { var chunks = []; res.on('data', function (chunk) { chunks.push(chunk); }); res.on('end', function () { var buffer = Buffer.concat(chunks); var result = buffer.toString(); debug('Received: %s', result); var json = utils.parseJSON(result) || buffer; self.buildPayload(null, context.isStream, context.statusCodes, false, req, res, json, callback); }); } }); req.on('error', function (error) { clearTimeout(connectionTimeoutTimer); self.buildPayload(error, context.isStream, context.statusCodes, false, {}, {}, null, callback); }); if (typeof data === 'string' || Buffer.isBuffer(data)) { req.write(data); } else if (data) { data.on('error', function (error) { req.destroy(error); }); data.pipe(req); } if (!context.hijack && !context.openStdin && (typeof data === 'string' || data === undefined || Buffer.isBuffer(data))) { req.end(); } }; Modem.prototype.buildPayload = function (err, isStream, statusCodes, openStdin, req, res, json, cb) { if (err) return cb(err, null); if (statusCodes[res.statusCode] !== true) { getCause(isStream, res, json, function (err, cause) { var msg = new Error( '(HTTP code ' + res.statusCode + ') ' + (statusCodes[res.statusCode] || 'unexpected') + ' - ' + (cause.message || cause) + ' ' ); msg.reason = statusCodes[res.statusCode]; msg.statusCode = res.statusCode; msg.json = json; cb(msg, null); }); } else { if (openStdin) { cb(null, new HttpDuplex(req, res)); } else if (isStream) { cb(null, res); } else { cb(null, json); } } function getCause(isStream, res, json, callback) { var chunks = ''; if (isStream) { res.on('data', function (chunk) { chunks += chunk; }); res.on('end', function () { callback(null, utils.parseJSON(chunks) || chunks); }); } else { callback(null, json); } } }; Modem.prototype.demuxStream = function (stream, stdout, stderr) { var nextDataType = null; var nextDataLength = null; var buffer = Buffer.from(''); function processData(data) { if (data) { buffer = Buffer.concat([buffer, data]); } if (!nextDataType) { if (buffer.length >= 8) { var header = bufferSlice(8); nextDataType = header.readUInt8(0); nextDataLength = header.readUInt32BE(4); // It's possible we got a "data" that contains multiple messages // Process the next one processData(); } } else { if (buffer.length >= nextDataLength) { var content = bufferSlice(nextDataLength); if (nextDataType === 1) { stdout.write(content); } else { stderr.write(content); } nextDataType = null; // It's possible we got a "data" that contains multiple messages // Process the next one processData(); } } } function bufferSlice(end) { var out = buffer.slice(0, end); buffer = Buffer.from(buffer.slice(end, buffer.length)); return out; } stream.on('data', processData); }; Modem.prototype.followProgress = function (stream, onFinished, onProgress) { var buf = ''; var output = []; var finished = false; stream.on('data', onStreamEvent); stream.on('error', onStreamError); stream.on('end', onStreamEnd); stream.on('close', onStreamEnd); function onStreamEvent(data) { buf += data.toString(); pump(); function pump() { var pos; while ((pos = buf.indexOf('\n')) >= 0) { if (pos == 0) { buf = buf.slice(1); continue; } processLine(buf.slice(0, pos)); buf = buf.slice(pos + 1); } } function processLine(line) { if (line[line.length - 1] == '\r') line = line.substr(0, line.length - 1); if (line.length > 0) { var obj = JSON.parse(line); output.push(obj); if (onProgress) { onProgress(obj); } } } }; function onStreamError(err) { finished = true; stream.removeListener('data', onStreamEvent); stream.removeListener('error', onStreamError); stream.removeListener('end', onStreamEnd); stream.removeListener('close', onStreamEnd); onFinished(err, output); } function onStreamEnd() { if(!finished) onFinished(null, output); finished = true; } }; Modem.prototype.buildQuerystring = function (opts) { var clone = {}; // serialize map values as JSON strings, else querystring truncates. Object.keys(opts).map(function (key, i) { if (opts[key] && typeof opts[key] === 'object' && !Array.isArray(opts[key]) // Ref: https://docs.docker.com/engine/api/v1.40/#operation/ImageBuild // > cachefrom (string) JSON array of images used for build cache resolution. || key === 'cachefrom' ) { clone[key] = JSON.stringify(opts[key]); } else { clone[key] = opts[key]; } }); return querystring.stringify(clone); }; module.exports = Modem; /***/ }), /***/ 44456: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Client = __webpack_require__(29005).Client, http = __webpack_require__(98605); module.exports = function(opt) { var conn = new Client(); var agent = new http.Agent(); agent.createConnection = function(options, fn) { conn.once('ready', function() { conn.exec('docker system dial-stdio', function(err, stream) { if (err) { conn.end(); agent.destroy(); return; } fn(null, stream); stream.once('close', () => { conn.end(); agent.destroy(); }); }); }).connect(opt); conn.once('end', () => agent.destroy()); }; return agent; }; /***/ }), /***/ 76174: /***/ ((module) => { // https://github.com/HenrikJoreteg/extend-object/blob/v0.1.0/extend-object.js var arr = []; var each = arr.forEach; var slice = arr.slice; module.exports.extend = function(obj) { each.call(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { obj[prop] = source[prop]; } } }); return obj; }; module.exports.parseJSON = function(s) { try { return JSON.parse(s); } catch (e) { return null; } }; /***/ }), /***/ 12447: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class Argument { constructor(value, range) { this.value = value; this.range = range; } toString() { return this.value; } getRange() { return this.range; } getValue() { return this.value; } isAfter(position) { if (this.range.end.line < position.line) { return false; } return this.range.start.line > position.line ? true : this.range.start.character > position.character; } isBefore(position) { if (this.range.start.line < position.line) { return true; } return this.range.end.line > position.line ? false : this.range.end.character < position.character; } } exports.Argument = Argument; /***/ }), /***/ 42179: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const line_1 = __webpack_require__(47119); const util_1 = __webpack_require__(98707); class Comment extends line_1.Line { constructor(document, range) { super(document, range); } toString() { const content = this.getContent(); if (content) { return "# " + content; } return "#"; } /** * Returns the content of this comment. This excludes leading and * trailing whitespace as well as the # symbol. If the comment only * consists of whitespace, the empty string will be returned. */ getContent() { let range = this.getContentRange(); if (range === null) { return ""; } return this.document.getText().substring(this.document.offsetAt(range.start), this.document.offsetAt(range.end)); } /** * Returns a range that includes the content of the comment * excluding any leading and trailing whitespace as well as the # * symbol. May return null if the comment only consists of whitespace * characters. */ getContentRange() { let range = this.getRange(); const startOffset = this.document.offsetAt(range.start); let raw = this.document.getText().substring(startOffset, this.document.offsetAt(range.end)); let start = -1; let end = -1; // skip the first # symbol for (let i = 1; i < raw.length; i++) { if (!util_1.Util.isWhitespace(raw.charAt(i))) { start = i; break; } } if (start === -1) { return null; } // go backwards up to the first # symbol for (let i = raw.length - 1; i >= 1; i--) { if (!util_1.Util.isWhitespace(raw.charAt(i))) { end = i + 1; break; } } return vscode_languageserver_types_1.Range.create(this.document.positionAt(startOffset + start), this.document.positionAt(startOffset + end)); } } exports.Comment = Comment; /***/ }), /***/ 71513: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ Object.defineProperty(exports, "__esModule", ({ value: true })); const vscode_languageserver_types_1 = __webpack_require__(91674); const ast = __webpack_require__(20871); const imageTemplate_1 = __webpack_require__(30791); const from_1 = __webpack_require__(98654); const util_1 = __webpack_require__(98707); const main_1 = __webpack_require__(20871); class Dockerfile extends imageTemplate_1.ImageTemplate { constructor(document) { super(); this.initialInstructions = new imageTemplate_1.ImageTemplate(); this.buildStages = []; this.directives = []; /** * Whether a FROM instruction has been added to this Dockerfile or not. */ this.foundFrom = false; this.document = document; } getEscapeCharacter() { for (const directive of this.directives) { if (directive.getDirective() === ast.Directive.escape) { const value = directive.getValue(); if (value === '\\' || value === '`') { return value; } } } return '\\'; } getInitialARGs() { return this.initialInstructions.getARGs(); } getContainingImage(position) { let range = vscode_languageserver_types_1.Range.create(vscode_languageserver_types_1.Position.create(0, 0), this.document.positionAt(this.document.getText().length)); if (!util_1.Util.isInsideRange(position, range)) { // not inside the document, invalid position return null; } if (this.initialInstructions.getComments().length > 0 || this.initialInstructions.getInstructions().length > 0) { if (util_1.Util.isInsideRange(position, this.initialInstructions.getRange())) { return this.initialInstructions; } } for (const buildStage of this.buildStages) { if (util_1.Util.isInsideRange(position, buildStage.getRange())) { return buildStage; } } return this; } addInstruction(instruction) { if (instruction.getKeyword() === main_1.Keyword.FROM) { this.currentBuildStage = new imageTemplate_1.ImageTemplate(); this.buildStages.push(this.currentBuildStage); this.foundFrom = true; } else if (!this.foundFrom) { this.initialInstructions.addInstruction(instruction); } if (this.foundFrom) { this.currentBuildStage.addInstruction(instruction); } super.addInstruction(instruction); } setDirectives(directives) { this.directives = directives; } getDirective() { return this.directives.length === 0 ? null : this.directives[0]; } getDirectives() { return this.directives; } resolveVariable(variable, line) { for (let from of this.getFROMs()) { let range = from.getRange(); if (range.start.line <= line && line <= range.end.line) { // resolve the FROM variable against the initial ARGs let initialARGs = new imageTemplate_1.ImageTemplate(); for (let instruction of this.initialInstructions.getARGs()) { initialARGs.addInstruction(instruction); } return initialARGs.resolveVariable(variable, line); } } let image = this.getContainingImage(vscode_languageserver_types_1.Position.create(line, 0)); if (image === null) { return undefined; } let resolvedVariable = image.resolveVariable(variable, line); if (resolvedVariable === null) { // refers to an uninitialized ARG variable, // try resolving it against the initial ARGs then let initialARGs = new imageTemplate_1.ImageTemplate(); for (let instruction of this.initialInstructions.getARGs()) { initialARGs.addInstruction(instruction); } return initialARGs.resolveVariable(variable, line); } return resolvedVariable; } getAvailableVariables(currentLine) { if (this.getInstructionAt(currentLine) instanceof from_1.From) { let variables = []; for (let arg of this.getInitialARGs()) { let property = arg.getProperty(); if (property) { variables.push(property.getName()); } } return variables; } let image = this.getContainingImage(vscode_languageserver_types_1.Position.create(currentLine, 0)); return image ? image.getAvailableVariables(currentLine) : []; } getParentStage(image) { let from = image.getFROM(); let imageName = from === null ? null : from.getImageName(); if (imageName === null) { return null; } for (const from of this.getFROMs()) { if (from.getBuildStage() === imageName) { return this.getContainingImage(from.getRange().start); } } return null; } getStageHierarchy(line) { const image = this.getContainingImage(vscode_languageserver_types_1.Position.create(line, 0)); if (image === null) { return []; } const stages = [image]; let stage = this.getParentStage(image); while (stage !== null) { stages.splice(0, 0, stage); stage = this.getParentStage(stage); } return stages; } getAvailableWorkingDirectories(line) { const availableDirectories = new Set(); for (const image of this.getStageHierarchy(line)) { for (const workdir of image.getWORKDIRs()) { if (workdir.getRange().end.line < line) { let directory = workdir.getAbsolutePath(); if (directory !== undefined && directory !== null) { if (!directory.endsWith("/")) { directory += "/"; } availableDirectories.add(directory); } } } } return Array.from(availableDirectories); } /** * Internally reorganize the comments in the Dockerfile and allocate * them to the relevant build stages that they belong to. */ organizeComments() { const comments = this.getComments(); for (let i = 0; i < comments.length; i++) { if (util_1.Util.isInsideRange(comments[i].getRange().end, this.initialInstructions.getRange())) { this.initialInstructions.addComment(comments[i]); } else { for (const buildStage of this.buildStages) { if (util_1.Util.isInsideRange(comments[i].getRange().start, buildStage.getRange())) { buildStage.addComment(comments[i]); } } } } } getRange() { const comments = this.getComments(); const instructions = this.getInstructions(); let range = null; if (comments.length === 0) { if (instructions.length > 0) { range = vscode_languageserver_types_1.Range.create(instructions[0].getRange().start, instructions[instructions.length - 1].getRange().end); } } else if (instructions.length === 0) { range = vscode_languageserver_types_1.Range.create(comments[0].getRange().start, comments[comments.length - 1].getRange().end); } else { const commentStart = comments[0].getRange().start; const commentEnd = comments[comments.length - 1].getRange().end; const instructionStart = instructions[0].getRange().start; const instructionEnd = instructions[instructions.length - 1].getRange().end; if (commentStart.line < instructionStart.line) { if (commentEnd.line < instructionEnd.line) { range = vscode_languageserver_types_1.Range.create(commentStart, instructionEnd); } range = vscode_languageserver_types_1.Range.create(commentStart, commentEnd); } else if (commentEnd.line < instructionEnd.line) { range = vscode_languageserver_types_1.Range.create(instructionStart, instructionEnd); } else { range = vscode_languageserver_types_1.Range.create(instructionStart, commentEnd); } } if (range === null) { if (this.directives.length === 0) { return null; } return this.directives[0].getRange(); } else if (this.directives.length === 0) { return range; } return vscode_languageserver_types_1.Range.create(this.directives[0].getRange().start, range.end); } } exports.Dockerfile = Dockerfile; /***/ }), /***/ 11170: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const flagOption_1 = __webpack_require__(29571); class Flag { constructor(document, range, name, nameRange, value, valueRange) { this.options = []; this.range = range; this.name = name; this.nameRange = nameRange; this.value = value; this.valueRange = valueRange; if (this.value !== null) { let offset = document.offsetAt(valueRange.start); let nameStart = -1; let valueStart = -1; let hasOptions = false; for (let i = 0; i < value.length; i++) { switch (value.charAt(i)) { case '=': hasOptions = true; if (valueStart === -1) { valueStart = i + 1; break; } break; case ',': this.options.push(this.createFlagOption(document, value, offset, nameStart, valueStart, i)); nameStart = -1; valueStart = -1; break; default: if (nameStart === -1) { nameStart = i; } break; } } if (hasOptions && nameStart !== -1) { this.options.push(this.createFlagOption(document, value, offset, nameStart, valueStart, value.length)); } } } createFlagOption(document, content, documentOffset, nameStart, valueStart, valueEnd) { const optionRange = vscode_languageserver_types_1.Range.create(document.positionAt(documentOffset + nameStart), document.positionAt(documentOffset + valueEnd)); if (valueStart === -1) { return new flagOption_1.FlagOption(optionRange, content.substring(nameStart, valueEnd), optionRange, null, null); } return new flagOption_1.FlagOption(optionRange, content.substring(nameStart, valueStart - 1), vscode_languageserver_types_1.Range.create(document.positionAt(documentOffset + nameStart), document.positionAt(documentOffset + valueStart - 1)), content.substring(valueStart, valueEnd), vscode_languageserver_types_1.Range.create(document.positionAt(documentOffset + valueStart), document.positionAt(documentOffset + valueEnd))); } toString() { if (this.valueRange) { return "--" + this.name + "=" + this.value; } return "--" + this.name; } /** * Returns the range that encompasses this entire flag. This includes the * -- prefix in the beginning to the last character of the flag's value (if * it has been defined). * * @return the entire range of this flag */ getRange() { return this.range; } /** * Returns the name of this flag. The name does not include the -- prefix. * Thus, for HEALTHCHECK's --interval flag, interval is the flag's name and * not --interval. * * @return this flag's name */ getName() { return this.name; } /** * Returns the range that encompasses the flag's name * * @return the range containing the flag's name */ getNameRange() { return this.nameRange; } /** * Returns the value that has been set to this flag. May be null if the * flag is invalid and has no value set like a --start-period. If the flag * is instead a --start-period= with an equals sign then the flag's value * is the empty string. * * @return this flag's value if it has been defined, null otherwise */ getValue() { return this.value; } /** * Returns the range that encompasses this flag's value. If no value has * been set then null will be returned. * * @return the range containing this flag's value, or null if the flag * has no value defined */ getValueRange() { return this.valueRange; } getOption(name) { for (const option of this.options) { if (option.getName() === name) { return option; } } return null; } getOptions() { return this.options; } hasOptions() { return this.options.length > 0; } } exports.Flag = Flag; /***/ }), /***/ 29571: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class FlagOption { constructor(range, name, nameRange, value, valueRange) { this.range = range; this.name = name; this.nameRange = nameRange; this.value = value; this.valueRange = valueRange; } toString() { if (this.valueRange !== null) { return this.name + "=" + this.value; } return this.name; } getRange() { return this.range; } getName() { return this.name; } getNameRange() { return this.nameRange; } getValue() { return this.value; } getValueRange() { return this.valueRange; } } exports.FlagOption = FlagOption; /***/ }), /***/ 30791: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ Object.defineProperty(exports, "__esModule", ({ value: true })); const vscode_languageserver_types_1 = __webpack_require__(91674); const arg_1 = __webpack_require__(60904); const cmd_1 = __webpack_require__(85450); const copy_1 = __webpack_require__(84361); const env_1 = __webpack_require__(22474); const entrypoint_1 = __webpack_require__(75822); const from_1 = __webpack_require__(98654); const healthcheck_1 = __webpack_require__(43355); const onbuild_1 = __webpack_require__(46319); const util_1 = __webpack_require__(98707); const workdir_1 = __webpack_require__(99377); class ImageTemplate { constructor() { this.comments = []; this.instructions = []; } addComment(comment) { this.comments.push(comment); } getComments() { return this.comments; } addInstruction(instruction) { this.instructions.push(instruction); } getInstructions() { return this.instructions; } getInstructionAt(line) { for (let instruction of this.instructions) { if (util_1.Util.isInsideRange(vscode_languageserver_types_1.Position.create(line, 0), instruction.getRange())) { return instruction; } } return null; } /** * Gets all the ARG instructions that are defined in this image. */ getARGs() { let args = []; for (let instruction of this.instructions) { if (instruction instanceof arg_1.Arg) { args.push(instruction); } } return args; } /** * Gets all the CMD instructions that are defined in this image. */ getCMDs() { let cmds = []; for (let instruction of this.instructions) { if (instruction instanceof cmd_1.Cmd) { cmds.push(instruction); } } return cmds; } /** * Gets all the COPY instructions that are defined in this image. */ getCOPYs() { let copies = []; for (let instruction of this.instructions) { if (instruction instanceof copy_1.Copy) { copies.push(instruction); } } return copies; } /** * Gets all the ENTRYPOINT instructions that are defined in this image. */ getENTRYPOINTs() { let froms = []; for (let instruction of this.instructions) { if (instruction instanceof entrypoint_1.Entrypoint) { froms.push(instruction); } } return froms; } /** * Gets all the ENV instructions that are defined in this image. */ getENVs() { let args = []; for (let instruction of this.instructions) { if (instruction instanceof env_1.Env) { args.push(instruction); } } return args; } getFROM() { for (const instruction of this.instructions) { if (instruction instanceof from_1.From) { return instruction; } } return null; } /** * Gets all the FROM instructions that are defined in this image. */ getFROMs() { let froms = []; for (let instruction of this.instructions) { if (instruction instanceof from_1.From) { froms.push(instruction); } } return froms; } /** * Gets all the HEALTHCHECK instructions that are defined in this image. */ getHEALTHCHECKs() { let froms = []; for (let instruction of this.instructions) { if (instruction instanceof healthcheck_1.Healthcheck) { froms.push(instruction); } } return froms; } getWORKDIRs() { const workdirs = []; for (const instruction of this.instructions) { if (instruction instanceof workdir_1.Workdir) { workdirs.push(instruction); } } return workdirs; } getOnbuildTriggers() { let triggers = []; for (let instruction of this.instructions) { if (instruction instanceof onbuild_1.Onbuild) { let trigger = instruction.getTriggerInstruction(); if (trigger) { triggers.push(trigger); } } } return triggers; } getAvailableVariables(currentLine) { const variables = []; for (const arg of this.getARGs()) { if (arg.isBefore(currentLine)) { const property = arg.getProperty(); if (property) { const variable = property.getName(); if (variables.indexOf(variable) === -1) { variables.push(variable); } } } } for (const env of this.getENVs()) { if (env.isBefore(currentLine)) { for (const property of env.getProperties()) { const variable = property.getName(); if (variables.indexOf(variable) === -1) { variables.push(variable); } } } } return variables; } /** * Resolves a variable with the given name at the specified line * to its value. If null is returned, then the variable has been * defined but no value was given. If undefined is returned, then * a variable with the given name has not been defined yet as of * the given line. * * @param variable the name of the variable to resolve * @param line the line number that the variable is on, zero-based * @return the value of the variable as defined by an ARG or ENV * instruction, or null if no value has been specified, or * undefined if a variable with the given name has not * been defined */ resolveVariable(variable, line) { let envs = this.getENVs(); for (let i = envs.length - 1; i >= 0; i--) { if (envs[i].isBefore(line)) { for (let property of envs[i].getProperties()) { if (property.getName() === variable) { return property.getValue(); } } } } let args = this.getARGs(); for (let i = args.length - 1; i >= 0; i--) { if (args[i].isBefore(line)) { let property = args[i].getProperty(); if (property && property.getName() === variable) { return property.getValue(); } } } return undefined; } getRange() { const instructions = this.getInstructions(); if (instructions.length === 0) { // all templates should have instructions, this only happens for // the initial set of instruction return vscode_languageserver_types_1.Range.create(0, 0, 0, 0); } const instructionStart = instructions[0].getRange().start; const instructionEnd = instructions[instructions.length - 1].getRange().end; return vscode_languageserver_types_1.Range.create(instructionStart, instructionEnd); } contains(position) { const range = this.getRange(); if (range === null) { return false; } return util_1.Util.isInsideRange(position, range); } } exports.ImageTemplate = ImageTemplate; /***/ }), /***/ 99311: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const util_1 = __webpack_require__(98707); const line_1 = __webpack_require__(47119); const argument_1 = __webpack_require__(12447); const variable_1 = __webpack_require__(28155); const main_1 = __webpack_require__(20871); class Instruction extends line_1.Line { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range); this.dockerfile = dockerfile; this.escapeChar = escapeChar; this.instruction = instruction; this.instructionRange = instructionRange; } toString() { let value = this.getKeyword(); for (let arg of this.getRawArguments()) { value += ' '; value += arg.getValue(); } return value; } getRangeContent(range) { if (range === null) { return null; } return this.document.getText().substring(this.document.offsetAt(range.start), this.document.offsetAt(range.end)); } getInstructionRange() { return this.instructionRange; } getInstruction() { return this.instruction; } getKeyword() { return this.getInstruction().toUpperCase(); } getArgumentsRange() { let args = this.getArguments(); if (args.length === 0) { return null; } return vscode_languageserver_types_1.Range.create(args[0].getRange().start, args[args.length - 1].getRange().end); } getArgumentsRanges() { let args = this.getArguments(); if (args.length === 0) { return []; } if (args[0].getRange().start.line === args[args.length - 1].getRange().end.line) { return [vscode_languageserver_types_1.Range.create(args[0].getRange().start, args[args.length - 1].getRange().end)]; } let ranges = []; let end = -1; let startPosition = args[0].getRange().start; let range = this.getInstructionRange(); let extra = this.document.offsetAt(startPosition) - this.document.offsetAt(range.start); let content = this.getTextContent(); let fullArgs = content.substring(extra, this.document.offsetAt(args[args.length - 1].getRange().end) - this.document.offsetAt(range.start)); let offset = this.document.offsetAt(range.start) + extra; let start = false; let comment = false; for (let i = 0; i < fullArgs.length; i++) { let char = fullArgs.charAt(i); if (char === this.escapeChar) { let next = fullArgs.charAt(i + 1); if (next === ' ' || next === '\t') { whitespaceCheck: for (let j = i + 2; j < fullArgs.length; j++) { switch (fullArgs.charAt(j)) { case ' ': case '\t': continue; case '\r': j++; case '\n': if (startPosition !== null) { ranges.push(vscode_languageserver_types_1.Range.create(startPosition, this.document.positionAt(offset + end + 1))); } startPosition = null; start = true; comment = false; i = j; break whitespaceCheck; default: break whitespaceCheck; } } } else if (next === '\r') { if (startPosition !== null) { ranges.push(vscode_languageserver_types_1.Range.create(startPosition, this.document.positionAt(offset + end + 1))); startPosition = null; } start = true; comment = false; i += 2; } else if (next === '\n') { if (startPosition !== null) { ranges.push(vscode_languageserver_types_1.Range.create(startPosition, this.document.positionAt(offset + end + 1))); } startPosition = null; start = true; comment = false; i++; } else { i++; } } else if (util_1.Util.isNewline(char)) { if (comment) { startPosition = null; start = true; comment = false; } } else { if (!comment) { if (startPosition === null) { if (char === '#') { comment = true; continue; } let position = this.document.positionAt(offset + i); if (position.character !== 0) { startPosition = vscode_languageserver_types_1.Position.create(position.line, 0); } } end = i; } } } if (startPosition === null) { // should only happen if the last argument is on its own line with // no leading whitespace ranges.push(vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + end), this.document.positionAt(offset + end + 1))); } else { ranges.push(vscode_languageserver_types_1.Range.create(startPosition, this.document.positionAt(offset + end + 1))); } return ranges; } getRawArgumentsContent() { let args = this.getArguments(); if (args.length === 0) { return null; } return this.getRangeContent(vscode_languageserver_types_1.Range.create(args[0].getRange().start, args[args.length - 1].getRange().end)); } getArgumentsContent() { let args = this.getArguments(); if (args.length === 0) { return null; } let content = ""; let ranges = this.getArgumentsRanges(); let documentText = this.document.getText(); for (let range of ranges) { content += documentText.substring(this.document.offsetAt(range.start), this.document.offsetAt(range.end)); } return content; } getArguments() { return this.getRawArguments(); } getRawArguments() { let args = []; let range = this.getInstructionRange(); let extra = this.document.offsetAt(range.end) - this.document.offsetAt(range.start); let content = this.getTextContent(); let fullArgs = content.substring(extra); let offset = this.document.offsetAt(range.start) + extra; let start = false; let comment = false; let found = -1; // determines whether the parser has found a space or tab // whitespace character that's a part of an escaped newline sequence let escapedWhitespaceDetected = false; // determines if the parser is currently in an escaped newline sequence let escaping = false; let escapeMarker = -1; let escapedArg = ""; for (let i = 0; i < fullArgs.length; i++) { let char = fullArgs.charAt(i); if (util_1.Util.isWhitespace(char)) { if (escaping) { escapedWhitespaceDetected = true; if (util_1.Util.isNewline(char)) { // reached a newline, any previously // detected whitespace should be ignored escapedWhitespaceDetected = false; if (comment) { // reached a newline, no longer in a comment comment = false; start = true; } } continue; } else if (found !== -1) { if (escapeMarker === -1) { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + i)))); } else { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + escapeMarker)))); } escapeMarker = -1; escapedArg = ""; found = -1; } } else if (char === this.escapeChar) { let next = fullArgs.charAt(i + 1); if (next === ' ' || next === '\t') { whitespaceCheck: for (let j = i + 2; j < fullArgs.length; j++) { let newlineCheck = fullArgs.charAt(j); switch (newlineCheck) { case ' ': case '\t': continue; case '\r': j++; case '\n': comment = false; escaping = true; start = true; if (found !== -1) { escapeMarker = i; } i = j; break whitespaceCheck; default: escapeMarker = i; if (found === -1) { i = j - 1; } break whitespaceCheck; } } } else if (next === '\r') { comment = false; escaping = true; start = true; if (found !== -1 && escapeMarker === -1) { escapeMarker = i; } i += 2; } else if (next === '\n') { comment = false; escaping = true; start = true; if (found !== -1 && escapeMarker === -1) { escapeMarker = i; } i++; } else { if (escapedWhitespaceDetected && escapeMarker !== -1) { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + escapeMarker)))); escapedArg = ""; found = -1; } escapeMarker = -1; escapedWhitespaceDetected = false; escaping = false; if (next === '$') { escapedArg = escapedArg + char + next; } else if (next === '') { // reached EOF, stop processing break; } else { escapedArg = escapedArg + next; } if (found === -1) { found = i; } i++; } } else if (!comment) { if (start && char === '#') { comment = true; } else { if (escapedWhitespaceDetected && escapeMarker !== -1) { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + escapeMarker)))); escapedArg = ""; found = -1; } escapedWhitespaceDetected = false; escaping = false; escapeMarker = -1; escapedArg = escapedArg + char; if (found === -1) { found = i; } } // non-whitespace character detected, reset start = false; } } if (found !== -1) { if (escapeMarker === -1) { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + fullArgs.length)))); } else { args.push(new argument_1.Argument(escapedArg, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + found), this.document.positionAt(offset + escapeMarker)))); } } return args; } getExpandedArguments() { let args = this.getArguments(); for (let i = 0; i < args.length; i++) { const argRange = args[i].getRange(); let offset = this.document.offsetAt(argRange.start); const variables = this.parseVariables(offset, args[i].getValue()); const swaps = []; let requiresExpansion = false; for (let variable of variables) { const value = this.dockerfile.resolveVariable(variable.getName(), variable.getNameRange().start.line); swaps.push(value); requiresExpansion = requiresExpansion || value !== undefined; } if (requiresExpansion) { let expanded = ""; for (let j = 0; j < swaps.length; j++) { const variableRange = variables[j].getRange(); const start = this.document.offsetAt(variableRange.start); const end = this.document.offsetAt(variableRange.end); if (swaps[j]) { // replace variable with its resolved value expanded += this.document.getText().substring(offset, start); expanded += swaps[j]; offset = end; } else { expanded += this.document.getText().substring(offset, end); offset = end; } } const argEnd = this.document.offsetAt(argRange.end); if (argEnd !== offset) { // if the variable's range doesn't match the argument, // append the remaining text expanded += this.document.getText().substring(offset, argEnd); } args[i] = new argument_1.Argument(expanded, argRange); } } return args; } getVariables() { const variables = []; const args = this.getRawArguments(); for (const arg of args) { let range = arg.getRange(); let rawValue = this.document.getText().substring(this.document.offsetAt(range.start), this.document.offsetAt(range.end)); const parsedVariables = this.parseVariables(this.document.offsetAt(arg.getRange().start), rawValue); for (const parsedVariable of parsedVariables) { variables.push(parsedVariable); } } return variables; } parseVariables(offset, arg) { let variables = []; variableLoop: for (let i = 0; i < arg.length; i++) { switch (arg.charAt(i)) { case this.escapeChar: if (arg.charAt(i + 1) === '$') { i++; } break; case '$': if (arg.charAt(i + 1) === '{') { let escapedString = "${"; let escapedName = ""; let nameEnd = -1; let escapedSubstitutionParameter = ""; let substitutionStart = -1; let substitutionEnd = -1; let modifierRead = -1; nameLoop: for (let j = i + 2; j < arg.length; j++) { let char = arg.charAt(j); switch (char) { case this.escapeChar: for (let k = j + 1; k < arg.length; k++) { switch (arg.charAt(k)) { case ' ': case '\t': case '\r': // ignore whitespace continue; case '\n': // escape this newline j = k; continue nameLoop; } } break; case '}': escapedString += '}'; let modifier = null; let modifierRange = null; let substitutionParameter = modifierRead !== -1 ? escapedSubstitutionParameter : null; let substitutionRange = null; if (nameEnd === -1) { nameEnd = j; } else if (nameEnd + 1 === j) { modifier = ""; modifierRange = vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + nameEnd + 1), this.document.positionAt(offset + nameEnd + 1)); } else { if (substitutionStart === -1) { // no substitution parameter found, // but a modifier character existed, // just offset the range by 1 from // the modifier character substitutionStart = modifierRead + 1; substitutionEnd = modifierRead + 1; } else { // offset one more from the last // character found substitutionEnd = substitutionEnd + 1; } modifier = arg.substring(modifierRead, modifierRead + 1); modifierRange = vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + modifierRead), this.document.positionAt(offset + modifierRead + 1)); substitutionRange = vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + substitutionStart), this.document.positionAt(offset + substitutionEnd)); } let start = this.document.positionAt(offset + i); variables.push(new variable_1.Variable(escapedName, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + i + 2), this.document.positionAt(offset + nameEnd)), vscode_languageserver_types_1.Range.create(start, this.document.positionAt(offset + j + 1)), modifier, modifierRange, substitutionParameter, substitutionRange, this.dockerfile.resolveVariable(escapedName, start.line) !== undefined, this.isBuildVariable(escapedName, start.line), escapedString)); i = j; continue variableLoop; case ':': if (nameEnd === -1) { nameEnd = j; } else if (modifierRead !== -1) { if (substitutionStart === -1) { substitutionStart = j; substitutionEnd = j; } else { substitutionEnd = j; } escapedSubstitutionParameter += ':'; } else { modifierRead = j; } escapedString += ':'; break; case '\n': case '\r': case ' ': case '\t': break; default: if (nameEnd === -1) { escapedName += char; } else if (modifierRead !== -1) { if (substitutionStart === -1) { substitutionStart = j; substitutionEnd = j; } else { substitutionEnd = j; } escapedSubstitutionParameter += char; } else { modifierRead = j; } escapedString += char; break; } } // no } found, not a valid variable, stop processing break variableLoop; } else if (util_1.Util.isWhitespace(arg.charAt(i + 1)) || i === arg.length - 1) { // $ followed by whitespace or EOF, ignore this variable continue; } else { let escapedName = ""; nameLoop: for (let j = i + 1; j < arg.length; j++) { let char = arg.charAt(j); switch (char) { case '\r': case '\n': case ' ': case '\t': continue; case '$': case '\'': case '"': let varStart = this.document.positionAt(offset + i); variables.push(new variable_1.Variable(escapedName, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + i + 1), this.document.positionAt(offset + j)), vscode_languageserver_types_1.Range.create(varStart, this.document.positionAt(offset + j)), null, null, null, null, this.dockerfile.resolveVariable(escapedName, varStart.line) !== undefined, this.isBuildVariable(escapedName, varStart.line), '$' + escapedName)); i = j - 1; continue variableLoop; case this.escapeChar: for (let k = j + 1; k < arg.length; k++) { switch (arg.charAt(k)) { case ' ': case '\t': case '\r': // ignore whitespace continue; case '\n': // escape this newline j = k; continue nameLoop; } } // reached EOF after an escape character let start = this.document.positionAt(offset + i); variables.push(new variable_1.Variable(escapedName, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + i + 1), this.document.positionAt(offset + j)), vscode_languageserver_types_1.Range.create(start, this.document.positionAt(offset + j)), null, null, null, null, this.dockerfile.resolveVariable(escapedName, start.line) !== undefined, this.isBuildVariable(escapedName, start.line), '$' + escapedName)); break variableLoop; } if (char.match(/^[a-z0-9_]+$/i) === null) { let varStart = this.document.positionAt(offset + i); variables.push(new variable_1.Variable(escapedName, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + i + 1), this.document.positionAt(offset + j)), vscode_languageserver_types_1.Range.create(varStart, this.document.positionAt(offset + j)), null, null, null, null, this.dockerfile.resolveVariable(escapedName, varStart.line) !== undefined, this.isBuildVariable(escapedName, varStart.line), '$' + escapedName)); i = j - 1; continue variableLoop; } escapedName += char; } let start = this.document.positionAt(offset + i); variables.push(new variable_1.Variable(escapedName, vscode_languageserver_types_1.Range.create(this.document.positionAt(offset + i + 1), this.document.positionAt(offset + arg.length)), vscode_languageserver_types_1.Range.create(start, this.document.positionAt(offset + arg.length)), null, null, null, null, this.dockerfile.resolveVariable(escapedName, start.line) !== undefined, this.isBuildVariable(escapedName, start.line), '$' + escapedName)); } break variableLoop; } } return variables; } isBuildVariable(variable, line) { if (this.getKeyword() === main_1.Keyword.FROM) { for (const initialArg of this.dockerfile.getInitialARGs()) { const arg = initialArg; const property = arg.getProperty(); if (property && variable === property.getName()) { return true; } } return undefined; } let image = this.dockerfile.getContainingImage(vscode_languageserver_types_1.Position.create(line, 0)); let envs = image.getENVs(); for (let i = envs.length - 1; i >= 0; i--) { if (envs[i].isBefore(line)) { for (let property of envs[i].getProperties()) { if (property.getName() === variable) { return false; } } } } let args = image.getARGs(); for (let i = args.length - 1; i >= 0; i--) { if (args[i].isBefore(line)) { let property = args[i].getProperty(); if (property && property.getName() === variable) { return true; } } } return undefined; } } exports.Instruction = Instruction; /***/ }), /***/ 46581: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Add extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } stopSearchingForFlags(argument) { return argument.indexOf("--") === -1; } } exports.Add = Add; /***/ }), /***/ 60904: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const property_1 = __webpack_require__(38698); const propertyInstruction_1 = __webpack_require__(78535); class Arg extends propertyInstruction_1.PropertyInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); this.property = null; const args = this.getPropertyArguments(); if (args.length === 1) { this.property = new property_1.Property(this.document, this.escapeChar, args[0]); } else { this.property = null; } } /** * Returns the variable defined by this ARG. This may be null if * this ARG instruction is malformed and has no variable * declaration. */ getProperty() { return this.property; } } exports.Arg = Arg; /***/ }), /***/ 85450: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Cmd extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.Cmd = Cmd; /***/ }), /***/ 84361: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Copy extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } stopSearchingForFlags(argument) { return argument.indexOf("--") === -1; } getFromFlag() { let flags = super.getFlags(); return flags.length === 1 && flags[0].getName() === "from" ? flags[0] : null; } } exports.Copy = Copy; /***/ }), /***/ 75822: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Entrypoint extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.Entrypoint = Entrypoint; /***/ }), /***/ 22474: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const propertyInstruction_1 = __webpack_require__(78535); class Env extends propertyInstruction_1.PropertyInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } getProperties() { return super.getProperties(); } } exports.Env = Env; /***/ }), /***/ 98654: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const modifiableInstruction_1 = __webpack_require__(78514); class From extends modifiableInstruction_1.ModifiableInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } stopSearchingForFlags(argument) { return argument.indexOf("--") === -1; } getImage() { return this.getRangeContent(this.getImageRange()); } /** * Returns the name of the image that will be used as the base image. * * @return the base image's name, or null if unspecified */ getImageName() { return this.getRangeContent(this.getImageNameRange()); } /** * Returns the range that covers the name of the image used by * this instruction. * * @return the range of the name of this instruction's argument, * or null if no image has been specified */ getImageNameRange() { let range = this.getImageRange(); if (range) { let registryRange = this.getRegistryRange(); if (registryRange) { range.start = this.document.positionAt(this.document.offsetAt(registryRange.end) + 1); } let tagRange = this.getImageTagRange(); let digestRange = this.getImageDigestRange(); if (tagRange === null) { if (digestRange !== null) { range.end = this.document.positionAt(this.document.offsetAt(digestRange.start) - 1); } } else { range.end = this.document.positionAt(this.document.offsetAt(tagRange.start) - 1); } return range; } return null; } /** * Returns the range that covers the image argument of this * instruction. This includes the tag or digest of the image if * it has been specified by the instruction. * * @return the range of the image argument, or null if no image * has been specified */ getImageRange() { let args = this.getArguments(); return args.length !== 0 ? args[0].getRange() : null; } getImageTag() { return this.getRangeContent(this.getImageTagRange()); } /** * Returns the range in the document that the tag of the base * image encompasses. * * @return the base image's tag's range in the document, or null * if no tag has been specified */ getImageTagRange() { const range = this.getImageRange(); if (range) { if (this.getImageDigestRange() === null) { let content = this.getRangeContent(range); let index = this.lastIndexOf(this.document.offsetAt(range.start), content, ':'); // the colon might be for a private registry's port and not a tag if (index > content.indexOf('/')) { return vscode_languageserver_types_1.Range.create(range.start.line, range.start.character + index + 1, range.end.line, range.end.character); } } } return null; } getImageDigest() { return this.getRangeContent(this.getImageDigestRange()); } /** * Returns the range in the document that the digest of the base * image encompasses. * * @return the base image's digest's range in the document, or null * if no digest has been specified */ getImageDigestRange() { let range = this.getImageRange(); if (range) { let content = this.getRangeContent(range); let index = this.lastIndexOf(this.document.offsetAt(range.start), content, '@'); if (index !== -1) { return vscode_languageserver_types_1.Range.create(range.start.line, range.start.character + index + 1, range.end.line, range.end.character); } } return null; } indexOf(documentOffset, content, searchString) { let index = content.indexOf(searchString); const variables = this.getVariables(); for (let i = 0; i < variables.length; i++) { const position = documentOffset + index; const variableRange = variables[i].getRange(); if (this.document.offsetAt(variableRange.start) < position && position < this.document.offsetAt(variableRange.end)) { const offset = this.document.offsetAt(variableRange.end) - documentOffset; const substring = content.substring(offset); const subIndex = substring.indexOf(searchString); if (subIndex === -1) { return -1; } index = subIndex + offset; i = -1; continue; } } return index; } lastIndexOf(documentOffset, content, searchString) { let index = content.lastIndexOf(searchString); const variables = this.getVariables(); for (let i = 0; i < variables.length; i++) { const position = documentOffset + index; const variableRange = variables[i].getRange(); if (this.document.offsetAt(variableRange.start) < position && position < this.document.offsetAt(variableRange.end)) { index = content.substring(0, index).lastIndexOf(searchString); if (index === -1) { return -1; } i = -1; continue; } } return index; } getRegistry() { return this.getRangeContent(this.getRegistryRange()); } getRegistryRange() { const range = this.getImageRange(); if (range) { const tagRange = this.getImageTagRange(); const digestRange = this.getImageDigestRange(); if (tagRange === null) { if (digestRange !== null) { range.end = this.document.positionAt(this.document.offsetAt(digestRange.start) - 1); } } else { range.end = this.document.positionAt(this.document.offsetAt(tagRange.start) - 1); } const content = this.getRangeContent(range); const rangeStart = this.document.offsetAt(range.start); const portIndex = this.indexOf(rangeStart, content, ':'); const dotIndex = this.indexOf(rangeStart, content, '.'); const startingSlashIndex = this.indexOf(rangeStart, content, '/'); // hostname detected if (portIndex !== -1 || dotIndex !== -1) { return vscode_languageserver_types_1.Range.create(range.start, this.document.positionAt(rangeStart + startingSlashIndex)); } const registry = content.substring(0, startingSlashIndex); // localhost registry detected if (registry === 'localhost') { return vscode_languageserver_types_1.Range.create(range.start, this.document.positionAt(rangeStart + startingSlashIndex)); } } return null; } getBuildStage() { let range = this.getBuildStageRange(); return range === null ? null : this.getRangeContent(range); } getBuildStageRange() { let args = this.getArguments(); if (args.length > 2 && args[1].getValue().toUpperCase() === "AS") { return args[2].getRange(); } return null; } getPlatformFlag() { let flags = super.getFlags(); return flags.length === 1 && flags[0].getName() === "platform" ? flags[0] : null; } } exports.From = From; /***/ }), /***/ 43355: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const modifiableInstruction_1 = __webpack_require__(78514); class Healthcheck extends modifiableInstruction_1.ModifiableInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } stopSearchingForFlags(argument) { argument = argument.toUpperCase(); return argument === "CMD" || argument === "NONE"; } getSubcommand() { let args = this.getArguments(); return args.length !== 0 ? args[0] : null; } } exports.Healthcheck = Healthcheck; /***/ }), /***/ 30938: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const propertyInstruction_1 = __webpack_require__(78535); const util_1 = __webpack_require__(98707); class Label extends propertyInstruction_1.PropertyInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } getVariables() { const variables = super.getVariables(); const properties = this.getProperties(); // iterate over all of this LABEL's properties for (const property of properties) { const value = property.getUnescapedValue(); // check if the value is contained in single quotes, // single quotes would indicate a literal value if (value !== null && value.length > 2 && value.charAt(0) === '\'' && value.charAt(value.length - 1) === '\'') { const range = property.getValueRange(); for (let i = 0; i < variables.length; i++) { // if a variable is in a single quote, remove it from the list if (util_1.Util.isInsideRange(variables[i].getRange().start, range)) { variables.splice(i, 1); i--; } } } } return variables; } getProperties() { return super.getProperties(); } } exports.Label = Label; /***/ }), /***/ 46319: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const parser_1 = __webpack_require__(50668); const instruction_1 = __webpack_require__(99311); class Onbuild extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } getTrigger() { let trigger = this.getTriggerWord(); return trigger === null ? null : trigger.toUpperCase(); } getTriggerWord() { return this.getRangeContent(this.getTriggerRange()); } getTriggerRange() { let args = this.getArguments(); return args.length > 0 ? args[0].getRange() : null; } getTriggerInstruction() { let triggerRange = this.getTriggerRange(); if (triggerRange === null) { return null; } let args = this.getArguments(); return parser_1.Parser.createInstruction(this.document, this.dockerfile, this.escapeChar, vscode_languageserver_types_1.Range.create(args[0].getRange().start, this.getRange().end), this.getTriggerWord(), triggerRange); } } exports.Onbuild = Onbuild; /***/ }), /***/ 3062: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Run extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } stopSearchingForFlags(argument) { return argument.indexOf("--") === -1; } } exports.Run = Run; /***/ }), /***/ 40978: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Shell extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.Shell = Shell; /***/ }), /***/ 62885: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const instruction_1 = __webpack_require__(99311); class Stopsignal extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.Stopsignal = Stopsignal; /***/ }), /***/ 87372: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const instruction_1 = __webpack_require__(99311); class User extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.User = User; /***/ }), /***/ 3951: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const jsonInstruction_1 = __webpack_require__(24990); class Volume extends jsonInstruction_1.JSONInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } } exports.Volume = Volume; /***/ }), /***/ 99377: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const instruction_1 = __webpack_require__(99311); class Workdir extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } /** * Returns the path that has been defined. Note that this path may * be absolute or relative depending on what was written in the * instruction. * * @return the working directory's path, or null if this * instruction has no arguments */ getPath() { return this.getArgumentsContent(); } /** * Returns the absolute path that this instruction resolves to. The * function will inspect prior WORKDIR instructions in the current * image or another build stage in the Dockerfile to try to * determine this. * * @return the absolute path of the working directory, or null if * this instruction has no arguments, or undefined if it * cannot be determined because only relative paths could be * found */ getAbsolutePath() { const path = this.getPath(); if (path === null || path.startsWith("/")) { return path; } const startLine = this.getRange().start.line; const hierarchy = this.dockerfile.getStageHierarchy(startLine); for (let i = hierarchy.length - 1; i >= 0; i--) { const workdirs = hierarchy[i].getWORKDIRs(); for (let j = workdirs.length - 1; j >= 0; j--) { if (workdirs[j].getRange().start.line < startLine) { const parent = workdirs[j].getAbsolutePath(); if (parent === undefined || parent === null) { return undefined; } return parent.endsWith("/") ? parent + path : parent + "/" + path; } } } return undefined; } } exports.Workdir = Workdir; /***/ }), /***/ 24703: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const argument_1 = __webpack_require__(12447); class JSONArgument extends argument_1.Argument { constructor(value, range, jsonRange) { super(value, range); this.jsonRange = jsonRange; } getJSONRange() { return this.jsonRange; } getJSONValue() { let value = super.getValue(); value = value.substring(1, value.length - 1); return value; } } exports.JSONArgument = JSONArgument; /***/ }), /***/ 24990: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const argument_1 = __webpack_require__(12447); const jsonArgument_1 = __webpack_require__(24703); const modifiableInstruction_1 = __webpack_require__(78514); class JSONInstruction extends modifiableInstruction_1.ModifiableInstruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); this.openingBracket = null; this.closingBracket = null; this.jsonStrings = []; const argsContent = this.getRawArgumentsContent(); if (argsContent === null) { return; } const args = this.getArguments(); if (args.length === 1 && args[0].getValue() === "[]") { let argRange = args[0].getRange(); this.openingBracket = new argument_1.Argument("[", vscode_languageserver_types_1.Range.create(argRange.start.line, argRange.start.character, argRange.start.line, argRange.start.character + 1)); this.closingBracket = new argument_1.Argument("]", vscode_languageserver_types_1.Range.create(argRange.start.line, argRange.start.character + 1, argRange.end.line, argRange.end.character)); return; } else if (args.length === 2 && args[0].getValue() === '[' && args[1].getValue() === ']') { this.openingBracket = args[0]; this.closingBracket = args[1]; return; } const argsOffset = document.offsetAt(this.getArgumentsRange().start); let start = -1; let last = ""; let quoted = false; let escapedArg = ""; argsCheck: for (let i = 0; i < argsContent.length; i++) { let char = argsContent.charAt(i); switch (char) { case '[': if (last === "") { this.openingBracket = new argument_1.Argument("[", vscode_languageserver_types_1.Range.create(document.positionAt(argsOffset + i), document.positionAt(argsOffset + i + 1))); last = '['; } else if (quoted) { escapedArg = escapedArg + char; } else { break argsCheck; } break; case '"': if (last === '[' || last === ',') { start = i; quoted = true; last = '"'; escapedArg = escapedArg + char; continue; } else if (last === '"') { if (quoted) { escapedArg = escapedArg + char; // quoted string done quoted = false; this.jsonStrings.push(new jsonArgument_1.JSONArgument(escapedArg, vscode_languageserver_types_1.Range.create(document.positionAt(argsOffset + start), document.positionAt(argsOffset + i + 1)), vscode_languageserver_types_1.Range.create(document.positionAt(argsOffset + start + 1), document.positionAt(argsOffset + i)))); escapedArg = ""; } else { // should be a , or a ] break argsCheck; } } else { break argsCheck; } break; case ',': if (quoted) { escapedArg = escapedArg + char; } else { if (last === '"') { last = ','; } else { break argsCheck; } } break; case ']': if (quoted) { escapedArg = escapedArg + char; } else if (last !== "") { this.closingBracket = new argument_1.Argument("]", vscode_languageserver_types_1.Range.create(document.positionAt(argsOffset + i), document.positionAt(argsOffset + i + 1))); break argsCheck; } break; case ' ': case '\t': break; case '\\': if (quoted) { switch (argsContent.charAt(i + 1)) { case '"': case '\\': escapedArg = escapedArg + argsContent.charAt(i + 1); i++; continue; case ' ': case '\t': escapeCheck: for (let j = i + 2; j < argsContent.length; j++) { switch (argsContent.charAt(j)) { case '\r': // offset one more for \r\n j++; case '\n': i = j; continue argsCheck; case ' ': case '\t': break; default: break escapeCheck; } } break; case '\r': // offset one more for \r\n i++; default: i++; continue; } } else { escapeCheck: for (let j = i + 1; j < argsContent.length; j++) { switch (argsContent.charAt(j)) { case '\r': // offset one more for \r\n j++; case '\n': i = j; continue argsCheck; case ' ': case '\t': break; default: break escapeCheck; } } } break argsCheck; default: if (!quoted) { break argsCheck; } escapedArg = escapedArg + char; break; } } } stopSearchingForFlags(_value) { return true; } getOpeningBracket() { return this.openingBracket; } getJSONStrings() { return this.jsonStrings; } getClosingBracket() { return this.closingBracket; } } exports.JSONInstruction = JSONInstruction; /***/ }), /***/ 47119: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class Line { constructor(document, range) { this.document = document; this.range = range; } getRange() { return this.range; } getTextContent() { return this.document.getText().substring(this.document.offsetAt(this.range.start), this.document.offsetAt(this.range.end)); } isAfter(line) { return this.range.start.line > line.range.start.line; } isBefore(line) { return this.range.start.line < line; } } exports.Line = Line; /***/ }), /***/ 20871: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var argument_1 = __webpack_require__(12447); exports.Argument = argument_1.Argument; var jsonArgument_1 = __webpack_require__(24703); exports.JSONArgument = jsonArgument_1.JSONArgument; const comment_1 = __webpack_require__(42179); exports.Comment = comment_1.Comment; const parser_1 = __webpack_require__(50668); var flag_1 = __webpack_require__(11170); exports.Flag = flag_1.Flag; const instruction_1 = __webpack_require__(99311); exports.Instruction = instruction_1.Instruction; var line_1 = __webpack_require__(47119); exports.Line = line_1.Line; const parserDirective_1 = __webpack_require__(41745); exports.ParserDirective = parserDirective_1.ParserDirective; var property_1 = __webpack_require__(38698); exports.Property = property_1.Property; var variable_1 = __webpack_require__(28155); exports.Variable = variable_1.Variable; var add_1 = __webpack_require__(46581); exports.Add = add_1.Add; const arg_1 = __webpack_require__(60904); exports.Arg = arg_1.Arg; const cmd_1 = __webpack_require__(85450); exports.Cmd = cmd_1.Cmd; const copy_1 = __webpack_require__(84361); exports.Copy = copy_1.Copy; const entrypoint_1 = __webpack_require__(75822); exports.Entrypoint = entrypoint_1.Entrypoint; const env_1 = __webpack_require__(22474); exports.Env = env_1.Env; const from_1 = __webpack_require__(98654); exports.From = from_1.From; const healthcheck_1 = __webpack_require__(43355); exports.Healthcheck = healthcheck_1.Healthcheck; var jsonInstruction_1 = __webpack_require__(24990); exports.JSONInstruction = jsonInstruction_1.JSONInstruction; var label_1 = __webpack_require__(30938); exports.Label = label_1.Label; var modifiableInstruction_1 = __webpack_require__(78514); exports.ModifiableInstruction = modifiableInstruction_1.ModifiableInstruction; var onbuild_1 = __webpack_require__(46319); exports.Onbuild = onbuild_1.Onbuild; var propertyInstruction_1 = __webpack_require__(78535); exports.PropertyInstruction = propertyInstruction_1.PropertyInstruction; var shell_1 = __webpack_require__(40978); exports.Shell = shell_1.Shell; var stopsignal_1 = __webpack_require__(62885); exports.Stopsignal = stopsignal_1.Stopsignal; var user_1 = __webpack_require__(87372); exports.User = user_1.User; var volume_1 = __webpack_require__(3951); exports.Volume = volume_1.Volume; const workdir_1 = __webpack_require__(99377); exports.Workdir = workdir_1.Workdir; var Keyword; (function (Keyword) { Keyword["ADD"] = "ADD"; Keyword["ARG"] = "ARG"; Keyword["CMD"] = "CMD"; Keyword["COPY"] = "COPY"; Keyword["ENTRYPOINT"] = "ENTRYPOINT"; Keyword["ENV"] = "ENV"; Keyword["EXPOSE"] = "EXPOSE"; Keyword["FROM"] = "FROM"; Keyword["HEALTHCHECK"] = "HEALTHCHECK"; Keyword["LABEL"] = "LABEL"; Keyword["MAINTAINER"] = "MAINTAINER"; Keyword["ONBUILD"] = "ONBUILD"; Keyword["RUN"] = "RUN"; Keyword["SHELL"] = "SHELL"; Keyword["STOPSIGNAL"] = "STOPSIGNAL"; Keyword["USER"] = "USER"; Keyword["VOLUME"] = "VOLUME"; Keyword["WORKDIR"] = "WORKDIR"; })(Keyword = exports.Keyword || (exports.Keyword = {})); var Directive; (function (Directive) { Directive["escape"] = "escape"; Directive["syntax"] = "syntax"; })(Directive = exports.Directive || (exports.Directive = {})); exports.DefaultVariables = [ "FTP_PROXY", "ftp_proxy", "HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy", "NO_PROXY", "no_proxy" ]; var DockerfileParser; (function (DockerfileParser) { function parse(content) { let parser = new parser_1.Parser(); return parser.parse(content); } DockerfileParser.parse = parse; })(DockerfileParser = exports.DockerfileParser || (exports.DockerfileParser = {})); /***/ }), /***/ 78514: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const flag_1 = __webpack_require__(11170); const instruction_1 = __webpack_require__(99311); class ModifiableInstruction extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); } getFlags() { if (!this.flags) { this.flags = []; for (let arg of this.getArguments()) { let value = arg.getValue(); if (this.stopSearchingForFlags(value)) { return this.flags; } else if (value.indexOf("--") === 0) { let range = arg.getRange(); let rawValue = this.document.getText().substring(this.document.offsetAt(range.start), this.document.offsetAt(range.end)); let nameIndex = value.indexOf('='); let index = rawValue.indexOf('='); let firstMatch = false; let secondMatch = false; let startIndex = -1; nameSearchLoop: for (let i = 0; i < rawValue.length; i++) { switch (rawValue.charAt(i)) { case '\\': case ' ': case '\t': case '\r': case '\n': break; case '-': if (secondMatch) { startIndex = i; break nameSearchLoop; } else if (firstMatch) { secondMatch = true; } else { firstMatch = true; } break; default: startIndex = i; break nameSearchLoop; } } let nameStart = this.document.positionAt(this.document.offsetAt(range.start) + startIndex); if (index === -1) { this.flags.push(new flag_1.Flag(this.document, range, value.substring(2), vscode_languageserver_types_1.Range.create(nameStart, range.end), null, null)); } else if (index === value.length - 1) { let nameEnd = this.document.positionAt(this.document.offsetAt(range.start) + index); this.flags.push(new flag_1.Flag(this.document, range, value.substring(2, index), vscode_languageserver_types_1.Range.create(nameStart, nameEnd), "", vscode_languageserver_types_1.Range.create(range.end, range.end))); } else { let nameEnd = this.document.positionAt(this.document.offsetAt(range.start) + index); this.flags.push(new flag_1.Flag(this.document, range, value.substring(2, nameIndex), vscode_languageserver_types_1.Range.create(nameStart, nameEnd), value.substring(nameIndex + 1), vscode_languageserver_types_1.Range.create(this.document.positionAt(this.document.offsetAt(range.start) + index + 1), range.end))); } } } } return this.flags; } getArguments() { const args = super.getArguments(); const flags = this.getFlags(); if (flags.length === 0) { return args; } for (let i = 0; i < flags.length; i++) { args.shift(); } return args; } } exports.ModifiableInstruction = ModifiableInstruction; /***/ }), /***/ 50668: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ Object.defineProperty(exports, "__esModule", ({ value: true })); const vscode_languageserver_types_1 = __webpack_require__(91674); const comment_1 = __webpack_require__(42179); const parserDirective_1 = __webpack_require__(41745); const instruction_1 = __webpack_require__(99311); const add_1 = __webpack_require__(46581); const arg_1 = __webpack_require__(60904); const cmd_1 = __webpack_require__(85450); const copy_1 = __webpack_require__(84361); const env_1 = __webpack_require__(22474); const entrypoint_1 = __webpack_require__(75822); const from_1 = __webpack_require__(98654); const healthcheck_1 = __webpack_require__(43355); const label_1 = __webpack_require__(30938); const onbuild_1 = __webpack_require__(46319); const run_1 = __webpack_require__(3062); const shell_1 = __webpack_require__(40978); const stopsignal_1 = __webpack_require__(62885); const workdir_1 = __webpack_require__(99377); const user_1 = __webpack_require__(87372); const volume_1 = __webpack_require__(3951); const dockerfile_1 = __webpack_require__(71513); class Parser { constructor() { this.escapeChar = null; } static createInstruction(document, dockerfile, escapeChar, lineRange, instruction, instructionRange) { switch (instruction.toUpperCase()) { case "ADD": return new add_1.Add(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "ARG": return new arg_1.Arg(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "CMD": return new cmd_1.Cmd(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "COPY": return new copy_1.Copy(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "ENTRYPOINT": return new entrypoint_1.Entrypoint(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "ENV": return new env_1.Env(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "FROM": return new from_1.From(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "HEALTHCHECK": return new healthcheck_1.Healthcheck(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "LABEL": return new label_1.Label(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "ONBUILD": return new onbuild_1.Onbuild(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "RUN": return new run_1.Run(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "SHELL": return new shell_1.Shell(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "STOPSIGNAL": return new stopsignal_1.Stopsignal(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "WORKDIR": return new workdir_1.Workdir(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "USER": return new user_1.User(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); case "VOLUME": return new volume_1.Volume(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); } return new instruction_1.Instruction(document, lineRange, dockerfile, escapeChar, instruction, instructionRange); } getParserDirectives(document, buffer) { // reset the escape directive in between runs const directives = []; this.escapeChar = ''; directiveCheck: for (let i = 0; i < buffer.length; i++) { switch (buffer.charAt(i)) { case ' ': case '\t': break; case '\r': case '\n': // blank lines stop the parsing of directives immediately break directiveCheck; case '#': let commentStart = i; let directiveStart = -1; let directiveEnd = -1; for (let j = i + 1; j < buffer.length; j++) { let char = buffer.charAt(j); switch (char) { case ' ': case '\t': if (directiveStart !== -1 && directiveEnd === -1) { directiveEnd = j; } break; case '\r': case '\n': break directiveCheck; case '=': let valueStart = -1; let valueEnd = -1; if (directiveEnd === -1) { directiveEnd = j; } // assume the line ends with the file let lineEnd = buffer.length; directiveValue: for (let k = j + 1; k < buffer.length; k++) { char = buffer.charAt(k); switch (char) { case '\r': case '\n': if (valueStart !== -1 && valueEnd === -1) { valueEnd = k; } // line break found, reset lineEnd = k; break directiveValue; case '\t': case ' ': if (valueStart !== -1 && valueEnd === -1) { valueEnd = k; } continue; default: if (valueStart === -1) { valueStart = k; } break; } } let lineRange = vscode_languageserver_types_1.Range.create(document.positionAt(commentStart), document.positionAt(lineEnd)); if (directiveStart === -1) { // no directive, it's a regular comment break directiveCheck; } if (valueStart === -1) { // no non-whitespace characters found, highlight all the characters then valueStart = j + 1; valueEnd = lineEnd; } else if (valueEnd === -1) { // reached EOF valueEnd = buffer.length; } let nameRange = vscode_languageserver_types_1.Range.create(document.positionAt(directiveStart), document.positionAt(directiveEnd)); let valueRange = vscode_languageserver_types_1.Range.create(document.positionAt(valueStart), document.positionAt(valueEnd)); directives.push(new parserDirective_1.ParserDirective(document, lineRange, nameRange, valueRange)); directiveStart = -1; if (buffer.charAt(valueEnd) === '\r') { // skip over the \r i = valueEnd + 1; } else { i = valueEnd; } continue directiveCheck; default: if (directiveStart === -1) { directiveStart = j; } break; } } break; default: break directiveCheck; } } return directives; } parse(buffer) { let document = vscode_languageserver_types_1.TextDocument.create("", "", 0, buffer); let dockerfile = new dockerfile_1.Dockerfile(document); let directives = this.getParserDirectives(document, buffer); let offset = 0; this.escapeChar = '\\'; if (directives.length > 0) { dockerfile.setDirectives(directives); this.escapeChar = dockerfile.getEscapeCharacter(); // start parsing after the directives offset = document.offsetAt(vscode_languageserver_types_1.Position.create(directives.length, 0)); } lineCheck: for (let i = offset; i < buffer.length; i++) { let char = buffer.charAt(i); switch (char) { case ' ': case '\t': case '\r': case '\n': break; case '#': for (let j = i + 1; j < buffer.length; j++) { char = buffer.charAt(j); switch (char) { case '\r': dockerfile.addComment(new comment_1.Comment(document, vscode_languageserver_types_1.Range.create(document.positionAt(i), document.positionAt(j)))); // offset one more for \r\n i = j + 1; continue lineCheck; case '\n': dockerfile.addComment(new comment_1.Comment(document, vscode_languageserver_types_1.Range.create(document.positionAt(i), document.positionAt(j)))); i = j; continue lineCheck; } } // reached EOF let range = vscode_languageserver_types_1.Range.create(document.positionAt(i), document.positionAt(buffer.length)); dockerfile.addComment(new comment_1.Comment(document, range)); break lineCheck; default: let instruction = char; let instructionStart = i; let instructionEnd = -1; let lineRange = null; let instructionRange = null; let escapedInstruction = false; instructionCheck: for (let j = i + 1; j < buffer.length; j++) { char = buffer.charAt(j); switch (char) { case this.escapeChar: escapedInstruction = true; char = buffer.charAt(j + 1); if (char === '\r') { // skip two for \r\n j += 2; } else if (char === '\n') { j++; } else if (char === ' ' || char === '\t') { for (let k = j + 2; k < buffer.length; k++) { switch (buffer.charAt(k)) { case ' ': case '\t': break; case '\r': // skip another for \r\n j = k + 1; continue instructionCheck; case '\n': j = k; continue instructionCheck; default: instructionEnd = j + 1; instruction = instruction + this.escapeChar; j = k - 2; continue instructionCheck; } } instructionEnd = j + 1; instruction = instruction + this.escapeChar; break instructionCheck; } else { instructionEnd = j + 1; instruction = instruction + this.escapeChar; } break; case ' ': case '\t': if (escapedInstruction) { // on an escaped newline, need to search for non-whitespace escapeCheck: for (let k = j + 1; k < buffer.length; k++) { switch (buffer.charAt(k)) { case ' ': case '\t': break; case '\r': // skip another for \r\n j = k + 1; continue instructionCheck; case '\n': j = k; continue instructionCheck; default: break escapeCheck; } } escapedInstruction = false; } if (instructionEnd === -1) { instructionEnd = j; } let escaped = false; argumentsCheck: for (let k = j + 1; k < buffer.length; k++) { switch (buffer.charAt(k)) { case '\r': case '\n': if (escaped) { continue; } i = k; lineRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(k)); instructionRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(instructionEnd)); dockerfile.addInstruction(Parser.createInstruction(document, dockerfile, this.escapeChar, lineRange, instruction, instructionRange)); continue lineCheck; case this.escapeChar: let next = buffer.charAt(k + 1); if (next === '\n') { escaped = true; k++; } else if (next === '\r') { escaped = true; // skip two chars for \r\n k = k + 2; } else if (next === ' ' || next === '\t') { escapeCheck: for (let l = k + 2; l < buffer.length; l++) { switch (buffer.charAt(l)) { case ' ': case '\t': break; case '\r': // skip another char for \r\n escaped = true; k = l + 1; break escapeCheck; case '\n': escaped = true; k = l; break escapeCheck; default: k = l; break escapeCheck; } } } continue; case '#': if (escaped) { for (let l = k + 1; l < buffer.length; l++) { switch (buffer.charAt(l)) { case '\r': dockerfile.addComment(new comment_1.Comment(document, vscode_languageserver_types_1.Range.create(document.positionAt(k), document.positionAt(l)))); // offset one more for \r\n k = l + 1; continue argumentsCheck; case '\n': let range = vscode_languageserver_types_1.Range.create(document.positionAt(k), document.positionAt(l)); dockerfile.addComment(new comment_1.Comment(document, range)); k = l; continue argumentsCheck; } } let range = vscode_languageserver_types_1.Range.create(document.positionAt(k), document.positionAt(buffer.length)); dockerfile.addComment(new comment_1.Comment(document, range)); break argumentsCheck; } break; case ' ': case '\t': break; default: if (escaped) { escaped = false; } break; } } // reached EOF lineRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(buffer.length)); instructionRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(instructionEnd)); dockerfile.addInstruction(Parser.createInstruction(document, dockerfile, this.escapeChar, lineRange, instruction, instructionRange)); break lineCheck; case '\r': if (instructionEnd === -1) { instructionEnd = j; } // skip for \r\n j++; case '\n': if (escapedInstruction) { continue; } if (instructionEnd === -1) { instructionEnd = j; } lineRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(instructionEnd)); dockerfile.addInstruction(Parser.createInstruction(document, dockerfile, this.escapeChar, lineRange, instruction, lineRange)); i = j; continue lineCheck; default: instructionEnd = j + 1; instruction = instruction + char; break; } } // reached EOF if (instructionEnd === -1) { instructionEnd = buffer.length; } lineRange = vscode_languageserver_types_1.Range.create(document.positionAt(instructionStart), document.positionAt(instructionEnd)); dockerfile.addInstruction(Parser.createInstruction(document, dockerfile, this.escapeChar, lineRange, instruction, lineRange)); break lineCheck; } } dockerfile.organizeComments(); return dockerfile; } } exports.Parser = Parser; /***/ }), /***/ 41745: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const main_1 = __webpack_require__(20871); const line_1 = __webpack_require__(47119); class ParserDirective extends line_1.Line { constructor(document, range, nameRange, valueRange) { super(document, range); this.nameRange = nameRange; this.valueRange = valueRange; } toString() { return "# " + this.getName() + '=' + this.getValue(); } getNameRange() { return this.nameRange; } getValueRange() { return this.valueRange; } getName() { return this.document.getText().substring(this.document.offsetAt(this.nameRange.start), this.document.offsetAt(this.nameRange.end)); } getValue() { return this.document.getText().substring(this.document.offsetAt(this.valueRange.start), this.document.offsetAt(this.valueRange.end)); } getDirective() { const directive = main_1.Directive[this.getName().toLowerCase()]; return directive === undefined ? null : directive; } } exports.ParserDirective = ParserDirective; /***/ }), /***/ 38698: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const util_1 = __webpack_require__(98707); class Property { constructor(document, escapeChar, arg, arg2) { this.assignmentOperatorRange = null; this.assignmentOperator = null; this.valueRange = null; this.value = null; this.document = document; this.escapeChar = escapeChar; this.nameRange = Property.getNameRange(document, arg); let value = document.getText().substring(document.offsetAt(this.nameRange.start), document.offsetAt(this.nameRange.end)); this.name = Property.getValue(value, escapeChar); if (arg2) { this.valueRange = arg2.getRange(); value = document.getText().substring(document.offsetAt(this.valueRange.start), document.offsetAt(this.valueRange.end)); this.value = Property.getValue(value, escapeChar); this.range = vscode_languageserver_types_1.Range.create(this.nameRange.start, this.valueRange.end); } else { let argRange = arg.getRange(); if (this.nameRange.start.line === argRange.start.line && this.nameRange.start.character === argRange.start.character && this.nameRange.end.line === argRange.end.line && this.nameRange.end.character === argRange.end.character) { } else { this.valueRange = Property.getValueRange(document, arg); value = document.getText().substring(document.offsetAt(this.valueRange.start), document.offsetAt(this.valueRange.end)); this.value = Property.getValue(value, escapeChar); this.assignmentOperatorRange = vscode_languageserver_types_1.Range.create(this.nameRange.end, this.valueRange.start); this.assignmentOperator = "="; } this.range = argRange; } } getRange() { return this.range; } getName() { return this.name; } getNameRange() { return this.nameRange; } getValue() { return this.value; } getValueRange() { return this.valueRange; } /** * Retrieves the operator used for delimiting between the name and * value of this property. This will either be the "=" character * or null if a character was not used or if this property has no * value defined. */ getAssignmentOperator() { return this.assignmentOperator; } getAssignmentOperatorRange() { return this.assignmentOperatorRange; } /** * Returns the value of this property including any enclosing * single or double quotes and relevant escape characters. * Escaped newlines and its associated contiguous whitespace * characters however will not be returned as they are deemed to * be uninteresting to clients trying to return a Dockerfile. * * @return the unescaped value of this property or null if this * property has no associated value */ getUnescapedValue() { if (this.valueRange === null) { return null; } let escaped = false; let rawValue = ""; let value = this.document.getText().substring(this.document.offsetAt(this.valueRange.start), this.document.offsetAt(this.valueRange.end)); rawLoop: for (let i = 0; i < value.length; i++) { let char = value.charAt(i); switch (char) { case this.escapeChar: for (let j = i + 1; j < value.length; j++) { switch (value.charAt(j)) { case '\r': j++; case '\n': escaped = true; i = j; continue rawLoop; case ' ': case '\t': break; default: rawValue = rawValue + char; continue rawLoop; } } // this happens if there's only whitespace after the escape character rawValue = rawValue + char; break; case '\r': case '\n': break; case ' ': case '\t': if (!escaped) { rawValue = rawValue + char; } break; case '#': if (escaped) { for (let j = i + 1; j < value.length; j++) { switch (value.charAt(j)) { case '\r': j++; case '\n': i = j; continue rawLoop; } } } else { rawValue = rawValue + char; } break; default: rawValue = rawValue + char; escaped = false; break; } } return rawValue; } static getNameRange(document, arg) { let value = arg.getValue(); let index = value.indexOf('='); if (index !== -1) { let initial = value.charAt(0); let before = value.charAt(index - 1); // check if content before the equals sign are in quotes // "var"=value // 'var'=value // otherwise, just assume it's a standard definition // var=value if ((initial === '"' && before === '"') || (initial === '\'' && before === '\'') || (initial !== '"' && initial !== '\'')) { return vscode_languageserver_types_1.Range.create(arg.getRange().start, document.positionAt(document.offsetAt(arg.getRange().start) + index)); } } // no '=' found, just defined the property's name return arg.getRange(); } static getValueRange(document, arg) { return vscode_languageserver_types_1.Range.create(document.positionAt(document.offsetAt(arg.getRange().start) + arg.getValue().indexOf('=') + 1), document.positionAt(document.offsetAt(arg.getRange().end))); } /** * Returns the actual value of this key-value pair. The value will * have its escape characters removed if applicable. If the value * spans multiple lines and there are comments nested within the * lines, they too will be removed. * * @return the value that this key-value pair will actually be, may * be null if no value is defined, may be the empty string * if the value only consists of whitespace */ static getValue(value, escapeChar) { let escaped = false; const skip = util_1.Util.findLeadingNonWhitespace(value, escapeChar); if (skip !== 0 && value.charAt(skip) === '#') { // need to skip over comments escaped = true; } value = value.substring(skip); let first = value.charAt(0); let last = value.charAt(value.length - 1); let literal = first === '\'' || first === '"'; let inSingle = (first === '\'' && last === '\''); let inDouble = false; if (first === '"') { for (let i = 1; i < value.length; i++) { if (value.charAt(i) === escapeChar) { i++; } else if (value.charAt(i) === '"' && i === value.length - 1) { inDouble = true; } } } if (inSingle || inDouble) { value = value.substring(1, value.length - 1); } let commentCheck = -1; let escapedValue = ""; let start = 0; parseValue: for (let i = 0; i < value.length; i++) { let char = value.charAt(i); switch (char) { case escapeChar: if (i + 1 === value.length) { escapedValue = escapedValue + escapeChar; break parseValue; } char = value.charAt(i + 1); if (char === ' ' || char === '\t') { whitespaceCheck: for (let j = i + 2; j < value.length; j++) { let char2 = value.charAt(j); switch (char2) { case ' ': case '\t': break; case '\r': j++; case '\n': escaped = true; i = j; continue parseValue; default: if (!inDouble && !inSingle && !literal) { if (char2 === escapeChar) { // add the escaped character escapedValue = escapedValue + char; // now start parsing from the next escape character i = i + 1; } else { // the expectation is that this j = i + 2 here escapedValue = escapedValue + char + char2; i = j; } continue parseValue; } break whitespaceCheck; } } } if (inDouble) { if (char === '\r') { escaped = true; i = i + 2; } else if (char === '\n') { escaped = true; i++; } else if (char !== '"') { if (char === escapeChar) { i++; } escapedValue = escapedValue + escapeChar; } continue parseValue; } else if (inSingle || literal) { if (char === '\r') { escaped = true; i = i + 2; } else if (char === '\n') { escaped = true; i++; } else { escapedValue = escapedValue + escapeChar; } continue parseValue; } else if (char === escapeChar) { // double escape, append one and move on escapedValue = escapedValue + escapeChar; i++; } else if (char === '\r') { escaped = true; // offset one more for \r\n i = i + 2; } else if (char === '\n') { escaped = true; i++; start = i; } else { // any other escapes are simply ignored escapedValue = escapedValue + char; i++; } break; case ' ': case '\t': if (escaped && commentCheck === -1) { commentCheck = i; } escapedValue = escapedValue + char; break; case '\r': i++; case '\n': if (escaped && commentCheck !== -1) { // rollback and remove the whitespace that was previously appended escapedValue = escapedValue.substring(0, escapedValue.length - (i - commentCheck - 1)); commentCheck = -1; } break; case '#': // a newline was escaped and now there's a comment if (escaped) { if (commentCheck !== -1) { // rollback and remove the whitespace that was previously appended escapedValue = escapedValue.substring(0, escapedValue.length - (i - commentCheck)); commentCheck = -1; } newlineCheck: for (let j = i + 1; j < value.length; j++) { switch (value.charAt(j)) { case '\r': j++; case '\n': i = j; break newlineCheck; } } continue parseValue; } default: if (escaped) { escaped = false; commentCheck = -1; } escapedValue = escapedValue + char; break; } } return escapedValue; } } exports.Property = Property; /***/ }), /***/ 78535: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ const vscode_languageserver_types_1 = __webpack_require__(91674); const instruction_1 = __webpack_require__(99311); const property_1 = __webpack_require__(38698); const argument_1 = __webpack_require__(12447); const util_1 = __webpack_require__(98707); class PropertyInstruction extends instruction_1.Instruction { constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) { super(document, range, dockerfile, escapeChar, instruction, instructionRange); this.properties = undefined; } getProperties() { if (this.properties === undefined) { let args = this.getPropertyArguments(); if (args.length === 0) { this.properties = []; } else if (args.length === 1) { this.properties = [new property_1.Property(this.document, this.escapeChar, args[0])]; } else if (args.length === 2) { if (args[0].getValue().indexOf('=') === -1) { this.properties = [new property_1.Property(this.document, this.escapeChar, args[0], args[1])]; } else { this.properties = [ new property_1.Property(this.document, this.escapeChar, args[0]), new property_1.Property(this.document, this.escapeChar, args[1]) ]; } } else if (args[0].getValue().indexOf('=') === -1) { let text = this.document.getText(); let start = args[1].getRange().start; let end = args[args.length - 1].getRange().end; text = text.substring(this.document.offsetAt(start), this.document.offsetAt(end)); this.properties = [new property_1.Property(this.document, this.escapeChar, args[0], new argument_1.Argument(text, vscode_languageserver_types_1.Range.create(args[1].getRange().start, args[args.length - 1].getRange().end)))]; } else { this.properties = []; for (let i = 0; i < args.length; i++) { this.properties.push(new property_1.Property(this.document, this.escapeChar, args[i])); } } } return this.properties; } /** * Goes from the back of the string and returns the first * non-whitespace character that is found. If an escape character * is found with newline characters, the escape character will * not be considered a non-whitespace character and its index in * the string will not be returned. * * @param content the string to search through * @return the index in the string for the first non-whitespace * character when searching from the end of the string */ findTrailingNonWhitespace(content) { // loop back to find the first non-whitespace character let index = content.length; whitespaceCheck: for (let i = content.length - 1; i >= 0; i--) { switch (content.charAt(i)) { case ' ': case '\t': continue; case '\n': if (content.charAt(i - 1) === '\r') { i = i - 1; } case '\r': newlineCheck: for (let j = i - 1; j >= 0; j--) { switch (content.charAt(j)) { case ' ': case '\t': case '\r': case '\n': case this.escapeChar: continue; default: index = j; break newlineCheck; } } break whitespaceCheck; default: index = i; break whitespaceCheck; } } return index; } getPropertyArguments() { const args = []; let range = this.getInstructionRange(); let instructionNameEndOffset = this.document.offsetAt(range.end); let extra = instructionNameEndOffset - this.document.offsetAt(range.start); let content = this.getTextContent(); let fullArgs = content.substring(extra); let start = util_1.Util.findLeadingNonWhitespace(fullArgs, this.escapeChar); if (start === -1) { // only whitespace found, no arguments return []; } const startPosition = this.document.positionAt(instructionNameEndOffset + start); // records whether the parser has just processed an escaped newline or not, // if our starting position is not on the same line as the instruction then // the start of the content is already on an escaped line let escaped = range.start.line !== startPosition.line; // flag to track if the last character was an escape character let endingEscape = false; // position before the first escape character was hit let mark = -1; let end = this.findTrailingNonWhitespace(fullArgs); content = fullArgs.substring(start, end + 1); let argStart = escaped ? -1 : 0; let spaced = false; argumentLoop: for (let i = 0; i < content.length; i++) { let char = content.charAt(i); switch (char) { case this.escapeChar: if (i + 1 === content.length) { endingEscape = true; break argumentLoop; } if (!escaped) { mark = i; } switch (content.charAt(i + 1)) { case ' ': case '\t': if (!util_1.Util.isWhitespace(content.charAt(i + 2))) { // space was escaped, continue as normal i = i + 1; continue argumentLoop; } // whitespace encountered, need to figure out if it extends to EOL whitespaceCheck: for (let j = i + 2; j < content.length; j++) { switch (content.charAt(j)) { case '\r': // offset one more for \r\n j++; case '\n': // whitespace only, safe to skip escaped = true; i = j; continue argumentLoop; case ' ': case '\t': // ignore whitespace break; default: // whitespace doesn't extend to EOL, create an argument args.push(new argument_1.Argument(content.substring(argStart, i), vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + i + 2)))); argStart = j; break whitespaceCheck; } } // go back and start processing the encountered non-whitespace character i = argStart - 1; continue argumentLoop; case '\r': // offset one more for \r\n i++; case '\n': // immediately followed by a newline, skip the newline escaped = true; i = i + 1; continue argumentLoop; case this.escapeChar: // double escape found, skip it and move on if (argStart === -1) { argStart = i; } i = i + 1; continue argumentLoop; default: if (argStart === -1) { argStart = i; } // non-whitespace encountered, skip the escape and process the // character normally continue argumentLoop; } case '\'': case '"': if (spaced) { this.createSpacedArgument(argStart, args, content, mark, instructionNameEndOffset, start); // reset to start a new argument argStart = i; spaced = false; } if (argStart === -1) { argStart = i; } for (let j = i + 1; j < content.length; j++) { switch (content.charAt(j)) { case char: if (content.charAt(j + 1) !== ' ' && content.charAt(j + 1) !== '') { // there is more content after this quote, // continue so that it is all processed as // one single argument i = j; continue argumentLoop; } args.push(new argument_1.Argument(content.substring(argStart, j + 1), vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + j + 1)))); i = j; argStart = -1; continue argumentLoop; case this.escapeChar: j++; break; } } break argumentLoop; case ' ': case '\t': if (escaped) { // consider there to be a space only if an argument // is not spanning multiple lines if (argStart !== -1) { spaced = true; } } else if (argStart !== -1) { args.push(new argument_1.Argument(content.substring(argStart, i), vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + i)))); argStart = -1; } break; case '\r': // offset one more for \r\n i++; case '\n': spaced = false; break; case '#': if (escaped) { // a newline was escaped and now there's a comment for (let j = i + 1; j < content.length; j++) { switch (content.charAt(j)) { case '\r': j++; case '\n': i = j; spaced = false; continue argumentLoop; } } // went to the end without finding a newline, // the comment was the last line in the instruction, // just stop parsing, create an argument if needed if (argStart !== -1) { let value = content.substring(argStart, mark); args.push(new argument_1.Argument(value, vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + mark)))); argStart = -1; } break argumentLoop; } else if (argStart === -1) { argStart = i; } break; default: if (spaced) { this.createSpacedArgument(argStart, args, content, mark, instructionNameEndOffset, start); // reset to start a new argument argStart = i; spaced = false; } escaped = false; if (argStart === -1) { argStart = i; } // variable detected if (char === '$' && content.charAt(i + 1) === '{') { let singleQuotes = false; let doubleQuotes = false; let escaped = false; for (let j = i + 1; j < content.length; j++) { switch (content.charAt(j)) { case this.escapeChar: escaped = true; break; case '\r': case '\n': break; case '\'': singleQuotes = !singleQuotes; escaped = false; break; case '"': doubleQuotes = !doubleQuotes; escaped = false; break; case ' ': case '\t': if (escaped || singleQuotes || doubleQuotes) { break; } i = j - 1; continue argumentLoop; case '}': i = j; continue argumentLoop; default: escaped = false; break; } } break argumentLoop; } break; } } if (argStart !== -1 && argStart !== content.length) { let end = endingEscape ? content.length - 1 : content.length; let value = content.substring(argStart, end); args.push(new argument_1.Argument(value, vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + end)))); } return args; } createSpacedArgument(argStart, args, content, mark, instructionNameEndOffset, start) { if (argStart !== -1) { args.push(new argument_1.Argument(content.substring(argStart, mark), vscode_languageserver_types_1.Range.create(this.document.positionAt(instructionNameEndOffset + start + argStart), this.document.positionAt(instructionNameEndOffset + start + mark)))); } } } exports.PropertyInstruction = PropertyInstruction; /***/ }), /***/ 98707: /***/ ((__unused_webpack_module, exports) => { "use strict"; /* -------------------------------------------------------------------------------------------- * Copyright (c) Remy Suen. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * ------------------------------------------------------------------------------------------ */ Object.defineProperty(exports, "__esModule", ({ value: true })); class Util { static isWhitespace(char) { return char === ' ' || char === '\t' || Util.isNewline(char); } static isNewline(char) { return char === '\r' || char === '\n'; } static findLeadingNonWhitespace(content, escapeChar) { whitespaceCheck: for (let i = 0; i < content.length; i++) { switch (content.charAt(i)) { case ' ': case '\t': continue; case escapeChar: escapeCheck: for (let j = i + 1; j < content.length; j++) { switch (content.charAt(j)) { case ' ': case '\t': continue; case '\r': // offset one more for \r\n i = j + 1; continue whitespaceCheck; case '\n': i = j; continue whitespaceCheck; default: break escapeCheck; } } // found an escape character and then reached EOF return -1; default: return i; } } // only possible if the content is the empty string return -1; } /** * Determines if the given position is contained within the given range. * * @param position the position to check * @param range the range to see if the position is inside of */ static isInsideRange(position, range) { if (range.start.line === range.end.line) { return range.start.line === position.line && range.start.character <= position.character && position.character <= range.end.character; } else if (range.start.line === position.line) { return range.start.character <= position.character; } else if (range.end.line === position.line) { return position.character <= range.end.character; } return range.start.line < position.line && position.line < range.end.line; } } exports.Util = Util; /***/ }), /***/ 28155: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class Variable { constructor(name, nameRange, range, modifier, modifierRange, substitutionParameter, substitutionRange, defined, buildVariable, stringValue) { this.name = name; this.nameRange = nameRange; this.range = range; this.modifier = modifier; this.modifierRange = modifierRange; this.substitutionParameter = substitutionParameter; this.substitutionRange = substitutionRange; this.defined = defined; this.buildVariable = buildVariable; this.stringValue = stringValue; } toString() { return this.stringValue; } getName() { return this.name; } getNameRange() { return this.nameRange; } /** * Returns the range of the entire variable. This includes the symbols for * the declaration of the variable such as the $, {, and } symbols. * * @return the range in the document that this variable encompasses in its * entirety */ getRange() { return this.range; } /** * Returns the modifier character that has been set for * specifying how this variable should be expanded and resolved. * If this variable is ${variable:+value} then the modifier * character is '+'. Will be the empty string if the variable is * declared as ${variable:}. Otherwise, will be null if this * variable will not use variable substitution at all (such as * ${variable} or $variable). * * @return this variable's modifier character, or the empty * string if it does not have one, or null if this * variable will not use variable substitution */ getModifier() { return this.modifier; } getModifierRange() { return this.modifierRange; } /** * Returns the parameter that will be used for substitution if * this variable uses modifiers to define how its value should be * resolved. If this variable is ${variable:+value} then the * substitution value will be 'value'. Will be the empty string * if the variable is declared as ${variable:+} or some other * variant where the only thing that follows the modifier * character (excluding considerations of escape characters and * so on) is the variable's closing bracket. May be null if this * variable does not have a modifier character defined (such as * ${variable} or $variable). * * @return this variable's substitution parameter, or the empty * string if it does not have one, or null if there is * not one defined */ getSubstitutionParameter() { return this.substitutionParameter; } getSubstitutionRange() { return this.substitutionRange; } /** * Returns whether this variable has been defined or not. * * @return true if this variable has been defined, false otherwise */ isDefined() { return this.defined; } isBuildVariable() { return this.buildVariable === true; } isEnvironmentVariable() { return this.buildVariable === false; } } exports.Variable = Variable; /***/ }), /***/ 17364: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var invalid_user_input_error_1 = __webpack_require__(50206); exports.InvalidUserInputError = invalid_user_input_error_1.InvalidUserInputError; //# sourceMappingURL=index.js.map /***/ }), /***/ 50206: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class InvalidUserInputError extends Error { constructor(...args) { super(...args); this.code = 422; this.name = 'InvalidUserInputError'; Error.captureStackTrace(this, InvalidUserInputError); } } exports.InvalidUserInputError = InvalidUserInputError; //# sourceMappingURL=invalid-user-input-error.js.map /***/ }), /***/ 91885: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); __webpack_require__(20406); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const parsers_1 = __webpack_require__(68963); exports.DepType = parsers_1.DepType; const project_assets_json_parser_1 = __webpack_require__(41039); const errors_1 = __webpack_require__(17364); const PROJ_FILE_EXTENSIONS = [ '.csproj', '.vbproj', '.fsproj', ]; function buildDepTreeFromProjectJson(manifestFileContents, includeDev = false) { // trimming required to address files with UTF-8 with BOM encoding const manifestFile = JSON.parse(manifestFileContents.trim()); return parsers_1.getDependencyTreeFromProjectJson(manifestFile, includeDev); } exports.buildDepTreeFromProjectJson = buildDepTreeFromProjectJson; // TODO: Figure out what to do about devDeps function buildDepTreeFromProjectAssetsJson(manifestFileContents, targetFramework) { if (!targetFramework) { throw new Error('Missing targetFramework for project.assets.json'); } // trimming required to address files with UTF-8 with BOM encoding const manifestFile = JSON.parse(manifestFileContents.trim()); return project_assets_json_parser_1.getDependencyTreeFromProjectAssetsJson(manifestFile, targetFramework); } exports.buildDepTreeFromProjectAssetsJson = buildDepTreeFromProjectAssetsJson; async function buildDepTreeFromPackagesConfig(manifestFileContents, includeDev = false) { const manifestFile = await parsers_1.parseXmlFile(manifestFileContents); return parsers_1.getDependencyTreeFromPackagesConfig(manifestFile, includeDev); } exports.buildDepTreeFromPackagesConfig = buildDepTreeFromPackagesConfig; async function buildDepTreeFromProjectFile(manifestFileContents, includeDev = false, propsMap = {}) { const manifestFile = await parsers_1.parseXmlFile(manifestFileContents); return parsers_1.getDependencyTreeFromProjectFile(manifestFile, includeDev, propsMap); } exports.buildDepTreeFromProjectFile = buildDepTreeFromProjectFile; function buildDepTreeFromFiles(root, manifestFilePath, includeDev = false, targetFramework) { if (!root || !manifestFilePath) { throw new Error('Missing required parameters for buildDepTreeFromFiles()'); } const manifestFileFullPath = path.resolve(root, manifestFilePath); if (!fs.existsSync(manifestFileFullPath)) { throw new Error('No packages.config, project.json or project file found at ' + `location: ${manifestFileFullPath}`); } const manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8'); const manifestFileExtension = path.extname(manifestFileFullPath); if (PROJ_FILE_EXTENSIONS.includes(manifestFileExtension)) { return buildDepTreeFromProjectFile(manifestFileContents, includeDev); } else if (manifestFilePath.endsWith('packages.config')) { return buildDepTreeFromPackagesConfig(manifestFileContents, includeDev); } else if (manifestFilePath.endsWith('project.json')) { return buildDepTreeFromProjectJson(manifestFileContents, includeDev); } else if (manifestFilePath.endsWith('project.assets.json')) { return buildDepTreeFromProjectAssetsJson(manifestFileContents, targetFramework); } else { throw new Error(`Unsupported file ${manifestFilePath}, Please provide ` + 'either packages.config or project file.'); } } exports.buildDepTreeFromFiles = buildDepTreeFromFiles; function extractTargetFrameworksFromFiles(root, manifestFilePath, includeDev = false) { if (!root || !manifestFilePath) { throw new Error('Missing required parameters for extractTargetFrameworksFromFiles()'); } const manifestFileFullPath = path.resolve(root, manifestFilePath); if (!fs.existsSync(manifestFileFullPath)) { throw new Error('No project file found at ' + `location: ${manifestFileFullPath}`); } const manifestFileContents = fs.readFileSync(manifestFileFullPath, 'utf-8'); const manifestFileExtension = path.extname(manifestFileFullPath); if (PROJ_FILE_EXTENSIONS.includes(manifestFileExtension)) { return extractTargetFrameworksFromProjectFile(manifestFileContents); } else if (manifestFilePath.endsWith('packages.config')) { return extractTargetFrameworksFromProjectConfig(manifestFileContents); } else if (manifestFilePath.endsWith('project.json')) { return extractTargetFrameworksFromProjectJson(manifestFileContents); } else if (manifestFilePath.endsWith('project.assets.json')) { return extractTargetFrameworksFromProjectAssetsJson(manifestFileContents); } else { throw new Error(`Unsupported file ${manifestFilePath}, Please provide ` + 'a project *.csproj, *.vbproj, *.fsproj or packages.config file.'); } } exports.extractTargetFrameworksFromFiles = extractTargetFrameworksFromFiles; async function extractTargetFrameworksFromProjectFile(manifestFileContents) { try { const manifestFile = await parsers_1.parseXmlFile(manifestFileContents); return parsers_1.getTargetFrameworksFromProjectFile(manifestFile); } catch (err) { throw new Error(`Extracting target framework failed with error ${err.message}`); } } exports.extractTargetFrameworksFromProjectFile = extractTargetFrameworksFromProjectFile; async function extractTargetFrameworksFromProjectConfig(manifestFileContents) { try { const manifestFile = await parsers_1.parseXmlFile(manifestFileContents); return parsers_1.getTargetFrameworksFromProjectConfig(manifestFile); } catch (err) { throw new Error(`Extracting target framework failed with error ${err.message}`); } } exports.extractTargetFrameworksFromProjectConfig = extractTargetFrameworksFromProjectConfig; async function containsPackageReference(manifestFileContents) { var _a, _b, _c; const manifestFile = await parsers_1.parseXmlFile(manifestFileContents); const projectItems = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.ItemGroup, (_c !== null && _c !== void 0 ? _c : [])); const referenceIndex = projectItems .findIndex((itemGroup) => typeof itemGroup === 'object' && 'PackageReference' in itemGroup); return referenceIndex !== -1; } exports.containsPackageReference = containsPackageReference; async function extractTargetFrameworksFromProjectJson(manifestFileContents) { try { // trimming required to address files with UTF-8 with BOM encoding const manifestFile = JSON.parse(manifestFileContents.trim()); return parsers_1.getTargetFrameworksFromProjectJson(manifestFile); } catch (err) { throw new Error(`Extracting target framework failed with error ${err.message}`); } } exports.extractTargetFrameworksFromProjectJson = extractTargetFrameworksFromProjectJson; async function extractTargetFrameworksFromProjectAssetsJson(manifestFileContents) { try { // trimming required to address files with UTF-8 with BOM encoding const manifestFile = JSON.parse(manifestFileContents.trim()); return parsers_1.getTargetFrameworksFromProjectAssetsJson(manifestFile); } catch (err) { throw new Error(`Extracting target framework failed with error ${err.message}`); } } exports.extractTargetFrameworksFromProjectAssetsJson = extractTargetFrameworksFromProjectAssetsJson; async function extractProps(propsFileContents) { try { const propsFile = await parsers_1.parseXmlFile(propsFileContents); if (!propsFile) { throw new errors_1.InvalidUserInputError('xml file parsing failed'); } return parsers_1.getPropertiesMap(propsFile); } catch (err) { if (err.name === 'InvalidUserInputError') { throw err; } throw new Error(`Extracting props failed with error ${err.message}`); } } exports.extractProps = extractProps; //# sourceMappingURL=index.js.map /***/ }), /***/ 68963: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const parseXML = __webpack_require__(5055); const _isEmpty = __webpack_require__(99245); const _set = __webpack_require__(31468); const _uniq = __webpack_require__(97644); const errors_1 = __webpack_require__(17364); var DepType; (function (DepType) { DepType["prod"] = "prod"; DepType["dev"] = "dev"; })(DepType = exports.DepType || (exports.DepType = {})); var ProjectJsonDepType; (function (ProjectJsonDepType) { ProjectJsonDepType["build"] = "build"; ProjectJsonDepType["project"] = "project"; ProjectJsonDepType["platform"] = "platform"; ProjectJsonDepType["default"] = "default"; })(ProjectJsonDepType = exports.ProjectJsonDepType || (exports.ProjectJsonDepType = {})); function getDependencyTreeFromProjectJson(manifestFile, includeDev = false) { const depTree = { dependencies: {}, hasDevDependencies: false, name: '', version: '', }; for (const depName in manifestFile.dependencies) { if (!manifestFile.dependencies.hasOwnProperty(depName)) { continue; } const depValue = manifestFile.dependencies[depName]; const version = depValue.version || depValue; const isDev = depValue.type === 'build'; depTree.hasDevDependencies = depTree.hasDevDependencies || isDev; if (isDev && !includeDev) { continue; } depTree.dependencies[depName] = buildSubTreeFromProjectJson(depName, version, isDev); } return depTree; } exports.getDependencyTreeFromProjectJson = getDependencyTreeFromProjectJson; function buildSubTreeFromProjectJson(name, version, isDev) { const depSubTree = { depType: isDev ? DepType.dev : DepType.prod, dependencies: {}, name, version, }; return depSubTree; } async function getDependencyTreeFromPackagesConfig(manifestFile, includeDev = false) { var _a, _b, _c; const depTree = { dependencies: {}, hasDevDependencies: false, name: '', version: '', }; const packageList = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.packages) === null || _b === void 0 ? void 0 : _b.package, (_c !== null && _c !== void 0 ? _c : [])); for (const dep of packageList) { const depName = dep.$.id; const isDev = !!dep.$.developmentDependency; depTree.hasDevDependencies = depTree.hasDevDependencies || isDev; if (isDev && !includeDev) { continue; } depTree.dependencies[depName] = buildSubTreeFromPackagesConfig(dep, isDev); } return depTree; } exports.getDependencyTreeFromPackagesConfig = getDependencyTreeFromPackagesConfig; function buildSubTreeFromPackagesConfig(dep, isDev) { const depSubTree = { depType: isDev ? DepType.dev : DepType.prod, dependencies: {}, name: dep.$.id, version: dep.$.version, }; if (dep.$.targetFramework) { depSubTree.targetFrameworks = [dep.$.targetFramework]; } return depSubTree; } async function getDependencyTreeFromProjectFile(manifestFile, includeDev = false, propsMap = {}) { var _a, _b, _c, _d, _e; const nameProperty = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.PropertyGroup, (_c !== null && _c !== void 0 ? _c : [])) .find((propertyGroup) => { return 'PackageId' in propertyGroup || 'AssemblyName' in propertyGroup; }) || {}; const name = ((_d = nameProperty.PackageId) === null || _d === void 0 ? void 0 : _d[0]) || ((_e = nameProperty.AssemblyName) === null || _e === void 0 ? void 0 : _e[0]) || ''; const packageReferenceDeps = await getDependenciesFromPackageReference(manifestFile, includeDev, propsMap); const referenceIncludeDeps = await getDependenciesFromReferenceInclude(manifestFile, includeDev, propsMap); // order matters, the order deps are parsed in needs to be preserved and first seen kept // so applying the packageReferenceDeps last to override the second parsed const depTree = { dependencies: Object.assign(Object.assign({}, referenceIncludeDeps.dependencies), packageReferenceDeps.dependencies), hasDevDependencies: packageReferenceDeps.hasDevDependencies || referenceIncludeDeps.hasDevDependencies, name, version: '', }; if (packageReferenceDeps.dependenciesWithUnknownVersions) { depTree.dependenciesWithUnknownVersions = packageReferenceDeps.dependenciesWithUnknownVersions; } if (referenceIncludeDeps.dependenciesWithUnknownVersions) { depTree.dependenciesWithUnknownVersions = referenceIncludeDeps.dependenciesWithUnknownVersions; } return depTree; } exports.getDependencyTreeFromProjectFile = getDependencyTreeFromProjectFile; async function getDependenciesFromPackageReference(manifestFile, includeDev = false, propsMap) { var _a, _b, _c; let dependenciesResult = { dependencies: {}, hasDevDependencies: false, }; const packageGroups = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.ItemGroup, (_c !== null && _c !== void 0 ? _c : [])) .filter((itemGroup) => typeof itemGroup === 'object' && 'PackageReference' in itemGroup); if (!packageGroups.length) { return dependenciesResult; } for (const packageList of packageGroups) { dependenciesResult = processItemGroupForPackageReference(packageList, manifestFile, includeDev, dependenciesResult, propsMap); } return dependenciesResult; } function processItemGroupForPackageReference(packageList, manifestFile, includeDev, dependenciesResult, propsMap) { var _a, _b, _c; const targetFrameworks = (_c = (_b = (_a = packageList) === null || _a === void 0 ? void 0 : _a.$) === null || _b === void 0 ? void 0 : _b.Condition, (_c !== null && _c !== void 0 ? _c : false)) ? getConditionalFrameworks(packageList.$.Condition) : []; for (const dep of packageList.PackageReference) { const depName = dep.$.Include; if (!depName) { // PackageReference Update is not yet supported continue; } const isDev = !!dep.$.developmentDependency; dependenciesResult.hasDevDependencies = dependenciesResult.hasDevDependencies || isDev; if (isDev && !includeDev) { continue; } const subDep = buildSubTreeFromPackageReference(dep, isDev, manifestFile, targetFrameworks, propsMap); if (subDep.withoutVersion) { dependenciesResult.dependenciesWithUnknownVersions = dependenciesResult.dependenciesWithUnknownVersions || []; dependenciesResult.dependenciesWithUnknownVersions.push(subDep.name); } else { dependenciesResult.dependencies[depName] = subDep; } } return dependenciesResult; } // TODO: almost same as getDependenciesFromPackageReference async function getDependenciesFromReferenceInclude(manifestFile, includeDev = false, propsMap) { var _a, _b, _c; let referenceIncludeResult = { dependencies: {}, hasDevDependencies: false, }; const referenceIncludeList = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.ItemGroup, (_c !== null && _c !== void 0 ? _c : [])) .find((itemGroup) => typeof itemGroup === 'object' && 'Reference' in itemGroup); if (!referenceIncludeList) { return referenceIncludeResult; } referenceIncludeResult = processItemGroupForReferenceInclude(referenceIncludeList, manifestFile, includeDev, referenceIncludeResult, propsMap); return referenceIncludeResult; } function processItemGroupForReferenceInclude(packageList, manifestFile, includeDev, dependenciesResult, propsMap) { var _a, _b, _c; const targetFrameworks = (_c = (_b = (_a = packageList) === null || _a === void 0 ? void 0 : _a.$) === null || _b === void 0 ? void 0 : _b.Condition, (_c !== null && _c !== void 0 ? _c : false)) ? getConditionalFrameworks(packageList.$.Condition) : []; for (const item of packageList.Reference) { const propertiesList = item.$.Include.split(',').map((i) => i.trim()); const [depName, ...depInfoArray] = propertiesList; const depInfo = {}; if (!depName) { continue; } // TODO: identify dev deps @lili const isDev = false; dependenciesResult.hasDevDependencies = dependenciesResult.hasDevDependencies || isDev; if (isDev && !includeDev) { continue; } for (const itemValue of depInfoArray) { const propertyValuePair = itemValue.split('='); depInfo[propertyValuePair[0]] = propertyValuePair[1]; } depInfo.name = depName; const subDep = buildSubTreeFromReferenceInclude(depInfo, isDev, manifestFile, targetFrameworks, propsMap); if (subDep.withoutVersion) { dependenciesResult.dependenciesWithUnknownVersions = dependenciesResult.dependenciesWithUnknownVersions || []; dependenciesResult.dependenciesWithUnknownVersions.push(subDep.name); } else { dependenciesResult.dependencies[depName] = subDep; } } return dependenciesResult; } function buildSubTreeFromReferenceInclude(dep, isDev, manifestFile, targetFrameworks, propsMap) { const version = extractDependencyVersion(dep, manifestFile, propsMap) || ''; if (!_isEmpty(version)) { const depSubTree = { depType: isDev ? DepType.dev : DepType.prod, dependencies: {}, name: dep.name, // Version could be in attributes or as child node. version, }; if (targetFrameworks.length) { depSubTree.targetFrameworks = targetFrameworks; } return depSubTree; } else { return { name: dep.name, withoutVersion: true }; } } function buildSubTreeFromPackageReference(dep, isDev, manifestFile, targetFrameworks, propsMap) { const version = extractDependencyVersion(dep, manifestFile, propsMap) || ''; if (!_isEmpty(version)) { const depSubTree = { depType: isDev ? DepType.dev : DepType.prod, dependencies: {}, name: dep.$.Include, // Version could be in attributes or as child node. version, }; if (targetFrameworks.length) { depSubTree.targetFrameworks = targetFrameworks; } return depSubTree; } else { return { name: dep.$.Include, withoutVersion: true }; } } function extractDependencyVersion(dep, manifestFile, propsMap) { var _a, _b, _c, _d, _e; const VARS_MATCHER = /^\$\((.*?)\)/; let version = ((_b = (_a = dep) === null || _a === void 0 ? void 0 : _a.$) === null || _b === void 0 ? void 0 : _b.Version) || ((_c = dep) === null || _c === void 0 ? void 0 : _c.Version); if (Array.isArray(version)) { version = version[0]; } const variableVersion = version && version.match(VARS_MATCHER); if (!variableVersion) { return version; } // version is a variable, extract it from manifest or props lookup const propertyName = variableVersion[1]; const propertyMap = Object.assign(Object.assign({}, propsMap), getPropertiesMap(manifestFile)); return _e = (_d = propertyMap) === null || _d === void 0 ? void 0 : _d[propertyName], (_e !== null && _e !== void 0 ? _e : null); } function getConditionalFrameworks(condition) { const regexp = /\(TargetFramework\)'\s?==\s? '((\w|\d|\.)*)'/g; const frameworks = []; let match = regexp.exec(condition); while (match !== null) { frameworks.push(match[1]); match = regexp.exec(condition); } return frameworks; } async function parseXmlFile(manifestFileContents) { return new Promise((resolve, reject) => { parseXML .parseString(manifestFileContents, (err, result) => { if (err) { const e = new errors_1.InvalidUserInputError('xml file parsing failed'); return reject(e); } return resolve(result); }); }); } exports.parseXmlFile = parseXmlFile; function getPropertiesMap(propsContents) { var _a, _b, _c; const projectPropertyGroup = (_c = (_b = (_a = propsContents) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.PropertyGroup, (_c !== null && _c !== void 0 ? _c : [])); const props = {}; if (!projectPropertyGroup.length) { return props; } for (const group of projectPropertyGroup) { for (const key of Object.keys(group)) { _set(props, key, group[key][0]); } } return props; } exports.getPropertiesMap = getPropertiesMap; function getTargetFrameworksFromProjectFile(manifestFile) { var _a, _b, _c; let targetFrameworksResult = []; const projectPropertyGroup = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.Project) === null || _b === void 0 ? void 0 : _b.PropertyGroup, (_c !== null && _c !== void 0 ? _c : [])); if (!projectPropertyGroup) { return targetFrameworksResult; } const propertyList = projectPropertyGroup .find((propertyGroup) => { return 'TargetFramework' in propertyGroup || 'TargetFrameworks' in propertyGroup || 'TargetFrameworkVersion' in propertyGroup; }) || {}; if (_isEmpty(propertyList)) { return targetFrameworksResult; } // TargetFrameworks is expected to be a list ; separated if (propertyList.TargetFrameworks) { for (const item of propertyList.TargetFrameworks) { targetFrameworksResult = [...targetFrameworksResult, ...item.split(';').filter((x) => !_isEmpty(x))]; } } // TargetFrameworkVersion is expected to be a string containing only one item // TargetFrameworkVersion also implies .NETFramework, for convenience // return longer version if (propertyList.TargetFrameworkVersion) { targetFrameworksResult.push(`.NETFramework,Version=${propertyList.TargetFrameworkVersion[0]}`); } // TargetFrameworks is expected to be a string if (propertyList.TargetFramework) { targetFrameworksResult = [...targetFrameworksResult, ...propertyList.TargetFramework]; } return _uniq(targetFrameworksResult); } exports.getTargetFrameworksFromProjectFile = getTargetFrameworksFromProjectFile; function getTargetFrameworksFromProjectConfig(manifestFile) { var _a, _b, _c; const targetFrameworksResult = []; const packages = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.packages) === null || _b === void 0 ? void 0 : _b.package, (_c !== null && _c !== void 0 ? _c : [])); for (const item of packages) { const targetFramework = item.$.targetFramework; if (!targetFramework) { continue; } if (!targetFrameworksResult.includes(targetFramework)) { targetFrameworksResult.push(targetFramework); } } return targetFrameworksResult; } exports.getTargetFrameworksFromProjectConfig = getTargetFrameworksFromProjectConfig; function getTargetFrameworksFromProjectJson(manifestFile) { var _a, _b; return Object.keys((_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.frameworks, (_b !== null && _b !== void 0 ? _b : {}))); } exports.getTargetFrameworksFromProjectJson = getTargetFrameworksFromProjectJson; function getTargetFrameworksFromProjectAssetsJson(manifestFile) { var _a, _b; return Object.keys((_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.targets, (_b !== null && _b !== void 0 ? _b : {}))); } exports.getTargetFrameworksFromProjectAssetsJson = getTargetFrameworksFromProjectAssetsJson; //# sourceMappingURL=index.js.map /***/ }), /***/ 41039: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); function getProjectNameForProjectAssetsJson(manifestFile) { var _a, _b, _c, _d; return _d = (_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.project) === null || _b === void 0 ? void 0 : _b.restore) === null || _c === void 0 ? void 0 : _c.projectName, (_d !== null && _d !== void 0 ? _d : {}); } function getProjectVersionForProjectAssetsJson(manifestFile) { var _a, _b, _c; return _c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.project) === null || _b === void 0 ? void 0 : _b.version, (_c !== null && _c !== void 0 ? _c : {}); } function buildPackageTree(name, version) { const depTree = { dependencies: {}, name, version, }; return depTree; } // Currently the function getDependencyTreeFromProjectAssetsJson returns // a two level deep flat list of 100% of dependencies. // TODO: Get full tree function getDependencyTreeFromProjectAssetsJson(manifestFile, targetFrameWork) { var _a, _b, _c, _d, _e, _f, _g, _h; const projectName = getProjectNameForProjectAssetsJson(manifestFile); const projectVersion = getProjectVersionForProjectAssetsJson(manifestFile); const depTree = buildPackageTree(projectName, projectVersion); const topLevelDeps = Object.keys((_c = (_b = (_a = manifestFile) === null || _a === void 0 ? void 0 : _a.targets) === null || _b === void 0 ? void 0 : _b[targetFrameWork], (_c !== null && _c !== void 0 ? _c : {}))); for (const topLevelDep of topLevelDeps) { const [topLevelDepName, topLevelDepVersion] = topLevelDep.split('/'); const topLevelDepTree = buildPackageTree(topLevelDepName, topLevelDepVersion); const transitiveDeps = (_h = (_g = (_f = (_e = (_d = manifestFile) === null || _d === void 0 ? void 0 : _d.targets) === null || _e === void 0 ? void 0 : _e[targetFrameWork]) === null || _f === void 0 ? void 0 : _f[topLevelDep]) === null || _g === void 0 ? void 0 : _g.dependencies, (_h !== null && _h !== void 0 ? _h : {})); for (const transitiveDep of Object.keys(transitiveDeps)) { const transitiveDepVersion = transitiveDeps[transitiveDep]; const transitiveDepTree = buildPackageTree(transitiveDep, transitiveDepVersion); topLevelDepTree.dependencies[transitiveDep] = transitiveDepTree; } depTree.dependencies[topLevelDepName] = topLevelDepTree; } return depTree; } exports.getDependencyTreeFromProjectAssetsJson = getDependencyTreeFromProjectAssetsJson; //# sourceMappingURL=project-assets-json-parser.js.map /***/ }), /***/ 25981: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var stream = __webpack_require__(79349) var eos = __webpack_require__(12840) var inherits = __webpack_require__(94378) var shift = __webpack_require__(31852) var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) ? Buffer.from([0]) : new Buffer([0]) var onuncork = function(self, fn) { if (self._corked) self.once('uncork', fn) else fn() } var autoDestroy = function (self, err) { if (self._autoDestroy) self.destroy(err) } var destroyer = function(self, end) { return function(err) { if (err) autoDestroy(self, err.message === 'premature close' ? null : err) else if (end && !self._ended) self.end() } } var end = function(ws, fn) { if (!ws) return fn() if (ws._writableState && ws._writableState.finished) return fn() if (ws._writableState) return ws.end(fn) ws.end() fn() } var toStreams2 = function(rs) { return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) } var Duplexify = function(writable, readable, opts) { if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) stream.Duplex.call(this, opts) this._writable = null this._readable = null this._readable2 = null this._autoDestroy = !opts || opts.autoDestroy !== false this._forwardDestroy = !opts || opts.destroy !== false this._forwardEnd = !opts || opts.end !== false this._corked = 1 // start corked this._ondrain = null this._drained = false this._forwarding = false this._unwrite = null this._unread = null this._ended = false this.destroyed = false if (writable) this.setWritable(writable) if (readable) this.setReadable(readable) } inherits(Duplexify, stream.Duplex) Duplexify.obj = function(writable, readable, opts) { if (!opts) opts = {} opts.objectMode = true opts.highWaterMark = 16 return new Duplexify(writable, readable, opts) } Duplexify.prototype.cork = function() { if (++this._corked === 1) this.emit('cork') } Duplexify.prototype.uncork = function() { if (this._corked && --this._corked === 0) this.emit('uncork') } Duplexify.prototype.setWritable = function(writable) { if (this._unwrite) this._unwrite() if (this.destroyed) { if (writable && writable.destroy) writable.destroy() return } if (writable === null || writable === false) { this.end() return } var self = this var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) var ondrain = function() { var ondrain = self._ondrain self._ondrain = null if (ondrain) ondrain() } var clear = function() { self._writable.removeListener('drain', ondrain) unend() } if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks this._writable = writable this._writable.on('drain', ondrain) this._unwrite = clear this.uncork() // always uncork setWritable } Duplexify.prototype.setReadable = function(readable) { if (this._unread) this._unread() if (this.destroyed) { if (readable && readable.destroy) readable.destroy() return } if (readable === null || readable === false) { this.push(null) this.resume() return } var self = this var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) var onreadable = function() { self._forward() } var onend = function() { self.push(null) } var clear = function() { self._readable2.removeListener('readable', onreadable) self._readable2.removeListener('end', onend) unend() } this._drained = true this._readable = readable this._readable2 = readable._readableState ? readable : toStreams2(readable) this._readable2.on('readable', onreadable) this._readable2.on('end', onend) this._unread = clear this._forward() } Duplexify.prototype._read = function() { this._drained = true this._forward() } Duplexify.prototype._forward = function() { if (this._forwarding || !this._readable2 || !this._drained) return this._forwarding = true var data while (this._drained && (data = shift(this._readable2)) !== null) { if (this.destroyed) continue this._drained = this.push(data) } this._forwarding = false } Duplexify.prototype.destroy = function(err) { if (this.destroyed) return this.destroyed = true var self = this process.nextTick(function() { self._destroy(err) }) } Duplexify.prototype._destroy = function(err) { if (err) { var ondrain = this._ondrain this._ondrain = null if (ondrain) ondrain(err) else this.emit('error', err) } if (this._forwardDestroy) { if (this._readable && this._readable.destroy) this._readable.destroy() if (this._writable && this._writable.destroy) this._writable.destroy() } this.emit('close') } Duplexify.prototype._write = function(data, enc, cb) { if (this.destroyed) return cb() if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) if (data === SIGNAL_FLUSH) return this._finish(cb) if (!this._writable) return cb() if (this._writable.write(data) === false) this._ondrain = cb else cb() } Duplexify.prototype._finish = function(cb) { var self = this this.emit('preend') onuncork(this, function() { end(self._forwardEnd && self._writable, function() { // haxx to not emit prefinish twice if (self._writableState.prefinished === false) self._writableState.prefinished = true self.emit('prefinish') onuncork(self, cb) }) }) } Duplexify.prototype.end = function(data, enc, cb) { if (typeof data === 'function') return this.end(null, null, data) if (typeof enc === 'function') return this.end(data, null, enc) this._ended = true if (data) this.write(data) if (!this._writableState.ending) this.write(SIGNAL_FLUSH) return stream.Writable.prototype.end.call(this, cb) } module.exports = Duplexify /***/ }), /***/ 64191: /***/ ((module) => { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /***/ 15227: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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. /**/ var pna = __webpack_require__(88212); /**/ /**/ var objectKeys = Object.keys || function (obj) { var keys = []; for (var key in obj) { keys.push(key); }return keys; }; /**/ module.exports = Duplex; /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ var Readable = __webpack_require__(1372); var Writable = __webpack_require__(89083); 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); }; /***/ }), /***/ 95688: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(34670); /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ 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); }; /***/ }), /***/ 1372: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 pna = __webpack_require__(88212); /**/ module.exports = Readable; /**/ var isArray = __webpack_require__(64191); /**/ /**/ var Duplex; /**/ Readable.ReadableState = ReadableState; /**/ var EE = __webpack_require__(28614).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; }; /**/ /**/ var Stream = __webpack_require__(73754); /**/ /**/ var Buffer = __webpack_require__(89509).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } /**/ /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ /**/ var debugUtil = __webpack_require__(31669); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); } else { debug = function () {}; } /**/ var BufferList = __webpack_require__(26528); var destroyImpl = __webpack_require__(35296); 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 || __webpack_require__(15227); 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 = __webpack_require__(71785)/* .StringDecoder */ .s; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { Duplex = Duplex || __webpack_require__(15227); 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 = __webpack_require__(71785)/* .StringDecoder */ .s; 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; } /***/ }), /***/ 34670: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(15227); /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ 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); } /***/ }), /***/ 89083: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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. /**/ var pna = __webpack_require__(88212); /**/ module.exports = Writable; /* */ 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); }; } /* */ /**/ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; /**/ /**/ var Duplex; /**/ Writable.WritableState = WritableState; /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ /**/ var internalUtil = { deprecate: __webpack_require__(41159) }; /**/ /**/ var Stream = __webpack_require__(73754); /**/ /**/ var Buffer = __webpack_require__(89509).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } /**/ var destroyImpl = __webpack_require__(35296); util.inherits(Writable, Stream); function nop() {} function WritableState(options, stream) { Duplex = Duplex || __webpack_require__(15227); 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 || __webpack_require__(15227); // 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) { /**/ asyncWrite(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; 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); }; /***/ }), /***/ 26528: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Buffer = __webpack_require__(89509).Buffer; var util = __webpack_require__(31669); 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; }; } /***/ }), /***/ 35296: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /**/ var pna = __webpack_require__(88212); /**/ // 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 }; /***/ }), /***/ 73754: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(92413); /***/ }), /***/ 79349: /***/ ((module, exports, __webpack_require__) => { var Stream = __webpack_require__(92413); 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 = __webpack_require__(1372); exports.Stream = Stream || exports; exports.Readable = exports; exports.Writable = __webpack_require__(89083); exports.Duplex = __webpack_require__(15227); exports.Transform = __webpack_require__(34670); exports.PassThrough = __webpack_require__(95688); } /***/ }), /***/ 71785: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(89509).Buffer; /**/ 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.s = 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) : ''; } /***/ }), /***/ 18: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var elfy = exports; elfy.constants = __webpack_require__(36600); elfy.Parser = __webpack_require__(29154); elfy.parse = function parse(buf) { return new elfy.Parser().execute(buf); }; /***/ }), /***/ 36600: /***/ ((__unused_webpack_module, exports) => { var constants = exports; constants.class = { 0: 'none', 1: '32', 2: '64', 3: 'num' }; constants.endian = { 0: 'none', 1: 'lsb', 2: 'msb', 3: 'num' }; constants.version = { 0: 'none', 1: 'current', 2: 'num' }; constants.osabi = { 0: 'sysv', 1: 'hpux', 2: 'netbsd', 3: 'linux', 4: 'unknown4', 5: 'unknown5', 6: 'solaris', 7: 'aix', 8: 'irix', 9: 'freebsd', 10: 'tru64', 11: 'modesto', 12: 'openbsd', 13: 'openvms', 14: 'nsk', 15: 'aros', 97: 'arm', 255: 'standalone' }; constants.abiversion = { 0: 'none', 1: 'current', 2: 'num' }; constants.machine = { 0: 'none', 1: 'm32', 2: 'sparc', 3: '386', 4: '68k', 5: '88k', 6: '486', 7: '860', 8: 'mips', 9: 's370', 10: 'mips_rs3_le', 11: 'rs6000', 12: 'unknown12', 13: 'unknown13', 14: 'unknown14', 15: 'pa_risc', 16: 'ncube', 17: 'vpp500', 18: 'sparc32plus', 19: '960', 20: 'ppc', 21: 'ppc64', 22: 's390', 23: 'unknown23', 24: 'unknown24', 25: 'unknown25', 26: 'unknown26', 27: 'unknown27', 28: 'unknown28', 29: 'unknown29', 30: 'unknown30', 31: 'unknown31', 32: 'unknown32', 33: 'unknown33', 34: 'unknown34', 35: 'unknown35', 36: 'v800', 37: 'fr20', 38: 'rh32', 39: 'rce', 40: 'arm', 41: 'alpha', 42: 'sh', 43: 'sparcv9', 44: 'tricore', 45: 'arc', 46: 'h8_300', 47: 'h8_300h', 48: 'h8s', 49: 'h8_500', 50: 'ia_64', 51: 'mips_x', 52: 'coldfire', 53: '68hc12', 54: 'mma', 55: 'pcp', 56: 'ncpu', 57: 'ndr1', 58: 'starcore', 59: 'me16', 60: 'st100', 61: 'tinyj', 62: 'amd64', 63: 'pdsp', 64: 'unknown64', 65: 'unknown65', 66: 'fx66', 67: 'st9plus', 68: 'st7', 69: '68hc16', 70: '68hc11', 71: '68hc08', 72: '68hc05', 73: 'svx', 74: 'st19', 75: 'vax', 76: 'cris', 77: 'javelin', 78: 'firepath', 79: 'zsp', 80: 'mmix', 81: 'huany', 82: 'prism', 83: 'avr', 84: 'fr30', 85: 'd10v', 86: 'd30v', 87: 'v850', 88: 'm32r', 89: 'mn10300', 90: 'mn10200', 91: 'pj', 92: 'openrisc', 93: 'arc_a5', 94: 'xtensa', 95: 'num', 183: 'AArch64' }; constants.type = { 0: 'none', 1: 'rel', 2: 'exec', 3: 'dyn', 4: 'core', 5: 'num' }; constants.entryType = { 0: 'null', 1: 'load', 2: 'dynamic', 3: 'interp', 4: 'note', 5: 'shlib', 6: 'phdr', 7: 'tls', 0x6464e550: 'sunw_unwind', 0x6474e550: 'sunw_eh_frame', 0x6474e551: 'gnu_stack', 0x6474e552: 'gnu_relro', 0x6ffffffa: 'losunw', 0x6ffffffa: 'sunwbss', 0x6ffffffb: 'sunwstack', 0x6ffffffc: 'sunwdtrace', 0x6ffffffd: 'sunwcap' }; constants.entryFlags = { 4: 'r', 2: 'w', 1: 'x', 0x00100000: 'sunw_failure', 0x00200000: 'sunw_killed', 0x00400000: 'sunw_siginfo' }; constants.sectType = { 0: 'undef', 0: 'null', 1: 'progbits', 2: 'symtab', 3: 'strtab', 4: 'rela', 5: 'hash', 6: 'dynamic', 7: 'note', 8: 'nobits', 9: 'rel', 10: 'shlib', 11: 'dynsym', 12: 'unknown12', 13: 'unknown13', 14: 'init_array', 15: 'fini_array', 16: 'preinit_array', 17: 'group', 18: 'symtab_shndx', 19: 'num', 0x60000000: 'loos', 0x6fffffef: 'sunw_capchain', 0x6ffffff0: 'sunw_capinfo', 0x6ffffff1: 'sunw_symsort', 0x6ffffff2: 'sunw_tlssort', 0x6ffffff3: 'sunw_ldynsym', 0x6ffffff4: 'sunw_dof', 0x6ffffff5: 'sunw_cap', 0x6ffffff6: 'sunw_signature', 0x6ffffff7: 'sunw_annotate', 0x6ffffff8: 'sunw_debugstr', 0x6ffffff9: 'sunw_debug', 0x6ffffffa: 'sunw_move', 0x6ffffffb: 'sunw_comdat', 0x6ffffffc: 'sunw_syminfo', 0x6ffffffd: 'sunw_verdef', 0x6ffffffe: 'sunw_verneed', 0x6fffffff: 'sunw_versym', 0x6fffffff: 'hisunw', 0x6fffffff: 'hios', 0x6ffffff5: 'gnu_attributes', 0x6ffffff6: 'gnu_hash', 0x6ffffff7: 'gnu_liblist', 0x6ffffff8: 'checksum' }; constants.sectFlags = { 0x01: 'write', 0x02: 'alloc', 0x04: 'execinstr', 0x10: 'merge', 0x20: 'strings', 0x40: 'info_link', 0x80: 'link_order', 0x100: 'os_nonconforming', 0x200: 'group', 0x400: 'tls' }; /***/ }), /***/ 29154: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var assert = __webpack_require__(42357); var util = __webpack_require__(31669); var Reader = __webpack_require__(97784); var elfy = __webpack_require__(18); var constants = elfy.constants; function Parser() { Reader.call(this); } util.inherits(Parser, Reader); module.exports = Parser; Parser.prototype.mapFlags = function mapFlags(value, map) { var res = {}; for (var bit = 1; (value < 0 || bit <= value) && bit !== 0; bit <<= 1) if (value & bit) res[map[bit] || bit] = true; return res; }; Parser.prototype.execute = function execute(buf) { if (buf.length < 16) throw new Error('Not enough bytes to parse ident'); var magic = buf.slice(0, 4).toString(); if (magic !== '\x7fELF') throw new Error('Invalid magic: ' + magic); var header = this.parseHeader(buf); header.body = this.parseBody(buf, header); header.body = this.resolveBody(header.body, header); return header; }; Parser.prototype.parseHeader = function parseHeader(buf) { var class_ = constants.class[buf[4]]; var endian = constants.endian[buf[5]]; var osabi = constants.osabi[buf[6]]; var abiversion = constants.abiversion[buf[7]]; if (class_ !== '32' && class_ !== '64') throw new Error('Invalid class: ' + class_); if (endian !== 'lsb' && endian !== 'msb') throw new Error('Invalid endian: ' + endian); this.setEndian(endian); if (class_ === '32') this.setWord(4); else this.setWord(8); if (class_ === '32') { var type = constants.type[this.readUInt16(buf, 16)]; var machine = constants.machine[this.readUInt16(buf, 18)]; var version = this.readUInt32(buf, 20); var entry = this.readUInt32(buf, 24); var phoff = this.readUInt32(buf, 28); var shoff = this.readUInt32(buf, 32); var flags = this.readUInt32(buf, 36); var ehsize = this.readUInt16(buf, 40); var phentsize = this.readUInt16(buf, 42); var phnum = this.readUInt16(buf, 44); var shentsize = this.readUInt16(buf, 46); var shnum = this.readUInt16(buf, 48); var shstrndx = this.readUInt16(buf, 50); } else { var type = constants.type[this.readUInt16(buf, 16)]; var machine = constants.machine[this.readUInt16(buf, 18)]; var version = this.readUInt32(buf, 20); var entry = this.readUInt64(buf, 24); var phoff = this.readUInt64(buf, 32); var shoff = this.readUInt64(buf, 40); var flags = this.readUInt32(buf, 48); var ehsize = this.readUInt16(buf, 52); var phentsize = this.readUInt16(buf, 54); var phnum = this.readUInt16(buf, 56); var shentsize = this.readUInt16(buf, 58); var shnum = this.readUInt16(buf, 60); var shstrndx = this.readUInt16(buf, 62); } return { class: class_, endian: endian, version: buf[7], osabi: osabi, abiversion: abiversion, type: type, machine: machine, version: version, entry: entry, phoff: phoff, shoff: shoff, flags: flags, ehsize: ehsize, phentsize: phentsize, phnum: phnum, shentsize: shentsize, shnum: shnum, shstrndx: shstrndx }; }; Parser.prototype.parseBody = function parseBody(buf, header) { return { programs: this.parsePrograms(buf, header), sections: this.parseSections(buf, header) }; }; Parser.prototype.sliceChunks = function sliceChunks(buf, off, count, size) { var start = off; var end = start + count * size; if (end > buf.length) throw new Error('Failed to slice chunks'); var chunks = []; for (var off = start; off < end; off += size) chunks.push(buf.slice(off, off + size)); return chunks; }; Parser.prototype.parsePrograms = function parsePrograms(buf, header) { if (header.phoff === 0 || header.phnum === 0) return []; var programs = this.sliceChunks(buf, header.phoff, header.phnum, header.phentsize); return programs.map(function(program) { return this.parseProgram(program, header, buf); }, this); }; Parser.prototype.parseProgram = function parseProgram(ent, header, buf) { var type = constants.entryType[this.readUInt32(ent, 0)]; if (header.class === '32') { var offset = this.readUInt32(ent, 4); var vaddr = this.readUInt32(ent, 8); var paddr = this.readUInt32(ent, 12); var filesz = this.readUInt32(ent, 16); var memsz = this.readUInt32(ent, 20); var flags = this.readUInt32(ent, 24); var align = this.readUInt32(ent, 28); } else { var flags = this.readUInt32(ent, 4); var offset = this.readUInt64(ent, 8); var vaddr = this.readUInt64(ent, 16); var paddr = this.readUInt64(ent, 24); var filesz = this.readUInt64(ent, 32); var memsz = this.readUInt64(ent, 40); var align = this.readUInt64(ent, 48); } return { type: type, offset: offset, vaddr: vaddr, paddr: paddr, filesz: filesz, memsz: memsz, flags: this.mapFlags(flags, constants.entryFlags), align: align, data: buf.slice(offset, offset + filesz) }; }; Parser.prototype.parseSections = function parseSections(buf, header) { if (header.shoff === 0 || header.shnum === 0) return []; var sections = this.sliceChunks(buf, header.shoff, header.shnum, header.shentsize); return sections.map(function(section) { return this.parseSection(section, header, buf); }, this); }; Parser.prototype.parseSection = function parseSection(section, header, buf) { var name = this.readUInt32(section, 0); var type = this.readUInt32(section, 4); if (header.class === '32') { var flags = this.readUInt32(section, 8); var addr = this.readUInt32(section, 12); var off = this.readUInt32(section, 16); var size = this.readUInt32(section, 20); var link = this.readUInt32(section, 24); var info = this.readUInt32(section, 28); var addralign = this.readUInt32(section, 32); var entsize = this.readUInt32(section, 36); } else { var flags = this.readUInt64(section, 8); var addr = this.readUInt64(section, 16); var off = this.readUInt64(section, 24); var size = this.readUInt64(section, 32); var link = this.readUInt32(section, 40); var info = this.readUInt32(section, 44); var addralign = this.readUInt64(section, 46); var entsize = this.readUInt64(section, 54); } return { name: name, type: constants.sectType[type] || type, flags: this.mapFlags(flags, constants.sectFlags), addr: addr, off: off, size: size, link: link, info: info, addralign: addralign, entsize: entsize, data: buf.slice(off, off + size) }; }; Parser.prototype.resolveStr = function resolveStr(strtab, off) { for (var i = off; i < strtab.length && strtab[i] != 0; i++); return strtab.slice(off, i).toString(); }; Parser.prototype.resolveBody = function resolveBody(body, header) { var strtab = body.sections[header.shstrndx]; assert.equal(strtab.type, 'strtab'); return { programs: body.programs, sections: body.sections.map(function(section) { section.name = this.resolveStr(strtab.data, section.name); return section; }, this) }; }; /***/ }), /***/ 97784: /***/ ((module) => { function Reader(endian, word) { this.endian = null; this.word = 4; if (endian) this.setEndian(endian); if (word) this.setWord(word); }; module.exports = Reader; Reader.prototype.setEndian = function setEndian(endian) { this.endian = /le|lsb|little/i.test(endian) ? 'le' : 'be'; }; Reader.prototype.setWord = function setWord(word) { this.word = word; }; Reader.prototype.readUInt8 = function readUInt8(buf, offset) { return buf.readUInt8(offset); }; Reader.prototype.readInt8 = function readInt8(buf, offset) { return buf.readInt8(offset); }; Reader.prototype.readUInt16 = function readUInt16(buf, offset) { if (this.endian === 'le') return buf.readUInt16LE(offset); else return buf.readUInt16BE(offset); }; Reader.prototype.readInt16 = function readInt16(buf, offset) { if (this.endian === 'le') return buf.readInt16LE(offset); else return buf.readInt16BE(offset); }; Reader.prototype.readUInt32 = function readUInt32(buf, offset) { if (this.endian === 'le') return buf.readUInt32LE(offset); else return buf.readUInt32BE(offset); }; Reader.prototype.readInt32 = function readInt32(buf, offset) { if (this.endian === 'le') return buf.readInt32LE(offset); else return buf.readInt32BE(offset); }; Reader.prototype.readUInt64 = function readUInt64(buf, offset) { var a = this.readUInt32(buf, offset); var b = this.readUInt32(buf, offset + 4); if (this.endian === 'le') return a + b * 0x100000000; else return b + a * 0x100000000; }; Reader.prototype.readInt64 = function readInt64(buf, offset) { if (this.endian === 'le') { var a = this.readUInt32(buf, offset); var b = this.readInt32(buf, offset + 4); return a + b * 0x100000000; } else { var a = this.readInt32(buf, offset); var b = this.readUInt32(buf, offset + 4); return b + a * 0x100000000; } }; Reader.prototype.readHalf = function readHalf(buf, offset) { if (this.word === 2) return this.readInt8(buf, offset); else if (this.word === 4) return this.readInt16(buf, offset); else return this.readInt32(buf, offset); }; Reader.prototype.readUHalf = function readUHalf(buf, offset) { if (this.word === 2) return this.readUInt8(buf, offset); else if (this.word === 4) return this.readUInt16(buf, offset); else return this.readUInt32(buf, offset); }; Reader.prototype.readWord = function readWord(buf, offset) { if (this.word === 1) return this.readInt8(buf, offset); else if (this.word === 2) return this.readInt16(buf, offset); else if (this.word === 4) return this.readInt32(buf, offset); else return this.readInt64(buf, offset); }; Reader.prototype.readUWord = function readUWord(buf, offset) { if (this.word === 1) return this.readUInt8(buf, offset); else if (this.word === 2) return this.readUInt16(buf, offset); else if (this.word === 4) return this.readUInt32(buf, offset); else return this.readUInt64(buf, offset); }; /***/ }), /***/ 17234: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.EventLoopSpinner = void 0; const immediately = typeof setImmediate === 'function' ? setImmediate : (cb) => cb(); class EventLoopSpinner { constructor(thresholdMs = 10) { this.thresholdMs = thresholdMs; this.afterLastSpin = Date.now(); } isStarving() { return Date.now() - this.afterLastSpin > this.thresholdMs; } async spin() { return new Promise((resolve) => immediately(() => { this.afterLastSpin = Date.now(); resolve(); })); } } exports.EventLoopSpinner = EventLoopSpinner; //# sourceMappingURL=event-loop-spinner.js.map /***/ }), /***/ 77158: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.eventLoopSpinner = void 0; const event_loop_spinner_1 = __webpack_require__(17234); exports.eventLoopSpinner = new event_loop_spinner_1.EventLoopSpinner(); //# sourceMappingURL=index.js.map /***/ }), /***/ 66004: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var isGlob = __webpack_require__(46830); var pathPosixDirname = __webpack_require__(85622).posix.dirname; var isWin32 = __webpack_require__(12087).platform() === 'win32'; var slash = '/'; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; /** * @param {string} str * @param {Object} opts * @param {boolean} [opts.flipBackslashes=true] * @returns {string} */ module.exports = function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); // flip windows path separators if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { str = str.replace(backslash, slash); } // special case for strings ending in enclosure containing path separator if (enclosure.test(str)) { str += slash; } // preserves full path in case of trailing path separator str += 'a'; // remove path parts that are globby do { str = pathPosixDirname(str); } while (isGlob(str) || globby.test(str)); // remove escape chars and return result return str.replace(escaped, '$1'); }; /***/ }), /***/ 9433: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const util = __webpack_require__(31669); const braces = __webpack_require__(86744); const picomatch = __webpack_require__(59444); const utils = __webpack_require__(28702); const isEmptyString = val => val === '' || val === './'; /** * Returns an array of strings that match one or more glob patterns. * * ```js * const mm = require('micromatch'); * // mm(list, patterns[, options]); * * console.log(mm(['a.js', 'a.txt'], ['*.js'])); * //=> [ 'a.js' ] * ``` * @param {String|Array} `list` List of strings to match. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `options` See available [options](#options) * @return {Array} Returns an array of matches * @summary false * @api public */ const micromatch = (list, patterns, options) => { patterns = [].concat(patterns); list = [].concat(list); let omit = new Set(); let keep = new Set(); let items = new Set(); let negatives = 0; let onResult = state => { items.add(state.output); if (options && options.onResult) { options.onResult(state); } }; for (let i = 0; i < patterns.length; i++) { let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); let negated = isMatch.state.negated || isMatch.state.negatedExtglob; if (negated) negatives++; for (let item of list) { let matched = isMatch(item, true); let match = negated ? !matched.isMatch : matched.isMatch; if (!match) continue; if (negated) { omit.add(matched.output); } else { omit.delete(matched.output); keep.add(matched.output); } } } let result = negatives === patterns.length ? [...items] : [...keep]; let matches = result.filter(item => !omit.has(item)); if (options && matches.length === 0) { if (options.failglob === true) { throw new Error(`No matches found for "${patterns.join(', ')}"`); } if (options.nonull === true || options.nullglob === true) { return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; } } return matches; }; /** * Backwards compatibility */ micromatch.match = micromatch; /** * Returns a matcher function from the given glob `pattern` and `options`. * The returned function takes a string to match as its only argument and returns * true if the string is a match. * * ```js * const mm = require('micromatch'); * // mm.matcher(pattern[, options]); * * const isMatch = mm.matcher('*.!(*a)'); * console.log(isMatch('a.a')); //=> false * console.log(isMatch('a.b')); //=> true * ``` * @param {String} `pattern` Glob pattern * @param {Object} `options` * @return {Function} Returns a matcher function. * @api public */ micromatch.matcher = (pattern, options) => picomatch(pattern, options); /** * Returns true if **any** of the given glob `patterns` match the specified `string`. * * ```js * const mm = require('micromatch'); * // mm.isMatch(string, patterns[, options]); * * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true * console.log(mm.isMatch('a.a', 'b.*')); //=> false * ``` * @param {String} `str` The string to test. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `[options]` See available [options](#options). * @return {Boolean} Returns true if any patterns match `str` * @api public */ micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); /** * Backwards compatibility */ micromatch.any = micromatch.isMatch; /** * Returns a list of strings that _**do not match any**_ of the given `patterns`. * * ```js * const mm = require('micromatch'); * // mm.not(list, patterns[, options]); * * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); * //=> ['b.b', 'c.c'] * ``` * @param {Array} `list` Array of strings to match. * @param {String|Array} `patterns` One or more glob pattern to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Array} Returns an array of strings that **do not match** the given patterns. * @api public */ micromatch.not = (list, patterns, options = {}) => { patterns = [].concat(patterns).map(String); let result = new Set(); let items = []; let onResult = state => { if (options.onResult) options.onResult(state); items.push(state.output); }; let matches = micromatch(list, patterns, { ...options, onResult }); for (let item of items) { if (!matches.includes(item)) { result.add(item); } } return [...result]; }; /** * Returns true if the given `string` contains the given pattern. Similar * to [.isMatch](#isMatch) but the pattern can match any part of the string. * * ```js * var mm = require('micromatch'); * // mm.contains(string, pattern[, options]); * * console.log(mm.contains('aa/bb/cc', '*b')); * //=> true * console.log(mm.contains('aa/bb/cc', '*d')); * //=> false * ``` * @param {String} `str` The string to match. * @param {String|Array} `patterns` Glob pattern to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Boolean} Returns true if any of the patterns matches any part of `str`. * @api public */ micromatch.contains = (str, pattern, options) => { if (typeof str !== 'string') { throw new TypeError(`Expected a string: "${util.inspect(str)}"`); } if (Array.isArray(pattern)) { return pattern.some(p => micromatch.contains(str, p, options)); } if (typeof pattern === 'string') { if (isEmptyString(str) || isEmptyString(pattern)) { return false; } if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { return true; } } return micromatch.isMatch(str, pattern, { ...options, contains: true }); }; /** * Filter the keys of the given object with the given `glob` pattern * and `options`. Does not attempt to match nested keys. If you need this feature, * use [glob-object][] instead. * * ```js * const mm = require('micromatch'); * // mm.matchKeys(object, patterns[, options]); * * const obj = { aa: 'a', ab: 'b', ac: 'c' }; * console.log(mm.matchKeys(obj, '*b')); * //=> { ab: 'b' } * ``` * @param {Object} `object` The object with keys to filter. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Object} Returns an object with only keys that match the given patterns. * @api public */ micromatch.matchKeys = (obj, patterns, options) => { if (!utils.isObject(obj)) { throw new TypeError('Expected the first argument to be an object'); } let keys = micromatch(Object.keys(obj), patterns, options); let res = {}; for (let key of keys) res[key] = obj[key]; return res; }; /** * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. * * ```js * const mm = require('micromatch'); * // mm.some(list, patterns[, options]); * * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); * // true * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); * // false * ``` * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` * @api public */ micromatch.some = (list, patterns, options) => { let items = [].concat(list); for (let pattern of [].concat(patterns)) { let isMatch = picomatch(String(pattern), options); if (items.some(item => isMatch(item))) { return true; } } return false; }; /** * Returns true if every string in the given `list` matches * any of the given glob `patterns`. * * ```js * const mm = require('micromatch'); * // mm.every(list, patterns[, options]); * * console.log(mm.every('foo.js', ['foo.js'])); * // true * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); * // true * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); * // false * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); * // false * ``` * @param {String|Array} `list` The string or array of strings to test. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` * @api public */ micromatch.every = (list, patterns, options) => { let items = [].concat(list); for (let pattern of [].concat(patterns)) { let isMatch = picomatch(String(pattern), options); if (!items.every(item => isMatch(item))) { return false; } } return true; }; /** * Returns true if **all** of the given `patterns` match * the specified string. * * ```js * const mm = require('micromatch'); * // mm.all(string, patterns[, options]); * * console.log(mm.all('foo.js', ['foo.js'])); * // true * * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); * // false * * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); * // true * * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); * // true * ``` * @param {String|Array} `str` The string to test. * @param {String|Array} `patterns` One or more glob patterns to use for matching. * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Boolean} Returns true if any patterns match `str` * @api public */ micromatch.all = (str, patterns, options) => { if (typeof str !== 'string') { throw new TypeError(`Expected a string: "${util.inspect(str)}"`); } return [].concat(patterns).every(p => picomatch(p, options)(str)); }; /** * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. * * ```js * const mm = require('micromatch'); * // mm.capture(pattern, string[, options]); * * console.log(mm.capture('test/*.js', 'test/foo.js')); * //=> ['foo'] * console.log(mm.capture('test/*.js', 'foo/bar.css')); * //=> null * ``` * @param {String} `glob` Glob pattern to use for matching. * @param {String} `input` String to match * @param {Object} `options` See available [options](#options) for changing how matches are performed * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. * @api public */ micromatch.capture = (glob, input, options) => { let posix = utils.isWindows(options); let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); if (match) { return match.slice(1).map(v => v === void 0 ? '' : v); } }; /** * Create a regular expression from the given glob `pattern`. * * ```js * const mm = require('micromatch'); * // mm.makeRe(pattern[, options]); * * console.log(mm.makeRe('*.js')); * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ * ``` * @param {String} `pattern` A glob pattern to convert to regex. * @param {Object} `options` * @return {RegExp} Returns a regex created from the given pattern. * @api public */ micromatch.makeRe = (...args) => picomatch.makeRe(...args); /** * Scan a glob pattern to separate the pattern into segments. Used * by the [split](#split) method. * * ```js * const mm = require('micromatch'); * const state = mm.scan(pattern[, options]); * ``` * @param {String} `pattern` * @param {Object} `options` * @return {Object} Returns an object with * @api public */ micromatch.scan = (...args) => picomatch.scan(...args); /** * Parse a glob pattern to create the source string for a regular * expression. * * ```js * const mm = require('micromatch'); * const state = mm(pattern[, options]); * ``` * @param {String} `glob` * @param {Object} `options` * @return {Object} Returns an object with useful properties and output to be used as regex source string. * @api public */ micromatch.parse = (patterns, options) => { let res = []; for (let pattern of [].concat(patterns || [])) { for (let str of braces(String(pattern), options)) { res.push(picomatch.parse(str, options)); } } return res; }; /** * Process the given brace `pattern`. * * ```js * const { braces } = require('micromatch'); * console.log(braces('foo/{a,b,c}/bar')); * //=> [ 'foo/(a|b|c)/bar' ] * * console.log(braces('foo/{a,b,c}/bar', { expand: true })); * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] * ``` * @param {String} `pattern` String with brace pattern to process. * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. * @return {Array} * @api public */ micromatch.braces = (pattern, options) => { if (typeof pattern !== 'string') throw new TypeError('Expected a string'); if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) { return [pattern]; } return braces(pattern, options); }; /** * Expand braces */ micromatch.braceExpand = (pattern, options) => { if (typeof pattern !== 'string') throw new TypeError('Expected a string'); return micromatch.braces(pattern, { ...options, expand: true }); }; /** * Expose micromatch */ module.exports = micromatch; /***/ }), /***/ 13294: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const taskManager = __webpack_require__(75135); const async_1 = __webpack_require__(43456); const stream_1 = __webpack_require__(43403); const sync_1 = __webpack_require__(84113); const settings_1 = __webpack_require__(23862); const utils = __webpack_require__(94426); async function FastGlob(source, options) { assertPatternsInput(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); } // https://github.com/typescript-eslint/typescript-eslint/issues/60 // eslint-disable-next-line no-redeclare (function (FastGlob) { function sync(source, options) { assertPatternsInput(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob.sync = sync; function stream(source, options) { assertPatternsInput(source); const works = getWorks(source, stream_1.default, options); /** * The stream returned by the provider cannot work with an asynchronous iterator. * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. * This affects performance (+25%). I don't see best solution right now. */ return utils.stream.merge(works); } FastGlob.stream = stream; function generateTasks(source, options) { assertPatternsInput(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } FastGlob.generateTasks = generateTasks; function isDynamicPattern(source, options) { assertPatternsInput(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } FastGlob.isDynamicPattern = isDynamicPattern; function escapePath(source) { assertPatternsInput(source); return utils.path.escape(source); } FastGlob.escapePath = escapePath; })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { const patterns = [].concat(source); const settings = new settings_1.default(options); const tasks = taskManager.generate(patterns, settings); const provider = new _Provider(settings); return tasks.map(provider.read, provider); } function assertPatternsInput(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { throw new TypeError('Patterns must be a string (non empty) or an array of strings'); } } module.exports = FastGlob; /***/ }), /***/ 75135: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; const utils = __webpack_require__(94426); function generate(patterns, settings) { const positivePatterns = getPositivePatterns(patterns); const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); return staticTasks.concat(dynamicTasks); } exports.generate = generate; /** * Returns tasks grouped by basic pattern directories. * * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. * This is necessary because directory traversal starts at the base directory and goes deeper. */ function convertPatternsToTasks(positive, negative, dynamic) { const tasks = []; const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); /* * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. */ if ('.' in insideCurrentDirectoryGroup) { tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); } else { tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); } return tasks; } exports.convertPatternsToTasks = convertPatternsToTasks; function getPositivePatterns(patterns) { return utils.pattern.getPositivePatterns(patterns); } exports.getPositivePatterns = getPositivePatterns; function getNegativePatternsAsPositive(patterns, ignore) { const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); const positive = negative.map(utils.pattern.convertToPositivePattern); return positive; } exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; function groupPatternsByBaseDirectory(patterns) { const group = {}; return patterns.reduce((collection, pattern) => { const base = utils.pattern.getBaseDirectory(pattern); if (base in collection) { collection[base].push(pattern); } else { collection[base] = [pattern]; } return collection; }, group); } exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; function convertPatternGroupsToTasks(positive, negative, dynamic) { return Object.keys(positive).map((base) => { return convertPatternGroupToTask(base, positive[base], negative, dynamic); }); } exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; function convertPatternGroupToTask(base, positive, negative, dynamic) { return { dynamic, positive, negative, base, patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) }; } exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), /***/ 43456: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(19086); const provider_1 = __webpack_require__(90466); class ProviderAsync extends provider_1.default { constructor() { super(...arguments); this._reader = new stream_1.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = []; return new Promise((resolve, reject) => { const stream = this.api(root, task, options); stream.once('error', reject); stream.on('data', (entry) => entries.push(options.transform(entry))); stream.once('end', () => resolve(entries)); }); } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderAsync; /***/ }), /***/ 60346: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(94426); const partial_1 = __webpack_require__(47769); class DeepFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; } getFilter(basePath, positive, negative) { const matcher = this._getMatcher(positive); const negativeRe = this._getNegativePatternsRe(negative); return (entry) => this._filter(basePath, entry, matcher, negativeRe); } _getMatcher(patterns) { return new partial_1.default(patterns, this._settings, this._micromatchOptions); } _getNegativePatternsRe(patterns) { const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); } _filter(basePath, entry, matcher, negativeRe) { if (this._isSkippedByDeep(basePath, entry.path)) { return false; } if (this._isSkippedSymbolicLink(entry)) { return false; } const filepath = utils.path.removeLeadingDotSegment(entry.path); if (this._isSkippedByPositivePatterns(filepath, matcher)) { return false; } return this._isSkippedByNegativePatterns(filepath, negativeRe); } _isSkippedByDeep(basePath, entryPath) { /** * Avoid unnecessary depth calculations when it doesn't matter. */ if (this._settings.deep === Infinity) { return false; } return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; } _getEntryLevel(basePath, entryPath) { const entryPathDepth = entryPath.split('/').length; if (basePath === '') { return entryPathDepth; } const basePathDepth = basePath.split('/').length; return entryPathDepth - basePathDepth; } _isSkippedSymbolicLink(entry) { return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); } _isSkippedByPositivePatterns(entryPath, matcher) { return !this._settings.baseNameMatch && !matcher.match(entryPath); } _isSkippedByNegativePatterns(entryPath, patternsRe) { return !utils.pattern.matchAny(entryPath, patternsRe); } } exports.default = DeepFilter; /***/ }), /***/ 7026: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(94426); class EntryFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; this.index = new Map(); } getFilter(positive, negative) { const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); return (entry) => this._filter(entry, positiveRe, negativeRe); } _filter(entry, positiveRe, negativeRe) { if (this._settings.unique && this._isDuplicateEntry(entry)) { return false; } if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { return false; } if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { return false; } const filepath = this._settings.baseNameMatch ? entry.name : entry.path; const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); if (this._settings.unique && isMatched) { this._createIndexRecord(entry); } return isMatched; } _isDuplicateEntry(entry) { return this.index.has(entry.path); } _createIndexRecord(entry) { this.index.set(entry.path, undefined); } _onlyFileFilter(entry) { return this._settings.onlyFiles && !entry.dirent.isFile(); } _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { if (!this._settings.absolute) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); return utils.pattern.matchAny(fullpath, patternsRe); } _isMatchToPatterns(entryPath, patternsRe) { const filepath = utils.path.removeLeadingDotSegment(entryPath); return utils.pattern.matchAny(filepath, patternsRe); } } exports.default = EntryFilter; /***/ }), /***/ 23046: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(94426); class ErrorFilter { constructor(_settings) { this._settings = _settings; } getFilter() { return (error) => this._isNonFatalError(error); } _isNonFatalError(error) { return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; } } exports.default = ErrorFilter; /***/ }), /***/ 50092: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(94426); class Matcher { constructor(_patterns, _settings, _micromatchOptions) { this._patterns = _patterns; this._settings = _settings; this._micromatchOptions = _micromatchOptions; this._storage = []; this._fillStorage(); } _fillStorage() { /** * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). * So, before expand patterns with brace expansion into separated patterns. */ const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); for (const pattern of patterns) { const segments = this._getPatternSegments(pattern); const sections = this._splitSegmentsIntoSections(segments); this._storage.push({ complete: sections.length <= 1, pattern, segments, sections }); } } _getPatternSegments(pattern) { const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); return parts.map((part) => { const dynamic = utils.pattern.isDynamicPattern(part, this._settings); if (!dynamic) { return { dynamic: false, pattern: part }; } return { dynamic: true, pattern: part, patternRe: utils.pattern.makeRe(part, this._micromatchOptions) }; }); } _splitSegmentsIntoSections(segments) { return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); } } exports.default = Matcher; /***/ }), /***/ 47769: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const matcher_1 = __webpack_require__(50092); class PartialMatcher extends matcher_1.default { match(filepath) { const parts = filepath.split('/'); const levels = parts.length; const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); for (const pattern of patterns) { const section = pattern.sections[0]; /** * In this case, the pattern has a globstar and we must read all directories unconditionally, * but only if the level has reached the end of the first group. * * fixtures/{a,b}/** * ^ true/false ^ always true */ if (!pattern.complete && levels > section.length) { return true; } const match = parts.every((part, index) => { const segment = pattern.segments[index]; if (segment.dynamic && segment.patternRe.test(part)) { return true; } if (!segment.dynamic && segment.pattern === part) { return true; } return false; }); if (match) { return true; } } return false; } } exports.default = PartialMatcher; /***/ }), /***/ 90466: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const deep_1 = __webpack_require__(60346); const entry_1 = __webpack_require__(7026); const error_1 = __webpack_require__(23046); const entry_2 = __webpack_require__(30218); class Provider { constructor(_settings) { this._settings = _settings; this.errorFilter = new error_1.default(this._settings); this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { return path.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === '.' ? '' : task.base; return { basePath, pathSegmentSeparator: '/', concurrency: this._settings.concurrency, deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), entryFilter: this.entryFilter.getFilter(task.positive, task.negative), errorFilter: this.errorFilter.getFilter(), followSymbolicLinks: this._settings.followSymbolicLinks, fs: this._settings.fs, stats: this._settings.stats, throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, transform: this.entryTransformer.getTransformer() }; } _getMicromatchOptions() { return { dot: this._settings.dot, matchBase: this._settings.baseNameMatch, nobrace: !this._settings.braceExpansion, nocase: !this._settings.caseSensitiveMatch, noext: !this._settings.extglob, noglobstar: !this._settings.globstar, posix: true, strictSlashes: false }; } } exports.default = Provider; /***/ }), /***/ 43403: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(92413); const stream_2 = __webpack_require__(19086); const provider_1 = __webpack_require__(90466); class ProviderStream extends provider_1.default { constructor() { super(...arguments); this._reader = new stream_2.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const source = this.api(root, task, options); const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); source .once('error', (error) => destination.emit('error', error)) .on('data', (entry) => destination.emit('data', options.transform(entry))) .once('end', () => destination.emit('end')); destination .once('close', () => source.destroy()); return destination; } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderStream; /***/ }), /***/ 84113: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const sync_1 = __webpack_require__(40112); const provider_1 = __webpack_require__(90466); class ProviderSync extends provider_1.default { constructor() { super(...arguments); this._reader = new sync_1.default(this._settings); } read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = this.api(root, task, options); return entries.map(options.transform); } api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); } } exports.default = ProviderSync; /***/ }), /***/ 30218: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const utils = __webpack_require__(94426); class EntryTransformer { constructor(_settings) { this._settings = _settings; } getTransformer() { return (entry) => this._transform(entry); } _transform(entry) { let filepath = entry.path; if (this._settings.absolute) { filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); filepath = utils.path.unixify(filepath); } if (this._settings.markDirectories && entry.dirent.isDirectory()) { filepath += '/'; } if (!this._settings.objectMode) { return filepath; } return Object.assign(Object.assign({}, entry), { path: filepath }); } } exports.default = EntryTransformer; /***/ }), /***/ 22117: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const path = __webpack_require__(85622); const fsStat = __webpack_require__(66203); const utils = __webpack_require__(94426); class Reader { constructor(_settings) { this._settings = _settings; this._fsStatSettings = new fsStat.Settings({ followSymbolicLink: this._settings.followSymbolicLinks, fs: this._settings.fs, throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks }); } _getFullEntryPath(filepath) { return path.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { name: pattern, path: pattern, dirent: utils.fs.createDirentFromStats(pattern, stats) }; if (this._settings.stats) { entry.stats = stats; } return entry; } _isFatalError(error) { return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; } } exports.default = Reader; /***/ }), /***/ 19086: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const stream_1 = __webpack_require__(92413); const fsStat = __webpack_require__(66203); const fsWalk = __webpack_require__(45439); const reader_1 = __webpack_require__(22117); class ReaderStream extends reader_1.default { constructor() { super(...arguments); this._walkStream = fsWalk.walkStream; this._stat = fsStat.stat; } dynamic(root, options) { return this._walkStream(root, options); } static(patterns, options) { const filepaths = patterns.map(this._getFullEntryPath, this); const stream = new stream_1.PassThrough({ objectMode: true }); stream._write = (index, _enc, done) => { return this._getEntry(filepaths[index], patterns[index], options) .then((entry) => { if (entry !== null && options.entryFilter(entry)) { stream.push(entry); } if (index === filepaths.length - 1) { stream.end(); } done(); }) .catch(done); }; for (let i = 0; i < filepaths.length; i++) { stream.write(i); } return stream; } _getEntry(filepath, pattern, options) { return this._getStat(filepath) .then((stats) => this._makeEntry(stats, pattern)) .catch((error) => { if (options.errorFilter(error)) { return null; } throw error; }); } _getStat(filepath) { return new Promise((resolve, reject) => { this._stat(filepath, this._fsStatSettings, (error, stats) => { return error === null ? resolve(stats) : reject(error); }); }); } } exports.default = ReaderStream; /***/ }), /***/ 40112: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fsStat = __webpack_require__(66203); const fsWalk = __webpack_require__(45439); const reader_1 = __webpack_require__(22117); class ReaderSync extends reader_1.default { constructor() { super(...arguments); this._walkSync = fsWalk.walkSync; this._statSync = fsStat.statSync; } dynamic(root, options) { return this._walkSync(root, options); } static(patterns, options) { const entries = []; for (const pattern of patterns) { const filepath = this._getFullEntryPath(pattern); const entry = this._getEntry(filepath, pattern, options); if (entry === null || !options.entryFilter(entry)) { continue; } entries.push(entry); } return entries; } _getEntry(filepath, pattern, options) { try { const stats = this._getStat(filepath); return this._makeEntry(stats, pattern); } catch (error) { if (options.errorFilter(error)) { return null; } throw error; } } _getStat(filepath) { return this._statSync(filepath, this._fsStatSettings); } } exports.default = ReaderSync; /***/ }), /***/ 23862: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; const fs = __webpack_require__(35747); const os = __webpack_require__(12087); /** * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 */ const CPU_COUNT = Math.max(os.cpus().length, 1); exports.DEFAULT_FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, lstatSync: fs.lstatSync, stat: fs.stat, statSync: fs.statSync, readdir: fs.readdir, readdirSync: fs.readdirSync }; class Settings { constructor(_options = {}) { this._options = _options; this.absolute = this._getValue(this._options.absolute, false); this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); this.braceExpansion = this._getValue(this._options.braceExpansion, true); this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); this.cwd = this._getValue(this._options.cwd, process.cwd()); this.deep = this._getValue(this._options.deep, Infinity); this.dot = this._getValue(this._options.dot, false); this.extglob = this._getValue(this._options.extglob, true); this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); this.fs = this._getFileSystemMethods(this._options.fs); this.globstar = this._getValue(this._options.globstar, true); this.ignore = this._getValue(this._options.ignore, []); this.markDirectories = this._getValue(this._options.markDirectories, false); this.objectMode = this._getValue(this._options.objectMode, false); this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); this.onlyFiles = this._getValue(this._options.onlyFiles, true); this.stats = this._getValue(this._options.stats, false); this.suppressErrors = this._getValue(this._options.suppressErrors, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); this.unique = this._getValue(this._options.unique, true); if (this.onlyDirectories) { this.onlyFiles = false; } if (this.stats) { this.objectMode = true; } } _getValue(option, value) { return option === undefined ? value : option; } _getFileSystemMethods(methods = {}) { return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); } } exports.default = Settings; /***/ }), /***/ 34825: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.splitWhen = exports.flatten = void 0; function flatten(items) { return items.reduce((collection, item) => [].concat(collection, item), []); } exports.flatten = flatten; function splitWhen(items, predicate) { const result = [[]]; let groupIndex = 0; for (const item of items) { if (predicate(item)) { groupIndex++; result[groupIndex] = []; } else { result[groupIndex].push(item); } } return result; } exports.splitWhen = splitWhen; /***/ }), /***/ 47843: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isEnoentCodeError = void 0; function isEnoentCodeError(error) { return error.code === 'ENOENT'; } exports.isEnoentCodeError = isEnoentCodeError; /***/ }), /***/ 66334: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createDirentFromStats = void 0; class DirentFromStats { constructor(name, stats) { this.name = name; this.isBlockDevice = stats.isBlockDevice.bind(stats); this.isCharacterDevice = stats.isCharacterDevice.bind(stats); this.isDirectory = stats.isDirectory.bind(stats); this.isFIFO = stats.isFIFO.bind(stats); this.isFile = stats.isFile.bind(stats); this.isSocket = stats.isSocket.bind(stats); this.isSymbolicLink = stats.isSymbolicLink.bind(stats); } } function createDirentFromStats(name, stats) { return new DirentFromStats(name, stats); } exports.createDirentFromStats = createDirentFromStats; /***/ }), /***/ 94426: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; const array = __webpack_require__(34825); exports.array = array; const errno = __webpack_require__(47843); exports.errno = errno; const fs = __webpack_require__(66334); exports.fs = fs; const path = __webpack_require__(92003); exports.path = path; const pattern = __webpack_require__(30057); exports.pattern = pattern; const stream = __webpack_require__(56242); exports.stream = stream; const string = __webpack_require__(33021); exports.string = string; /***/ }), /***/ 92003: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; const path = __webpack_require__(85622); const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; /** * Designed to work only with simple paths: `dir\\file`. */ function unixify(filepath) { return filepath.replace(/\\/g, '/'); } exports.unixify = unixify; function makeAbsolute(cwd, filepath) { return path.resolve(cwd, filepath); } exports.makeAbsolute = makeAbsolute; function escape(pattern) { return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); } exports.escape = escape; function removeLeadingDotSegment(entry) { // We do not use `startsWith` because this is 10x slower than current implementation for some cases. // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with if (entry.charAt(0) === '.') { const secondCharactery = entry.charAt(1); if (secondCharactery === '/' || secondCharactery === '\\') { return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); } } return entry; } exports.removeLeadingDotSegment = removeLeadingDotSegment; /***/ }), /***/ 30057: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; const path = __webpack_require__(85622); const globParent = __webpack_require__(66004); const micromatch = __webpack_require__(9433); const GLOBSTAR = '**'; const ESCAPE_SYMBOL = '\\'; const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; function isStaticPattern(pattern, options = {}) { return !isDynamicPattern(pattern, options); } exports.isStaticPattern = isStaticPattern; function isDynamicPattern(pattern, options = {}) { /** * A special case with an empty string is necessary for matching patterns that start with a forward slash. * An empty string cannot be a dynamic pattern. * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. */ if (pattern === '') { return false; } /** * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check * filepath directly (without read directory). */ if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { return true; } if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { return true; } if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { return true; } if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { return true; } return false; } exports.isDynamicPattern = isDynamicPattern; function convertToPositivePattern(pattern) { return isNegativePattern(pattern) ? pattern.slice(1) : pattern; } exports.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return '!' + pattern; } exports.convertToNegativePattern = convertToNegativePattern; function isNegativePattern(pattern) { return pattern.startsWith('!') && pattern[1] !== '('; } exports.isNegativePattern = isNegativePattern; function isPositivePattern(pattern) { return !isNegativePattern(pattern); } exports.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { return patterns.filter(isNegativePattern); } exports.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { return patterns.filter(isPositivePattern); } exports.getPositivePatterns = getPositivePatterns; /** * Returns patterns that can be applied inside the current directory. * * @example * // ['./*', '*', 'a/*'] * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) */ function getPatternsInsideCurrentDirectory(patterns) { return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); } exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; /** * Returns patterns to be expanded relative to (outside) the current directory. * * @example * // ['../*', './../*'] * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) */ function getPatternsOutsideCurrentDirectory(patterns) { return patterns.filter(isPatternRelatedToParentDirectory); } exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; function isPatternRelatedToParentDirectory(pattern) { return pattern.startsWith('..') || pattern.startsWith('./..'); } exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; function getBaseDirectory(pattern) { return globParent(pattern, { flipBackslashes: false }); } exports.getBaseDirectory = getBaseDirectory; function hasGlobStar(pattern) { return pattern.includes(GLOBSTAR); } exports.hasGlobStar = hasGlobStar; function endsWithSlashGlobStar(pattern) { return pattern.endsWith('/' + GLOBSTAR); } exports.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { const basename = path.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; function expandPatternsWithBraceExpansion(patterns) { return patterns.reduce((collection, pattern) => { return collection.concat(expandBraceExpansion(pattern)); }, []); } exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; function expandBraceExpansion(pattern) { return micromatch.braces(pattern, { expand: true, nodupes: true }); } exports.expandBraceExpansion = expandBraceExpansion; function getPatternParts(pattern, options) { let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); /** * The scan method returns an empty array in some cases. * See micromatch/picomatch#58 for more details. */ if (parts.length === 0) { parts = [pattern]; } /** * The scan method does not return an empty part for the pattern with a forward slash. * This is another part of micromatch/picomatch#58. */ if (parts[0].startsWith('/')) { parts[0] = parts[0].slice(1); parts.unshift(''); } return parts; } exports.getPatternParts = getPatternParts; function makeRe(pattern, options) { return micromatch.makeRe(pattern, options); } exports.makeRe = makeRe; function convertPatternsToRe(patterns, options) { return patterns.map((pattern) => makeRe(pattern, options)); } exports.convertPatternsToRe = convertPatternsToRe; function matchAny(entry, patternsRe) { return patternsRe.some((patternRe) => patternRe.test(entry)); } exports.matchAny = matchAny; /***/ }), /***/ 56242: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.merge = void 0; const merge2 = __webpack_require__(60155); function merge(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { stream.once('error', (error) => mergedStream.emit('error', error)); }); mergedStream.once('close', () => propagateCloseEventToSources(streams)); mergedStream.once('end', () => propagateCloseEventToSources(streams)); return mergedStream; } exports.merge = merge; function propagateCloseEventToSources(streams) { streams.forEach((stream) => stream.emit('close')); } /***/ }), /***/ 33021: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isEmpty = exports.isString = void 0; function isString(input) { return typeof input === 'string'; } exports.isString = isString; function isEmpty(input) { return input === ''; } exports.isEmpty = isEmpty; /***/ }), /***/ 10373: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* eslint-disable no-var */ var reusify = __webpack_require__(73650) function fastqueue (context, worker, concurrency) { if (typeof context === 'function') { concurrency = worker worker = context context = null } if (concurrency < 1) { throw new Error('fastqueue concurrency must be greater than 1') } var cache = reusify(Task) var queueHead = null var queueTail = null var _running = 0 var errorHandler = null var self = { push: push, drain: noop, saturated: noop, pause: pause, paused: false, concurrency: concurrency, running: running, resume: resume, idle: idle, length: length, getQueue: getQueue, unshift: unshift, empty: noop, kill: kill, killAndDrain: killAndDrain, error: error } return self function running () { return _running } function pause () { self.paused = true } function length () { var current = queueHead var counter = 0 while (current) { current = current.next counter++ } return counter } function getQueue () { var current = queueHead var tasks = [] while (current) { tasks.push(current.value) current = current.next } return tasks } function resume () { if (!self.paused) return self.paused = false for (var i = 0; i < self.concurrency; i++) { _running++ release() } } function idle () { return _running === 0 && self.length() === 0 } function push (value, done) { var current = cache.get() current.context = context current.release = release current.value = value current.callback = done || noop current.errorHandler = errorHandler if (_running === self.concurrency || self.paused) { if (queueTail) { queueTail.next = current queueTail = current } else { queueHead = current queueTail = current self.saturated() } } else { _running++ worker.call(context, current.value, current.worked) } } function unshift (value, done) { var current = cache.get() current.context = context current.release = release current.value = value current.callback = done || noop if (_running === self.concurrency || self.paused) { if (queueHead) { current.next = queueHead queueHead = current } else { queueHead = current queueTail = current self.saturated() } } else { _running++ worker.call(context, current.value, current.worked) } } function release (holder) { if (holder) { cache.release(holder) } var next = queueHead if (next) { if (!self.paused) { if (queueTail === queueHead) { queueTail = null } queueHead = next.next next.next = null worker.call(context, next.value, next.worked) if (queueTail === null) { self.empty() } } else { _running-- } } else if (--_running === 0) { self.drain() } } function kill () { queueHead = null queueTail = null self.drain = noop } function killAndDrain () { queueHead = null queueTail = null self.drain() self.drain = noop } function error (handler) { errorHandler = handler } } function noop () {} function Task () { this.value = null this.callback = noop this.next = null this.release = noop this.context = null this.errorHandler = null var self = this this.worked = function worked (err, result) { var callback = self.callback var errorHandler = self.errorHandler var val = self.value self.value = null self.callback = noop if (self.errorHandler) { errorHandler(err, val) } callback.call(self.context, err, result) self.release(self) } } function queueAsPromised (context, worker, concurrency) { if (typeof context === 'function') { concurrency = worker worker = context context = null } function asyncWrapper (arg, cb) { worker.call(this, arg) .then(function (res) { cb(null, res) }, cb) } var queue = fastqueue(context, asyncWrapper, concurrency) var pushCb = queue.push var unshiftCb = queue.unshift queue.push = push queue.unshift = unshift return queue function push (value) { var p = new Promise(function (resolve, reject) { pushCb(value, function (err, result) { if (err) { reject(err) return } resolve(result) }) }) // Let's fork the promise chain to // make the error bubble up to the user but // not lead to a unhandledRejection p.catch(noop) return p } function unshift (value) { var p = new Promise(function (resolve, reject) { unshiftCb(value, function (err, result) { if (err) { reject(err) return } resolve(result) }) }) // Let's fork the promise chain to // make the error bubble up to the user but // not lead to a unhandledRejection p.catch(noop) return p } } module.exports = fastqueue module.exports.promise = queueAsPromised /***/ }), /***/ 2664: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /*! * fill-range * * Copyright (c) 2014-present, Jon Schlinkert. * Licensed under the MIT License. */ const util = __webpack_require__(31669); const toRegexRange = __webpack_require__(45702); const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); const transform = toNumber => { return value => toNumber === true ? Number(value) : String(value); }; const isValidValue = value => { return typeof value === 'number' || (typeof value === 'string' && value !== ''); }; const isNumber = num => Number.isInteger(+num); const zeros = input => { let value = `${input}`; let index = -1; if (value[0] === '-') value = value.slice(1); if (value === '0') return false; while (value[++index] === '0'); return index > 0; }; const stringify = (start, end, options) => { if (typeof start === 'string' || typeof end === 'string') { return true; } return options.stringify === true; }; const pad = (input, maxLength, toNumber) => { if (maxLength > 0) { let dash = input[0] === '-' ? '-' : ''; if (dash) input = input.slice(1); input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); } if (toNumber === false) { return String(input); } return input; }; const toMaxLen = (input, maxLength) => { let negative = input[0] === '-' ? '-' : ''; if (negative) { input = input.slice(1); maxLength--; } while (input.length < maxLength) input = '0' + input; return negative ? ('-' + input) : input; }; const toSequence = (parts, options) => { parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); let prefix = options.capture ? '' : '?:'; let positives = ''; let negatives = ''; let result; if (parts.positives.length) { positives = parts.positives.join('|'); } if (parts.negatives.length) { negatives = `-(${prefix}${parts.negatives.join('|')})`; } if (positives && negatives) { result = `${positives}|${negatives}`; } else { result = positives || negatives; } if (options.wrap) { return `(${prefix}${result})`; } return result; }; const toRange = (a, b, isNumbers, options) => { if (isNumbers) { return toRegexRange(a, b, { wrap: false, ...options }); } let start = String.fromCharCode(a); if (a === b) return start; let stop = String.fromCharCode(b); return `[${start}-${stop}]`; }; const toRegex = (start, end, options) => { if (Array.isArray(start)) { let wrap = options.wrap === true; let prefix = options.capture ? '' : '?:'; return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); } return toRegexRange(start, end, options); }; const rangeError = (...args) => { return new RangeError('Invalid range arguments: ' + util.inspect(...args)); }; const invalidRange = (start, end, options) => { if (options.strictRanges === true) throw rangeError([start, end]); return []; }; const invalidStep = (step, options) => { if (options.strictRanges === true) { throw new TypeError(`Expected step "${step}" to be a number`); } return []; }; const fillNumbers = (start, end, step = 1, options = {}) => { let a = Number(start); let b = Number(end); if (!Number.isInteger(a) || !Number.isInteger(b)) { if (options.strictRanges === true) throw rangeError([start, end]); return []; } // fix negative zero if (a === 0) a = 0; if (b === 0) b = 0; let descending = a > b; let startString = String(start); let endString = String(end); let stepString = String(step); step = Math.max(Math.abs(step), 1); let padded = zeros(startString) || zeros(endString) || zeros(stepString); let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; let toNumber = padded === false && stringify(start, end, options) === false; let format = options.transform || transform(toNumber); if (options.toRegex && step === 1) { return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); } let parts = { negatives: [], positives: [] }; let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); let range = []; let index = 0; while (descending ? a >= b : a <= b) { if (options.toRegex === true && step > 1) { push(a); } else { range.push(pad(format(a, index), maxLen, toNumber)); } a = descending ? a - step : a + step; index++; } if (options.toRegex === true) { return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options }); } return range; }; const fillLetters = (start, end, step = 1, options = {}) => { if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { return invalidRange(start, end, options); } let format = options.transform || (val => String.fromCharCode(val)); let a = `${start}`.charCodeAt(0); let b = `${end}`.charCodeAt(0); let descending = a > b; let min = Math.min(a, b); let max = Math.max(a, b); if (options.toRegex && step === 1) { return toRange(min, max, false, options); } let range = []; let index = 0; while (descending ? a >= b : a <= b) { range.push(format(a, index)); a = descending ? a - step : a + step; index++; } if (options.toRegex === true) { return toRegex(range, null, { wrap: false, options }); } return range; }; const fill = (start, end, step, options = {}) => { if (end == null && isValidValue(start)) { return [start]; } if (!isValidValue(start) || !isValidValue(end)) { return invalidRange(start, end, options); } if (typeof step === 'function') { return fill(start, end, 1, { transform: step }); } if (isObject(step)) { return fill(start, end, 0, step); } let opts = { ...options }; if (opts.capture === true) opts.wrap = true; step = step || opts.step || 1; if (!isNumber(step)) { if (step != null && !isObject(step)) return invalidStep(step, opts); return fill(start, end, 1, step); } if (isNumber(start) && isNumber(end)) { return fillNumbers(start, end, step, opts); } return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); }; module.exports = fill; /***/ }), /***/ 17268: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(35747).constants || __webpack_require__(27619) /***/ }), /***/ 70623: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {promisify} = __webpack_require__(31669); const fs = __webpack_require__(35747); const path = __webpack_require__(85622); const fastGlob = __webpack_require__(13294); const gitIgnore = __webpack_require__(15151); const slash = __webpack_require__(83859); const DEFAULT_IGNORE = [ '**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git' ]; const readFileP = promisify(fs.readFile); const mapGitIgnorePatternTo = base => ignore => { if (ignore.startsWith('!')) { return '!' + path.posix.join(base, ignore.slice(1)); } return path.posix.join(base, ignore); }; const parseGitIgnore = (content, options) => { const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); return content .split(/\r?\n/) .filter(Boolean) .filter(line => !line.startsWith('#')) .map(mapGitIgnorePatternTo(base)); }; const reduceIgnore = files => { const ignores = gitIgnore(); for (const file of files) { ignores.add(parseGitIgnore(file.content, { cwd: file.cwd, fileName: file.filePath })); } return ignores; }; const ensureAbsolutePathForCwd = (cwd, p) => { cwd = slash(cwd); if (path.isAbsolute(p)) { if (slash(p).startsWith(cwd)) { return p; } throw new Error(`Path ${p} is not in cwd ${cwd}`); } return path.join(cwd, p); }; const getIsIgnoredPredecate = (ignores, cwd) => { return p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); }; const getFile = async (file, cwd) => { const filePath = path.join(cwd, file); const content = await readFileP(filePath, 'utf8'); return { cwd, filePath, content }; }; const getFileSync = (file, cwd) => { const filePath = path.join(cwd, file); const content = fs.readFileSync(filePath, 'utf8'); return { cwd, filePath, content }; }; const normalizeOptions = ({ ignore = [], cwd = slash(process.cwd()) } = {}) => { return {ignore, cwd}; }; module.exports = async options => { options = normalizeOptions(options); const paths = await fastGlob('**/.gitignore', { ignore: DEFAULT_IGNORE.concat(options.ignore), cwd: options.cwd }); const files = await Promise.all(paths.map(file => getFile(file, options.cwd))); const ignores = reduceIgnore(files); return getIsIgnoredPredecate(ignores, options.cwd); }; module.exports.sync = options => { options = normalizeOptions(options); const paths = fastGlob.sync('**/.gitignore', { ignore: DEFAULT_IGNORE.concat(options.ignore), cwd: options.cwd }); const files = paths.map(file => getFileSync(file, options.cwd)); const ignores = reduceIgnore(files); return getIsIgnoredPredecate(ignores, options.cwd); }; /***/ }), /***/ 25839: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const fs = __webpack_require__(35747); const arrayUnion = __webpack_require__(93755); const merge2 = __webpack_require__(60155); const fastGlob = __webpack_require__(13294); const dirGlob = __webpack_require__(50367); const gitignore = __webpack_require__(70623); const {FilterStream, UniqueStream} = __webpack_require__(80438); const DEFAULT_FILTER = () => false; const isNegative = pattern => pattern[0] === '!'; const assertPatternsInput = patterns => { if (!patterns.every(pattern => typeof pattern === 'string')) { throw new TypeError('Patterns must be a string or an array of strings'); } }; const checkCwdOption = (options = {}) => { if (!options.cwd) { return; } let stat; try { stat = fs.statSync(options.cwd); } catch { return; } if (!stat.isDirectory()) { throw new Error('The `cwd` option must be a path to a directory'); } }; const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; const generateGlobTasks = (patterns, taskOptions) => { patterns = arrayUnion([].concat(patterns)); assertPatternsInput(patterns); checkCwdOption(taskOptions); const globTasks = []; taskOptions = { ignore: [], expandDirectories: true, ...taskOptions }; for (const [index, pattern] of patterns.entries()) { if (isNegative(pattern)) { continue; } const ignore = patterns .slice(index) .filter(pattern => isNegative(pattern)) .map(pattern => pattern.slice(1)); const options = { ...taskOptions, ignore: taskOptions.ignore.concat(ignore) }; globTasks.push({pattern, options}); } return globTasks; }; const globDirs = (task, fn) => { let options = {}; if (task.options.cwd) { options.cwd = task.options.cwd; } if (Array.isArray(task.options.expandDirectories)) { options = { ...options, files: task.options.expandDirectories }; } else if (typeof task.options.expandDirectories === 'object') { options = { ...options, ...task.options.expandDirectories }; } return fn(task.pattern, options); }; const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; const getFilterSync = options => { return options && options.gitignore ? gitignore.sync({cwd: options.cwd, ignore: options.ignore}) : DEFAULT_FILTER; }; const globToTask = task => glob => { const {options} = task; if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { options.ignore = dirGlob.sync(options.ignore); } return { pattern: glob, options }; }; module.exports = async (patterns, options) => { const globTasks = generateGlobTasks(patterns, options); const getFilter = async () => { return options && options.gitignore ? gitignore({cwd: options.cwd, ignore: options.ignore}) : DEFAULT_FILTER; }; const getTasks = async () => { const tasks = await Promise.all(globTasks.map(async task => { const globs = await getPattern(task, dirGlob); return Promise.all(globs.map(globToTask(task))); })); return arrayUnion(...tasks); }; const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options))); return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_))); }; module.exports.sync = (patterns, options) => { const globTasks = generateGlobTasks(patterns, options); const tasks = []; for (const task of globTasks) { const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); tasks.push(...newTask); } const filter = getFilterSync(options); let matches = []; for (const task of tasks) { matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); } return matches.filter(path_ => !filter(path_)); }; module.exports.stream = (patterns, options) => { const globTasks = generateGlobTasks(patterns, options); const tasks = []; for (const task of globTasks) { const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); tasks.push(...newTask); } const filter = getFilterSync(options); const filterStream = new FilterStream(p => !filter(p)); const uniqueStream = new UniqueStream(); return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options))) .pipe(filterStream) .pipe(uniqueStream); }; module.exports.generateGlobTasks = generateGlobTasks; module.exports.hasMagic = (patterns, options) => [] .concat(patterns) .some(pattern => fastGlob.isDynamicPattern(pattern, options)); module.exports.gitignore = gitignore; /***/ }), /***/ 80438: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Transform} = __webpack_require__(92413); class ObjectTransform extends Transform { constructor() { super({ objectMode: true }); } } class FilterStream extends ObjectTransform { constructor(filter) { super(); this._filter = filter; } _transform(data, encoding, callback) { if (this._filter(data)) { this.push(data); } callback(); } } class UniqueStream extends ObjectTransform { constructor() { super(); this._pushed = new Set(); } _transform(data, encoding, callback) { if (!this._pushed.has(data)) { this.push(data); this._pushed.add(data); } callback(); } } module.exports = { FilterStream, UniqueStream }; /***/ }), /***/ 36133: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(92337); function createRejection(error, ...beforeErrorGroups) { const promise = (async () => { if (error instanceof types_1.RequestError) { try { for (const hooks of beforeErrorGroups) { if (hooks) { for (const hook of hooks) { // eslint-disable-next-line no-await-in-loop error = await hook(error); } } } } catch (error_) { error = error_; } } throw error; })(); const returnPromise = () => promise; promise.json = returnPromise; promise.text = returnPromise; promise.buffer = returnPromise; promise.on = returnPromise; return promise; } exports.default = createRejection; /***/ }), /***/ 9291: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; 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" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const events_1 = __webpack_require__(28614); const is_1 = __webpack_require__(80657); const PCancelable = __webpack_require__(80341); const types_1 = __webpack_require__(92337); const parse_body_1 = __webpack_require__(28568); const core_1 = __webpack_require__(8178); const proxy_events_1 = __webpack_require__(94805); const get_buffer_1 = __webpack_require__(54992); const is_response_ok_1 = __webpack_require__(38141); const proxiedRequestEvents = [ 'request', 'response', 'redirect', 'uploadProgress', 'downloadProgress' ]; function asPromise(normalizedOptions) { let globalRequest; let globalResponse; const emitter = new events_1.EventEmitter(); const promise = new PCancelable((resolve, reject, onCancel) => { const makeRequest = (retryCount) => { const request = new core_1.default(undefined, normalizedOptions); request.retryCount = retryCount; request._noPipe = true; onCancel(() => request.destroy()); onCancel.shouldReject = false; onCancel(() => reject(new types_1.CancelError(request))); globalRequest = request; request.once('response', async (response) => { var _a; response.retryCount = retryCount; if (response.request.aborted) { // Canceled while downloading - will throw a `CancelError` or `TimeoutError` error return; } // Download body let rawBody; try { rawBody = await get_buffer_1.default(request); response.rawBody = rawBody; } catch (_b) { // The same error is caught below. // See request.once('error') return; } if (request._isAboutToError) { return; } // Parse body const contentEncoding = ((_a = response.headers['content-encoding']) !== null && _a !== void 0 ? _a : '').toLowerCase(); const isCompressed = ['gzip', 'deflate', 'br'].includes(contentEncoding); const { options } = request; if (isCompressed && !options.decompress) { response.body = rawBody; } else { try { response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding); } catch (error) { // Fallback to `utf8` response.body = rawBody.toString(); if (is_response_ok_1.isResponseOk(response)) { request._beforeError(error); return; } } } try { for (const [index, hook] of options.hooks.afterResponse.entries()) { // @ts-expect-error TS doesn't notice that CancelableRequest is a Promise // eslint-disable-next-line no-await-in-loop response = await hook(response, async (updatedOptions) => { const typedOptions = core_1.default.normalizeArguments(undefined, { ...updatedOptions, retry: { calculateDelay: () => 0 }, throwHttpErrors: false, resolveBodyOnly: false }, options); // Remove any further hooks for that request, because we'll call them anyway. // The loop continues. We don't want duplicates (asPromise recursion). typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index); for (const hook of typedOptions.hooks.beforeRetry) { // eslint-disable-next-line no-await-in-loop await hook(typedOptions); } const promise = asPromise(typedOptions); onCancel(() => { promise.catch(() => { }); promise.cancel(); }); return promise; }); } } catch (error) { request._beforeError(new types_1.RequestError(error.message, error, request)); return; } if (!is_response_ok_1.isResponseOk(response)) { request._beforeError(new types_1.HTTPError(response)); return; } globalResponse = response; resolve(request.options.resolveBodyOnly ? response.body : response); }); const onError = (error) => { if (promise.isCanceled) { return; } const { options } = request; if (error instanceof types_1.HTTPError && !options.throwHttpErrors) { const { response } = error; resolve(request.options.resolveBodyOnly ? response.body : response); return; } reject(error); }; request.once('error', onError); const previousBody = request.options.body; request.once('retry', (newRetryCount, error) => { var _a, _b; if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) { onError(error); return; } makeRequest(newRetryCount); }); proxy_events_1.default(request, emitter, proxiedRequestEvents); }; makeRequest(0); }); promise.on = (event, fn) => { emitter.on(event, fn); return promise; }; const shortcut = (responseType) => { const newPromise = (async () => { // Wait until downloading has ended await promise; const { options } = globalResponse.request; return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding); })(); Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise)); return newPromise; }; promise.json = () => { const { headers } = globalRequest.options; if (!globalRequest.writableFinished && headers.accept === undefined) { headers.accept = 'application/json'; } return shortcut('json'); }; promise.buffer = () => shortcut('buffer'); promise.text = () => shortcut('text'); return promise; } exports.default = asPromise; __exportStar(__webpack_require__(92337), exports); /***/ }), /***/ 37999: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(80657); const normalizeArguments = (options, defaults) => { if (is_1.default.null_(options.encoding)) { throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); } is_1.assert.any([is_1.default.string, is_1.default.undefined], options.encoding); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.resolveBodyOnly); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.methodRewriting); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.isStream); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.responseType); // `options.responseType` if (options.responseType === undefined) { options.responseType = 'text'; } // `options.retry` const { retry } = options; if (defaults) { options.retry = { ...defaults.retry }; } else { options.retry = { calculateDelay: retryObject => retryObject.computedValue, limit: 0, methods: [], statusCodes: [], errorCodes: [], maxRetryAfter: undefined }; } if (is_1.default.object(retry)) { options.retry = { ...options.retry, ...retry }; options.retry.methods = [...new Set(options.retry.methods.map(method => method.toUpperCase()))]; options.retry.statusCodes = [...new Set(options.retry.statusCodes)]; options.retry.errorCodes = [...new Set(options.retry.errorCodes)]; } else if (is_1.default.number(retry)) { options.retry.limit = retry; } if (is_1.default.undefined(options.retry.maxRetryAfter)) { options.retry.maxRetryAfter = Math.min( // TypeScript is not smart enough to handle `.filter(x => is.number(x))`. // eslint-disable-next-line unicorn/no-fn-reference-in-iterator ...[options.timeout.request, options.timeout.connect].filter(is_1.default.number)); } // `options.pagination` if (is_1.default.object(options.pagination)) { if (defaults) { options.pagination = { ...defaults.pagination, ...options.pagination }; } const { pagination } = options; if (!is_1.default.function_(pagination.transform)) { throw new Error('`options.pagination.transform` must be implemented'); } if (!is_1.default.function_(pagination.shouldContinue)) { throw new Error('`options.pagination.shouldContinue` must be implemented'); } if (!is_1.default.function_(pagination.filter)) { throw new TypeError('`options.pagination.filter` must be implemented'); } if (!is_1.default.function_(pagination.paginate)) { throw new Error('`options.pagination.paginate` must be implemented'); } } // JSON mode if (options.responseType === 'json' && options.headers.accept === undefined) { options.headers.accept = 'application/json'; } return options; }; exports.default = normalizeArguments; /***/ }), /***/ 28568: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const types_1 = __webpack_require__(92337); const parseBody = (response, responseType, parseJson, encoding) => { const { rawBody } = response; try { if (responseType === 'text') { return rawBody.toString(encoding); } if (responseType === 'json') { return rawBody.length === 0 ? '' : parseJson(rawBody.toString()); } if (responseType === 'buffer') { return rawBody; } throw new types_1.ParseError({ message: `Unknown body type '${responseType}'`, name: 'Error' }, response); } catch (error) { throw new types_1.ParseError(error, response); } }; exports.default = parseBody; /***/ }), /***/ 92337: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; 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" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CancelError = exports.ParseError = void 0; const core_1 = __webpack_require__(8178); /** An error to be thrown when server response code is 2xx, and parsing body fails. Includes a `response` property. */ class ParseError extends core_1.RequestError { constructor(error, response) { const { options } = response.request; super(`${error.message} in "${options.url.toString()}"`, error, response.request); this.name = 'ParseError'; } } exports.ParseError = ParseError; /** An error to be thrown when the request is aborted with `.cancel()`. */ class CancelError extends core_1.RequestError { constructor(request) { super('Promise was canceled', {}, request); this.name = 'CancelError'; } get isCanceled() { return true; } } exports.CancelError = CancelError; __exportStar(__webpack_require__(8178), exports); /***/ }), /***/ 76582: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.retryAfterStatusCodes = void 0; exports.retryAfterStatusCodes = new Set([413, 429, 503]); const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) => { if (attemptCount > retryOptions.limit) { return 0; } const hasMethod = retryOptions.methods.includes(error.options.method); const hasErrorCode = retryOptions.errorCodes.includes(error.code); const hasStatusCode = error.response && retryOptions.statusCodes.includes(error.response.statusCode); if (!hasMethod || (!hasErrorCode && !hasStatusCode)) { return 0; } if (error.response) { if (retryAfter) { if (retryOptions.maxRetryAfter === undefined || retryAfter > retryOptions.maxRetryAfter) { return 0; } return retryAfter; } if (error.response.statusCode === 413) { return 0; } } const noise = Math.random() * 100; return ((2 ** (attemptCount - 1)) * 1000) + noise; }; exports.default = calculateRetryDelay; /***/ }), /***/ 8178: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0; const util_1 = __webpack_require__(31669); const stream_1 = __webpack_require__(92413); const fs_1 = __webpack_require__(35747); const url_1 = __webpack_require__(78835); const http = __webpack_require__(98605); const http_1 = __webpack_require__(98605); const https = __webpack_require__(57211); const http_timer_1 = __webpack_require__(60081); const cacheable_lookup_1 = __webpack_require__(78397); const CacheableRequest = __webpack_require__(93481); const decompressResponse = __webpack_require__(10346); // @ts-expect-error Missing types const http2wrapper = __webpack_require__(69758); const lowercaseKeys = __webpack_require__(25989); const is_1 = __webpack_require__(80657); const get_body_size_1 = __webpack_require__(92425); const is_form_data_1 = __webpack_require__(16721); const proxy_events_1 = __webpack_require__(94805); const timed_out_1 = __webpack_require__(14834); const url_to_options_1 = __webpack_require__(96959); const options_to_url_1 = __webpack_require__(30186); const weakable_map_1 = __webpack_require__(57440); const get_buffer_1 = __webpack_require__(54992); const dns_ip_version_1 = __webpack_require__(90354); const is_response_ok_1 = __webpack_require__(38141); const deprecation_warning_1 = __webpack_require__(45241); const normalize_arguments_1 = __webpack_require__(37999); const calculate_retry_delay_1 = __webpack_require__(76582); let globalDnsCache; const kRequest = Symbol('request'); const kResponse = Symbol('response'); const kResponseSize = Symbol('responseSize'); const kDownloadedSize = Symbol('downloadedSize'); const kBodySize = Symbol('bodySize'); const kUploadedSize = Symbol('uploadedSize'); const kServerResponsesPiped = Symbol('serverResponsesPiped'); const kUnproxyEvents = Symbol('unproxyEvents'); const kIsFromCache = Symbol('isFromCache'); const kCancelTimeouts = Symbol('cancelTimeouts'); const kStartedReading = Symbol('startedReading'); const kStopReading = Symbol('stopReading'); const kTriggerRead = Symbol('triggerRead'); const kBody = Symbol('body'); const kJobs = Symbol('jobs'); const kOriginalResponse = Symbol('originalResponse'); const kRetryTimeout = Symbol('retryTimeout'); exports.kIsNormalizedAlready = Symbol('isNormalizedAlready'); const supportsBrotli = is_1.default.string(process.versions.brotli); exports.withoutBody = new Set(['GET', 'HEAD']); exports.knownHookEvents = [ 'init', 'beforeRequest', 'beforeRedirect', 'beforeError', 'beforeRetry', // Promise-Only 'afterResponse' ]; function validateSearchParameters(searchParameters) { // eslint-disable-next-line guard-for-in for (const key in searchParameters) { const value = searchParameters[key]; if (!is_1.default.string(value) && !is_1.default.number(value) && !is_1.default.boolean(value) && !is_1.default.null_(value) && !is_1.default.undefined(value)) { throw new TypeError(`The \`searchParams\` value '${String(value)}' must be a string, number, boolean or null`); } } } function isClientRequest(clientRequest) { return is_1.default.object(clientRequest) && !('statusCode' in clientRequest); } const cacheableStore = new weakable_map_1.default(); const waitForOpenFile = async (file) => new Promise((resolve, reject) => { const onError = (error) => { reject(error); }; // Node.js 12 has incomplete types if (!file.pending) { resolve(); } file.once('error', onError); file.once('ready', () => { file.off('error', onError); resolve(); }); }); const redirectCodes = new Set([300, 301, 302, 303, 304, 307, 308]); const nonEnumerableProperties = [ 'context', 'body', 'json', 'form' ]; exports.setNonEnumerableProperties = (sources, to) => { // Non enumerable properties shall not be merged const properties = {}; for (const source of sources) { if (!source) { continue; } for (const name of nonEnumerableProperties) { if (!(name in source)) { continue; } properties[name] = { writable: true, configurable: true, enumerable: false, // @ts-expect-error TS doesn't see the check above value: source[name] }; } } Object.defineProperties(to, properties); }; /** An error to be thrown when a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. */ class RequestError extends Error { constructor(message, error, self) { var _a; super(message); Error.captureStackTrace(this, this.constructor); this.name = 'RequestError'; this.code = error.code; if (self instanceof Request) { Object.defineProperty(this, 'request', { enumerable: false, value: self }); Object.defineProperty(this, 'response', { enumerable: false, value: self[kResponse] }); Object.defineProperty(this, 'options', { // This fails because of TS 3.7.2 useDefineForClassFields // Ref: https://github.com/microsoft/TypeScript/issues/34972 enumerable: false, value: self.options }); } else { Object.defineProperty(this, 'options', { // This fails because of TS 3.7.2 useDefineForClassFields // Ref: https://github.com/microsoft/TypeScript/issues/34972 enumerable: false, value: self }); } this.timings = (_a = this.request) === null || _a === void 0 ? void 0 : _a.timings; // Recover the original stacktrace if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) { const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse(); const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse(); // Remove duplicated traces while (errorStackTrace.length !== 0 && errorStackTrace[0] === thisStackTrace[0]) { thisStackTrace.shift(); } this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join('\n')}${errorStackTrace.reverse().join('\n')}`; } } } exports.RequestError = RequestError; /** An error to be thrown when the server redirects you more than ten times. Includes a `response` property. */ class MaxRedirectsError extends RequestError { constructor(request) { super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); this.name = 'MaxRedirectsError'; } } exports.MaxRedirectsError = MaxRedirectsError; /** An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304. Includes a `response` property. */ class HTTPError extends RequestError { constructor(response) { super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); this.name = 'HTTPError'; } } exports.HTTPError = HTTPError; /** An error to be thrown when a cache method fails. For example, if the database goes down or there's a filesystem error. */ class CacheError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'CacheError'; } } exports.CacheError = CacheError; /** An error to be thrown when the request body is a stream and an error occurs while reading from that stream. */ class UploadError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'UploadError'; } } exports.UploadError = UploadError; /** An error to be thrown when the request is aborted due to a timeout. Includes an `event` and `timings` property. */ class TimeoutError extends RequestError { constructor(error, timings, request) { super(error.message, error, request); this.name = 'TimeoutError'; this.event = error.event; this.timings = timings; } } exports.TimeoutError = TimeoutError; /** An error to be thrown when reading from response stream fails. */ class ReadError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'ReadError'; } } exports.ReadError = ReadError; /** An error to be thrown when given an unsupported protocol. */ class UnsupportedProtocolError extends RequestError { constructor(options) { super(`Unsupported protocol "${options.url.protocol}"`, {}, options); this.name = 'UnsupportedProtocolError'; } } exports.UnsupportedProtocolError = UnsupportedProtocolError; const proxiedRequestEvents = [ 'socket', 'connect', 'continue', 'information', 'upgrade', 'timeout' ]; class Request extends stream_1.Duplex { constructor(url, options = {}, defaults) { super({ // This must be false, to enable throwing after destroy // It is used for retry logic in Promise API autoDestroy: false, // It needs to be zero because we're just proxying the data to another stream highWaterMark: 0 }); this[kDownloadedSize] = 0; this[kUploadedSize] = 0; this.requestInitialized = false; this[kServerResponsesPiped] = new Set(); this.redirects = []; this[kStopReading] = false; this[kTriggerRead] = false; this[kJobs] = []; this.retryCount = 0; // TODO: Remove this when targeting Node.js >= 12 this._progressCallbacks = []; const unlockWrite = () => this._unlockWrite(); const lockWrite = () => this._lockWrite(); this.on('pipe', (source) => { source.prependListener('data', unlockWrite); source.on('data', lockWrite); source.prependListener('end', unlockWrite); source.on('end', lockWrite); }); this.on('unpipe', (source) => { source.off('data', unlockWrite); source.off('data', lockWrite); source.off('end', unlockWrite); source.off('end', lockWrite); }); this.on('pipe', source => { if (source instanceof http_1.IncomingMessage) { this.options.headers = { ...source.headers, ...this.options.headers }; } }); const { json, body, form } = options; if (json || body || form) { this._lockWrite(); } if (exports.kIsNormalizedAlready in options) { this.options = options; } else { try { // @ts-expect-error Common TypeScript bug saying that `this.constructor` is not accessible this.options = this.constructor.normalizeArguments(url, options, defaults); } catch (error) { // TODO: Move this to `_destroy()` if (is_1.default.nodeStream(options.body)) { options.body.destroy(); } this.destroy(error); return; } } (async () => { var _a; try { if (this.options.body instanceof fs_1.ReadStream) { await waitForOpenFile(this.options.body); } const { url: normalizedURL } = this.options; if (!normalizedURL) { throw new TypeError('Missing `url` property'); } this.requestUrl = normalizedURL.toString(); decodeURI(this.requestUrl); await this._finalizeBody(); await this._makeRequest(); if (this.destroyed) { (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroy(); return; } // Queued writes etc. for (const job of this[kJobs]) { job(); } // Prevent memory leak this[kJobs].length = 0; this.requestInitialized = true; } catch (error) { if (error instanceof RequestError) { this._beforeError(error); return; } // This is a workaround for https://github.com/nodejs/node/issues/33335 if (!this.destroyed) { this.destroy(error); } } })(); } static normalizeArguments(url, options, defaults) { var _a, _b, _c, _d, _e; const rawOptions = options; if (is_1.default.object(url) && !is_1.default.urlInstance(url)) { options = { ...defaults, ...url, ...options }; } else { if (url && options && options.url !== undefined) { throw new TypeError('The `url` option is mutually exclusive with the `input` argument'); } options = { ...defaults, ...options }; if (url !== undefined) { options.url = url; } if (is_1.default.urlInstance(options.url)) { options.url = new url_1.URL(options.url.toString()); } } // TODO: Deprecate URL options in Got 12. // Support extend-specific options if (options.cache === false) { options.cache = undefined; } if (options.dnsCache === false) { options.dnsCache = undefined; } // Nice type assertions is_1.assert.any([is_1.default.string, is_1.default.undefined], options.method); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.headers); is_1.assert.any([is_1.default.string, is_1.default.urlInstance, is_1.default.undefined], options.prefixUrl); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cookieJar); is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.searchParams); is_1.assert.any([is_1.default.object, is_1.default.string, is_1.default.undefined], options.cache); is_1.assert.any([is_1.default.object, is_1.default.number, is_1.default.undefined], options.timeout); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.context); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.hooks); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.decompress); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.ignoreInvalidCookies); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.followRedirect); is_1.assert.any([is_1.default.number, is_1.default.undefined], options.maxRedirects); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.throwHttpErrors); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.http2); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.allowGetBody); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.localAddress); is_1.assert.any([dns_ip_version_1.isDnsLookupIpVersion, is_1.default.undefined], options.dnsLookupIpVersion); is_1.assert.any([is_1.default.object, is_1.default.undefined], options.https); is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.rejectUnauthorized); if (options.https) { is_1.assert.any([is_1.default.boolean, is_1.default.undefined], options.https.rejectUnauthorized); is_1.assert.any([is_1.default.function_, is_1.default.undefined], options.https.checkServerIdentity); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificateAuthority); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.key); is_1.assert.any([is_1.default.string, is_1.default.object, is_1.default.array, is_1.default.undefined], options.https.certificate); is_1.assert.any([is_1.default.string, is_1.default.undefined], options.https.passphrase); is_1.assert.any([is_1.default.string, is_1.default.buffer, is_1.default.array, is_1.default.undefined], options.https.pfx); } is_1.assert.any([is_1.default.object, is_1.default.undefined], options.cacheOptions); // `options.method` if (is_1.default.string(options.method)) { options.method = options.method.toUpperCase(); } else { options.method = 'GET'; } // `options.headers` if (options.headers === (defaults === null || defaults === void 0 ? void 0 : defaults.headers)) { options.headers = { ...options.headers }; } else { options.headers = lowercaseKeys({ ...(defaults === null || defaults === void 0 ? void 0 : defaults.headers), ...options.headers }); } // Disallow legacy `url.Url` if ('slashes' in options) { throw new TypeError('The legacy `url.Url` has been deprecated. Use `URL` instead.'); } // `options.auth` if ('auth' in options) { throw new TypeError('Parameter `auth` is deprecated. Use `username` / `password` instead.'); } // `options.searchParams` if ('searchParams' in options) { if (options.searchParams && options.searchParams !== (defaults === null || defaults === void 0 ? void 0 : defaults.searchParams)) { let searchParameters; if (is_1.default.string(options.searchParams) || (options.searchParams instanceof url_1.URLSearchParams)) { searchParameters = new url_1.URLSearchParams(options.searchParams); } else { validateSearchParameters(options.searchParams); searchParameters = new url_1.URLSearchParams(); // eslint-disable-next-line guard-for-in for (const key in options.searchParams) { const value = options.searchParams[key]; if (value === null) { searchParameters.append(key, ''); } else if (value !== undefined) { searchParameters.append(key, value); } } } // `normalizeArguments()` is also used to merge options (_a = defaults === null || defaults === void 0 ? void 0 : defaults.searchParams) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => { // Only use default if one isn't already defined if (!searchParameters.has(key)) { searchParameters.append(key, value); } }); options.searchParams = searchParameters; } } // `options.username` & `options.password` options.username = (_b = options.username) !== null && _b !== void 0 ? _b : ''; options.password = (_c = options.password) !== null && _c !== void 0 ? _c : ''; // `options.prefixUrl` & `options.url` if (is_1.default.undefined(options.prefixUrl)) { options.prefixUrl = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.prefixUrl) !== null && _d !== void 0 ? _d : ''; } else { options.prefixUrl = options.prefixUrl.toString(); if (options.prefixUrl !== '' && !options.prefixUrl.endsWith('/')) { options.prefixUrl += '/'; } } if (is_1.default.string(options.url)) { if (options.url.startsWith('/')) { throw new Error('`input` must not start with a slash when using `prefixUrl`'); } options.url = options_to_url_1.default(options.prefixUrl + options.url, options); } else if ((is_1.default.undefined(options.url) && options.prefixUrl !== '') || options.protocol) { options.url = options_to_url_1.default(options.prefixUrl, options); } if (options.url) { if ('port' in options) { delete options.port; } // Make it possible to change `options.prefixUrl` let { prefixUrl } = options; Object.defineProperty(options, 'prefixUrl', { set: (value) => { const url = options.url; if (!url.href.startsWith(value)) { throw new Error(`Cannot change \`prefixUrl\` from ${prefixUrl} to ${value}: ${url.href}`); } options.url = new url_1.URL(value + url.href.slice(prefixUrl.length)); prefixUrl = value; }, get: () => prefixUrl }); // Support UNIX sockets let { protocol } = options.url; if (protocol === 'unix:') { protocol = 'http:'; options.url = new url_1.URL(`http://unix${options.url.pathname}${options.url.search}`); } // Set search params if (options.searchParams) { // eslint-disable-next-line @typescript-eslint/no-base-to-string options.url.search = options.searchParams.toString(); } // Protocol check if (protocol !== 'http:' && protocol !== 'https:') { throw new UnsupportedProtocolError(options); } // Update `username` if (options.username === '') { options.username = options.url.username; } else { options.url.username = options.username; } // Update `password` if (options.password === '') { options.password = options.url.password; } else { options.url.password = options.password; } } // `options.cookieJar` const { cookieJar } = options; if (cookieJar) { let { setCookie, getCookieString } = cookieJar; is_1.assert.function_(setCookie); is_1.assert.function_(getCookieString); /* istanbul ignore next: Horrible `tough-cookie` v3 check */ if (setCookie.length === 4 && getCookieString.length === 0) { setCookie = util_1.promisify(setCookie.bind(options.cookieJar)); getCookieString = util_1.promisify(getCookieString.bind(options.cookieJar)); options.cookieJar = { setCookie, getCookieString: getCookieString }; } } // `options.cache` const { cache } = options; if (cache) { if (!cacheableStore.has(cache)) { cacheableStore.set(cache, new CacheableRequest(((requestOptions, handler) => { const result = requestOptions[kRequest](requestOptions, handler); // TODO: remove this when `cacheable-request` supports async request functions. if (is_1.default.promise(result)) { // @ts-expect-error // We only need to implement the error handler in order to support HTTP2 caching. // The result will be a promise anyway. result.once = (event, handler) => { if (event === 'error') { result.catch(handler); } else if (event === 'abort') { // The empty catch is needed here in case when // it rejects before it's `await`ed in `_makeRequest`. (async () => { try { const request = (await result); request.once('abort', handler); } catch (_a) { } })(); } else { /* istanbul ignore next: safety check */ throw new Error(`Unknown HTTP2 promise event: ${event}`); } return result; }; } return result; }), cache)); } } // `options.cacheOptions` options.cacheOptions = { ...options.cacheOptions }; // `options.dnsCache` if (options.dnsCache === true) { if (!globalDnsCache) { globalDnsCache = new cacheable_lookup_1.default(); } options.dnsCache = globalDnsCache; } else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) { throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is_1.default(options.dnsCache)}`); } // `options.timeout` if (is_1.default.number(options.timeout)) { options.timeout = { request: options.timeout }; } else if (defaults && options.timeout !== defaults.timeout) { options.timeout = { ...defaults.timeout, ...options.timeout }; } else { options.timeout = { ...options.timeout }; } // `options.context` if (!options.context) { options.context = {}; } // `options.hooks` const areHooksDefault = options.hooks === (defaults === null || defaults === void 0 ? void 0 : defaults.hooks); options.hooks = { ...options.hooks }; for (const event of exports.knownHookEvents) { if (event in options.hooks) { if (is_1.default.array(options.hooks[event])) { // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 options.hooks[event] = [...options.hooks[event]]; } else { throw new TypeError(`Parameter \`${event}\` must be an Array, got ${is_1.default(options.hooks[event])}`); } } else { options.hooks[event] = []; } } if (defaults && !areHooksDefault) { for (const event of exports.knownHookEvents) { const defaultHooks = defaults.hooks[event]; if (defaultHooks.length > 0) { // See https://github.com/microsoft/TypeScript/issues/31445#issuecomment-576929044 options.hooks[event] = [ ...defaults.hooks[event], ...options.hooks[event] ]; } } } // DNS options if ('family' in options) { deprecation_warning_1.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'); } // HTTPS options if (defaults === null || defaults === void 0 ? void 0 : defaults.https) { options.https = { ...defaults.https, ...options.https }; } if ('rejectUnauthorized' in options) { deprecation_warning_1.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'); } if ('checkServerIdentity' in options) { deprecation_warning_1.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'); } if ('ca' in options) { deprecation_warning_1.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'); } if ('key' in options) { deprecation_warning_1.default('"options.key" was never documented, please use "options.https.key"'); } if ('cert' in options) { deprecation_warning_1.default('"options.cert" was never documented, please use "options.https.certificate"'); } if ('passphrase' in options) { deprecation_warning_1.default('"options.passphrase" was never documented, please use "options.https.passphrase"'); } if ('pfx' in options) { deprecation_warning_1.default('"options.pfx" was never documented, please use "options.https.pfx"'); } // Other options if ('followRedirects' in options) { throw new TypeError('The `followRedirects` option does not exist. Use `followRedirect` instead.'); } if (options.agent) { for (const key in options.agent) { if (key !== 'http' && key !== 'https' && key !== 'http2') { throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${key}\``); } } } options.maxRedirects = (_e = options.maxRedirects) !== null && _e !== void 0 ? _e : 0; // Set non-enumerable properties exports.setNonEnumerableProperties([defaults, rawOptions], options); return normalize_arguments_1.default(options, defaults); } _lockWrite() { const onLockedWrite = () => { throw new TypeError('The payload has been already provided'); }; this.write = onLockedWrite; this.end = onLockedWrite; } _unlockWrite() { this.write = super.write; this.end = super.end; } async _finalizeBody() { const { options } = this; const { headers } = options; const isForm = !is_1.default.undefined(options.form); const isJSON = !is_1.default.undefined(options.json); const isBody = !is_1.default.undefined(options.body); const hasPayload = isForm || isJSON || isBody; const cannotHaveBody = exports.withoutBody.has(options.method) && !(options.method === 'GET' && options.allowGetBody); this._cannotHaveBody = cannotHaveBody; if (hasPayload) { if (cannotHaveBody) { throw new TypeError(`The \`${options.method}\` method cannot be used with a body`); } if ([isBody, isForm, isJSON].filter(isTrue => isTrue).length > 1) { throw new TypeError('The `body`, `json` and `form` options are mutually exclusive'); } if (isBody && !(options.body instanceof stream_1.Readable) && !is_1.default.string(options.body) && !is_1.default.buffer(options.body) && !is_form_data_1.default(options.body)) { throw new TypeError('The `body` option must be a stream.Readable, string or Buffer'); } if (isForm && !is_1.default.object(options.form)) { throw new TypeError('The `form` option must be an Object'); } { // Serialize body const noContentType = !is_1.default.string(headers['content-type']); if (isBody) { // Special case for https://github.com/form-data/form-data if (is_form_data_1.default(options.body) && noContentType) { headers['content-type'] = `multipart/form-data; boundary=${options.body.getBoundary()}`; } this[kBody] = options.body; } else if (isForm) { if (noContentType) { headers['content-type'] = 'application/x-www-form-urlencoded'; } this[kBody] = (new url_1.URLSearchParams(options.form)).toString(); } else { if (noContentType) { headers['content-type'] = 'application/json'; } this[kBody] = options.stringifyJson(options.json); } const uploadBodySize = await get_body_size_1.default(this[kBody], options.headers); // See https://tools.ietf.org/html/rfc7230#section-3.3.2 // A user agent SHOULD send a Content-Length in a request message when // no Transfer-Encoding is sent and the request method defines a meaning // for an enclosed payload body. For example, a Content-Length header // field is normally sent in a POST request even when the value is 0 // (indicating an empty payload body). A user agent SHOULD NOT send a // Content-Length header field when the request message does not contain // a payload body and the method semantics do not anticipate such a // body. if (is_1.default.undefined(headers['content-length']) && is_1.default.undefined(headers['transfer-encoding'])) { if (!cannotHaveBody && !is_1.default.undefined(uploadBodySize)) { headers['content-length'] = String(uploadBodySize); } } } } else if (cannotHaveBody) { this._lockWrite(); } else { this._unlockWrite(); } this[kBodySize] = Number(headers['content-length']) || undefined; } async _onResponseBase(response) { const { options } = this; const { url } = options; this[kOriginalResponse] = response; if (options.decompress) { response = decompressResponse(response); } const statusCode = response.statusCode; const typedResponse = response; typedResponse.statusMessage = typedResponse.statusMessage ? typedResponse.statusMessage : http.STATUS_CODES[statusCode]; typedResponse.url = options.url.toString(); typedResponse.requestUrl = this.requestUrl; typedResponse.redirectUrls = this.redirects; typedResponse.request = this; typedResponse.isFromCache = response.fromCache || false; typedResponse.ip = this.ip; typedResponse.retryCount = this.retryCount; this[kIsFromCache] = typedResponse.isFromCache; this[kResponseSize] = Number(response.headers['content-length']) || undefined; this[kResponse] = response; response.once('end', () => { this[kResponseSize] = this[kDownloadedSize]; this.emit('downloadProgress', this.downloadProgress); }); response.once('error', (error) => { // Force clean-up, because some packages don't do this. // TODO: Fix decompress-response response.destroy(); this._beforeError(new ReadError(error, this)); }); response.once('aborted', () => { this._beforeError(new ReadError({ name: 'Error', message: 'The server aborted pending request', code: 'ECONNRESET' }, this)); }); this.emit('downloadProgress', this.downloadProgress); const rawCookies = response.headers['set-cookie']; if (is_1.default.object(options.cookieJar) && rawCookies) { let promises = rawCookies.map(async (rawCookie) => options.cookieJar.setCookie(rawCookie, url.toString())); if (options.ignoreInvalidCookies) { promises = promises.map(async (p) => p.catch(() => { })); } try { await Promise.all(promises); } catch (error) { this._beforeError(error); return; } } if (options.followRedirect && response.headers.location && redirectCodes.has(statusCode)) { // We're being redirected, we don't care about the response. // It'd be best to abort the request, but we can't because // we would have to sacrifice the TCP connection. We don't want that. response.resume(); if (this[kRequest]) { this[kCancelTimeouts](); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete this[kRequest]; this[kUnproxyEvents](); } const shouldBeGet = statusCode === 303 && options.method !== 'GET' && options.method !== 'HEAD'; if (shouldBeGet || !options.methodRewriting) { // Server responded with "see other", indicating that the resource exists at another location, // and the client should request it from that location via GET or HEAD. options.method = 'GET'; if ('body' in options) { delete options.body; } if ('json' in options) { delete options.json; } if ('form' in options) { delete options.form; } this[kBody] = undefined; delete options.headers['content-length']; } if (this.redirects.length >= options.maxRedirects) { this._beforeError(new MaxRedirectsError(this)); return; } try { // Do not remove. See https://github.com/sindresorhus/got/pull/214 const redirectBuffer = Buffer.from(response.headers.location, 'binary').toString(); // Handles invalid URLs. See https://github.com/sindresorhus/got/issues/604 const redirectUrl = new url_1.URL(redirectBuffer, url); const redirectString = redirectUrl.toString(); decodeURI(redirectString); // Redirecting to a different site, clear sensitive data. if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { if ('host' in options.headers) { delete options.headers.host; } if ('cookie' in options.headers) { delete options.headers.cookie; } if ('authorization' in options.headers) { delete options.headers.authorization; } if (options.username || options.password) { options.username = ''; options.password = ''; } } else { redirectUrl.username = options.username; redirectUrl.password = options.password; } this.redirects.push(redirectString); options.url = redirectUrl; for (const hook of options.hooks.beforeRedirect) { // eslint-disable-next-line no-await-in-loop await hook(options, typedResponse); } this.emit('redirect', typedResponse, options); await this._makeRequest(); } catch (error) { this._beforeError(error); return; } return; } if (options.isStream && options.throwHttpErrors && !is_response_ok_1.isResponseOk(typedResponse)) { this._beforeError(new HTTPError(typedResponse)); return; } response.on('readable', () => { if (this[kTriggerRead]) { this._read(); } }); this.on('resume', () => { response.resume(); }); this.on('pause', () => { response.pause(); }); response.once('end', () => { this.push(null); }); this.emit('response', response); for (const destination of this[kServerResponsesPiped]) { if (destination.headersSent) { continue; } // eslint-disable-next-line guard-for-in for (const key in response.headers) { const isAllowed = options.decompress ? key !== 'content-encoding' : true; const value = response.headers[key]; if (isAllowed) { destination.setHeader(key, value); } } destination.statusCode = statusCode; } } async _onResponse(response) { try { await this._onResponseBase(response); } catch (error) { /* istanbul ignore next: better safe than sorry */ this._beforeError(error); } } _onRequest(request) { const { options } = this; const { timeout, url } = options; http_timer_1.default(request); this[kCancelTimeouts] = timed_out_1.default(request, timeout, url); const responseEventName = options.cache ? 'cacheableResponse' : 'response'; request.once(responseEventName, (response) => { void this._onResponse(response); }); request.once('error', (error) => { var _a; // Force clean-up, because some packages (e.g. nock) don't do this. request.destroy(); // Node.js <= 12.18.2 mistakenly emits the response `end` first. (_a = request.res) === null || _a === void 0 ? void 0 : _a.removeAllListeners('end'); error = error instanceof timed_out_1.TimeoutError ? new TimeoutError(error, this.timings, this) : new RequestError(error.message, error, this); this._beforeError(error); }); this[kUnproxyEvents] = proxy_events_1.default(request, this, proxiedRequestEvents); this[kRequest] = request; this.emit('uploadProgress', this.uploadProgress); // Send body const body = this[kBody]; const currentRequest = this.redirects.length === 0 ? this : request; if (is_1.default.nodeStream(body)) { body.pipe(currentRequest); body.once('error', (error) => { this._beforeError(new UploadError(error, this)); }); } else { this._unlockWrite(); if (!is_1.default.undefined(body)) { this._writeRequest(body, undefined, () => { }); currentRequest.end(); this._lockWrite(); } else if (this._cannotHaveBody || this._noPipe) { currentRequest.end(); this._lockWrite(); } } this.emit('request', request); } async _createCacheableRequest(url, options) { return new Promise((resolve, reject) => { // TODO: Remove `utils/url-to-options.ts` when `cacheable-request` is fixed Object.assign(options, url_to_options_1.default(url)); // `http-cache-semantics` checks this // TODO: Fix this ignore. // @ts-expect-error delete options.url; let request; // This is ugly const cacheRequest = cacheableStore.get(options.cache)(options, async (response) => { // TODO: Fix `cacheable-response` response._readableState.autoDestroy = false; if (request) { (await request).emit('cacheableResponse', response); } resolve(response); }); // Restore options options.url = url; cacheRequest.once('error', reject); cacheRequest.once('request', async (requestOrPromise) => { request = requestOrPromise; resolve(request); }); }); } async _makeRequest() { var _a, _b, _c, _d, _e; const { options } = this; const { headers } = options; for (const key in headers) { if (is_1.default.undefined(headers[key])) { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete headers[key]; } else if (is_1.default.null_(headers[key])) { throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${key}\` header`); } } if (options.decompress && is_1.default.undefined(headers['accept-encoding'])) { headers['accept-encoding'] = supportsBrotli ? 'gzip, deflate, br' : 'gzip, deflate'; } // Set cookies if (options.cookieJar) { const cookieString = await options.cookieJar.getCookieString(options.url.toString()); if (is_1.default.nonEmptyString(cookieString)) { options.headers.cookie = cookieString; } } for (const hook of options.hooks.beforeRequest) { // eslint-disable-next-line no-await-in-loop const result = await hook(options); if (!is_1.default.undefined(result)) { // @ts-expect-error Skip the type mismatch to support abstract responses options.request = () => result; break; } } if (options.body && this[kBody] !== options.body) { this[kBody] = options.body; } const { agent, request, timeout, url } = options; if (options.dnsCache && !('lookup' in options)) { options.lookup = options.dnsCache.lookup; } // UNIX sockets if (url.hostname === 'unix') { const matches = /(?.+?):(?.+)/.exec(`${url.pathname}${url.search}`); if (matches === null || matches === void 0 ? void 0 : matches.groups) { const { socketPath, path } = matches.groups; Object.assign(options, { socketPath, path, host: '' }); } } const isHttps = url.protocol === 'https:'; // Fallback function let fallbackFn; if (options.http2) { fallbackFn = http2wrapper.auto; } else { fallbackFn = isHttps ? https.request : http.request; } const realFn = (_a = options.request) !== null && _a !== void 0 ? _a : fallbackFn; // Cache support const fn = options.cache ? this._createCacheableRequest : realFn; // Pass an agent directly when HTTP2 is disabled if (agent && !options.http2) { options.agent = agent[isHttps ? 'https' : 'http']; } // Prepare plain HTTP request options options[kRequest] = realFn; delete options.request; // TODO: Fix this ignore. // @ts-expect-error delete options.timeout; const requestOptions = options; requestOptions.shared = (_b = options.cacheOptions) === null || _b === void 0 ? void 0 : _b.shared; requestOptions.cacheHeuristic = (_c = options.cacheOptions) === null || _c === void 0 ? void 0 : _c.cacheHeuristic; requestOptions.immutableMinTimeToLive = (_d = options.cacheOptions) === null || _d === void 0 ? void 0 : _d.immutableMinTimeToLive; requestOptions.ignoreCargoCult = (_e = options.cacheOptions) === null || _e === void 0 ? void 0 : _e.ignoreCargoCult; // If `dnsLookupIpVersion` is not present do not override `family` if (options.dnsLookupIpVersion !== undefined) { try { requestOptions.family = dns_ip_version_1.dnsLookupIpVersionToFamily(options.dnsLookupIpVersion); } catch (_f) { throw new Error('Invalid `dnsLookupIpVersion` option value'); } } // HTTPS options remapping if (options.https) { if ('rejectUnauthorized' in options.https) { requestOptions.rejectUnauthorized = options.https.rejectUnauthorized; } if (options.https.checkServerIdentity) { requestOptions.checkServerIdentity = options.https.checkServerIdentity; } if (options.https.certificateAuthority) { requestOptions.ca = options.https.certificateAuthority; } if (options.https.certificate) { requestOptions.cert = options.https.certificate; } if (options.https.key) { requestOptions.key = options.https.key; } if (options.https.passphrase) { requestOptions.passphrase = options.https.passphrase; } if (options.https.pfx) { requestOptions.pfx = options.https.pfx; } } try { let requestOrResponse = await fn(url, requestOptions); if (is_1.default.undefined(requestOrResponse)) { requestOrResponse = fallbackFn(url, requestOptions); } // Restore options options.request = request; options.timeout = timeout; options.agent = agent; // HTTPS options restore if (options.https) { if ('rejectUnauthorized' in options.https) { delete requestOptions.rejectUnauthorized; } if (options.https.checkServerIdentity) { // @ts-expect-error - This one will be removed when we remove the alias. delete requestOptions.checkServerIdentity; } if (options.https.certificateAuthority) { delete requestOptions.ca; } if (options.https.certificate) { delete requestOptions.cert; } if (options.https.key) { delete requestOptions.key; } if (options.https.passphrase) { delete requestOptions.passphrase; } if (options.https.pfx) { delete requestOptions.pfx; } } if (isClientRequest(requestOrResponse)) { this._onRequest(requestOrResponse); // Emit the response after the stream has been ended } else if (this.writable) { this.once('finish', () => { void this._onResponse(requestOrResponse); }); this._unlockWrite(); this.end(); this._lockWrite(); } else { void this._onResponse(requestOrResponse); } } catch (error) { if (error instanceof CacheableRequest.CacheError) { throw new CacheError(error, this); } throw new RequestError(error.message, error, this); } } async _error(error) { try { for (const hook of this.options.hooks.beforeError) { // eslint-disable-next-line no-await-in-loop error = await hook(error); } } catch (error_) { error = new RequestError(error_.message, error_, this); } this.destroy(error); } _beforeError(error) { if (this[kStopReading]) { return; } const { options } = this; const retryCount = this.retryCount + 1; this[kStopReading] = true; if (!(error instanceof RequestError)) { error = new RequestError(error.message, error, this); } const typedError = error; const { response } = typedError; void (async () => { if (response && !response.body) { response.setEncoding(this._readableState.encoding); try { response.rawBody = await get_buffer_1.default(response); response.body = response.rawBody.toString(); } catch (_a) { } } if (this.listenerCount('retry') !== 0) { let backoff; try { let retryAfter; if (response && 'retry-after' in response.headers) { retryAfter = Number(response.headers['retry-after']); if (Number.isNaN(retryAfter)) { retryAfter = Date.parse(response.headers['retry-after']) - Date.now(); if (retryAfter <= 0) { retryAfter = 1; } } else { retryAfter *= 1000; } } backoff = await options.retry.calculateDelay({ attemptCount: retryCount, retryOptions: options.retry, error: typedError, retryAfter, computedValue: calculate_retry_delay_1.default({ attemptCount: retryCount, retryOptions: options.retry, error: typedError, retryAfter, computedValue: 0 }) }); } catch (error_) { void this._error(new RequestError(error_.message, error_, this)); return; } if (backoff) { const retry = async () => { try { for (const hook of this.options.hooks.beforeRetry) { // eslint-disable-next-line no-await-in-loop await hook(this.options, typedError, retryCount); } } catch (error_) { void this._error(new RequestError(error_.message, error, this)); return; } // Something forced us to abort the retry if (this.destroyed) { return; } this.destroy(); this.emit('retry', retryCount, error); }; this[kRetryTimeout] = setTimeout(retry, backoff); return; } } void this._error(typedError); })(); } _read() { this[kTriggerRead] = true; const response = this[kResponse]; if (response && !this[kStopReading]) { // We cannot put this in the `if` above // because `.read()` also triggers the `end` event if (response.readableLength) { this[kTriggerRead] = false; } let data; while ((data = response.read()) !== null) { this[kDownloadedSize] += data.length; this[kStartedReading] = true; const progress = this.downloadProgress; if (progress.percent < 1) { this.emit('downloadProgress', progress); } this.push(data); } } } // Node.js 12 has incorrect types, so the encoding must be a string _write(chunk, encoding, callback) { const write = () => { this._writeRequest(chunk, encoding, callback); }; if (this.requestInitialized) { write(); } else { this[kJobs].push(write); } } _writeRequest(chunk, encoding, callback) { if (this[kRequest].destroyed) { // Probably the `ClientRequest` instance will throw return; } this._progressCallbacks.push(() => { this[kUploadedSize] += Buffer.byteLength(chunk, encoding); const progress = this.uploadProgress; if (progress.percent < 1) { this.emit('uploadProgress', progress); } }); // TODO: What happens if it's from cache? Then this[kRequest] won't be defined. this[kRequest].write(chunk, encoding, (error) => { if (!error && this._progressCallbacks.length > 0) { this._progressCallbacks.shift()(); } callback(error); }); } _final(callback) { const endRequest = () => { // FIX: Node.js 10 calls the write callback AFTER the end callback! while (this._progressCallbacks.length !== 0) { this._progressCallbacks.shift()(); } // We need to check if `this[kRequest]` is present, // because it isn't when we use cache. if (!(kRequest in this)) { callback(); return; } if (this[kRequest].destroyed) { callback(); return; } this[kRequest].end((error) => { if (!error) { this[kBodySize] = this[kUploadedSize]; this.emit('uploadProgress', this.uploadProgress); this[kRequest].emit('upload-complete'); } callback(error); }); }; if (this.requestInitialized) { endRequest(); } else { this[kJobs].push(endRequest); } } _destroy(error, callback) { var _a; this[kStopReading] = true; // Prevent further retries clearTimeout(this[kRetryTimeout]); if (kRequest in this) { this[kCancelTimeouts](); // TODO: Remove the next `if` when these get fixed: // - https://github.com/nodejs/node/issues/32851 if (!((_a = this[kResponse]) === null || _a === void 0 ? void 0 : _a.complete)) { this[kRequest].destroy(); } } if (error !== null && !is_1.default.undefined(error) && !(error instanceof RequestError)) { error = new RequestError(error.message, error, this); } callback(error); } get _isAboutToError() { return this[kStopReading]; } /** The remote IP address. */ get ip() { var _a; return (_a = this.socket) === null || _a === void 0 ? void 0 : _a.remoteAddress; } /** Indicates whether the request has been aborted or not. */ get aborted() { var _a, _b, _c; return ((_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.destroyed) !== null && _b !== void 0 ? _b : this.destroyed) && !((_c = this[kOriginalResponse]) === null || _c === void 0 ? void 0 : _c.complete); } get socket() { var _a, _b; return (_b = (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.socket) !== null && _b !== void 0 ? _b : undefined; } /** Progress event for downloading (receiving a response). */ get downloadProgress() { let percent; if (this[kResponseSize]) { percent = this[kDownloadedSize] / this[kResponseSize]; } else if (this[kResponseSize] === this[kDownloadedSize]) { percent = 1; } else { percent = 0; } return { percent, transferred: this[kDownloadedSize], total: this[kResponseSize] }; } /** Progress event for uploading (sending a request). */ get uploadProgress() { let percent; if (this[kBodySize]) { percent = this[kUploadedSize] / this[kBodySize]; } else if (this[kBodySize] === this[kUploadedSize]) { percent = 1; } else { percent = 0; } return { percent, transferred: this[kUploadedSize], total: this[kBodySize] }; } /** The object contains the following properties: - `start` - Time when the request started. - `socket` - Time when a socket was assigned to the request. - `lookup` - Time when the DNS lookup finished. - `connect` - Time when the socket successfully connected. - `secureConnect` - Time when the socket securely connected. - `upload` - Time when the request finished uploading. - `response` - Time when the request fired `response` event. - `end` - Time when the response fired `end` event. - `error` - Time when the request fired `error` event. - `abort` - Time when the request fired `abort` event. - `phases` - `wait` - `timings.socket - timings.start` - `dns` - `timings.lookup - timings.socket` - `tcp` - `timings.connect - timings.lookup` - `tls` - `timings.secureConnect - timings.connect` - `request` - `timings.upload - (timings.secureConnect || timings.connect)` - `firstByte` - `timings.response - timings.upload` - `download` - `timings.end - timings.response` - `total` - `(timings.end || timings.error || timings.abort) - timings.start` If something has not been measured yet, it will be `undefined`. __Note__: The time is a `number` representing the milliseconds elapsed since the UNIX epoch. */ get timings() { var _a; return (_a = this[kRequest]) === null || _a === void 0 ? void 0 : _a.timings; } /** Whether the response was retrieved from the cache. */ get isFromCache() { return this[kIsFromCache]; } pipe(destination, options) { if (this[kStartedReading]) { throw new Error('Failed to pipe. The response has been emitted already.'); } if (destination instanceof http_1.ServerResponse) { this[kServerResponsesPiped].add(destination); } return super.pipe(destination, options); } unpipe(destination) { if (destination instanceof http_1.ServerResponse) { this[kServerResponsesPiped].delete(destination); } super.unpipe(destination); return this; } } exports.default = Request; /***/ }), /***/ 90354: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.dnsLookupIpVersionToFamily = exports.isDnsLookupIpVersion = void 0; const conversionTable = { auto: 0, ipv4: 4, ipv6: 6 }; exports.isDnsLookupIpVersion = (value) => { return value in conversionTable; }; exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { if (exports.isDnsLookupIpVersion(dnsLookupIpVersion)) { return conversionTable[dnsLookupIpVersion]; } throw new Error('Invalid DNS lookup IP version'); }; /***/ }), /***/ 92425: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const fs_1 = __webpack_require__(35747); const util_1 = __webpack_require__(31669); const is_1 = __webpack_require__(80657); const is_form_data_1 = __webpack_require__(16721); const statAsync = util_1.promisify(fs_1.stat); exports.default = async (body, headers) => { if (headers && 'content-length' in headers) { return Number(headers['content-length']); } if (!body) { return 0; } if (is_1.default.string(body)) { return Buffer.byteLength(body); } if (is_1.default.buffer(body)) { return body.length; } if (is_form_data_1.default(body)) { return util_1.promisify(body.getLength.bind(body))(); } if (body instanceof fs_1.ReadStream) { const { size } = await statAsync(body.path); if (size === 0) { return undefined; } return size; } return undefined; }; /***/ }), /***/ 54992: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); // TODO: Update https://github.com/sindresorhus/get-stream const getBuffer = async (stream) => { const chunks = []; let length = 0; for await (const chunk of stream) { chunks.push(chunk); length += Buffer.byteLength(chunk); } if (Buffer.isBuffer(chunks[0])) { return Buffer.concat(chunks, length); } return Buffer.from(chunks.join('')); }; exports.default = getBuffer; /***/ }), /***/ 16721: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(80657); exports.default = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); /***/ }), /***/ 38141: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isResponseOk = void 0; exports.isResponseOk = (response) => { const { statusCode } = response; const limitStatusCode = response.request.options.followRedirect ? 299 : 399; return (statusCode >= 200 && statusCode <= limitStatusCode) || statusCode === 304; }; /***/ }), /***/ 30186: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* istanbul ignore file: deprecated */ const url_1 = __webpack_require__(78835); const keys = [ 'protocol', 'host', 'hostname', 'port', 'pathname', 'search' ]; exports.default = (origin, options) => { var _a, _b; if (options.path) { if (options.pathname) { throw new TypeError('Parameters `path` and `pathname` are mutually exclusive.'); } if (options.search) { throw new TypeError('Parameters `path` and `search` are mutually exclusive.'); } if (options.searchParams) { throw new TypeError('Parameters `path` and `searchParams` are mutually exclusive.'); } } if (options.search && options.searchParams) { throw new TypeError('Parameters `search` and `searchParams` are mutually exclusive.'); } if (!origin) { if (!options.protocol) { throw new TypeError('No URL protocol specified'); } origin = `${options.protocol}//${(_b = (_a = options.hostname) !== null && _a !== void 0 ? _a : options.host) !== null && _b !== void 0 ? _b : ''}`; } const url = new url_1.URL(origin); if (options.path) { const searchIndex = options.path.indexOf('?'); if (searchIndex === -1) { options.pathname = options.path; } else { options.pathname = options.path.slice(0, searchIndex); options.search = options.path.slice(searchIndex + 1); } delete options.path; } for (const key of keys) { if (options[key]) { url[key] = options[key].toString(); } } return url; }; /***/ }), /***/ 94805: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); function default_1(from, to, events) { const fns = {}; for (const event of events) { fns[event] = (...args) => { to.emit(event, ...args); }; from.on(event, fns[event]); } return () => { for (const event of events) { from.off(event, fns[event]); } }; } exports.default = default_1; /***/ }), /***/ 14834: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TimeoutError = void 0; const net = __webpack_require__(11631); const unhandle_1 = __webpack_require__(28535); const reentry = Symbol('reentry'); const noop = () => { }; class TimeoutError extends Error { constructor(threshold, event) { super(`Timeout awaiting '${event}' for ${threshold}ms`); this.event = event; this.name = 'TimeoutError'; this.code = 'ETIMEDOUT'; } } exports.TimeoutError = TimeoutError; exports.default = (request, delays, options) => { if (reentry in request) { return noop; } request[reentry] = true; const cancelers = []; const { once, unhandleAll } = unhandle_1.default(); const addTimeout = (delay, callback, event) => { var _a; const timeout = setTimeout(callback, delay, delay, event); (_a = timeout.unref) === null || _a === void 0 ? void 0 : _a.call(timeout); const cancel = () => { clearTimeout(timeout); }; cancelers.push(cancel); return cancel; }; const { host, hostname } = options; const timeoutHandler = (delay, event) => { request.destroy(new TimeoutError(delay, event)); }; const cancelTimeouts = () => { for (const cancel of cancelers) { cancel(); } unhandleAll(); }; request.once('error', error => { cancelTimeouts(); // Save original behavior /* istanbul ignore next */ if (request.listenerCount('error') === 0) { throw error; } }); request.once('close', cancelTimeouts); once(request, 'response', (response) => { once(response, 'end', cancelTimeouts); }); if (typeof delays.request !== 'undefined') { addTimeout(delays.request, timeoutHandler, 'request'); } if (typeof delays.socket !== 'undefined') { const socketTimeoutHandler = () => { timeoutHandler(delays.socket, 'socket'); }; request.setTimeout(delays.socket, socketTimeoutHandler); // `request.setTimeout(0)` causes a memory leak. // We can just remove the listener and forget about the timer - it's unreffed. // See https://github.com/sindresorhus/got/issues/690 cancelers.push(() => { request.removeListener('timeout', socketTimeoutHandler); }); } once(request, 'socket', (socket) => { var _a; const { socketPath } = request; /* istanbul ignore next: hard to test */ if (socket.connecting) { const hasPath = Boolean(socketPath !== null && socketPath !== void 0 ? socketPath : net.isIP((_a = hostname !== null && hostname !== void 0 ? hostname : host) !== null && _a !== void 0 ? _a : '') !== 0); if (typeof delays.lookup !== 'undefined' && !hasPath && typeof socket.address().address === 'undefined') { const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, 'lookup'); once(socket, 'lookup', cancelTimeout); } if (typeof delays.connect !== 'undefined') { const timeConnect = () => addTimeout(delays.connect, timeoutHandler, 'connect'); if (hasPath) { once(socket, 'connect', timeConnect()); } else { once(socket, 'lookup', (error) => { if (error === null) { once(socket, 'connect', timeConnect()); } }); } } if (typeof delays.secureConnect !== 'undefined' && options.protocol === 'https:') { once(socket, 'connect', () => { const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, 'secureConnect'); once(socket, 'secureConnect', cancelTimeout); }); } } if (typeof delays.send !== 'undefined') { const timeRequest = () => addTimeout(delays.send, timeoutHandler, 'send'); /* istanbul ignore next: hard to test */ if (socket.connecting) { once(socket, 'connect', () => { once(request, 'upload-complete', timeRequest()); }); } else { once(request, 'upload-complete', timeRequest()); } } }); if (typeof delays.response !== 'undefined') { once(request, 'upload-complete', () => { const cancelTimeout = addTimeout(delays.response, timeoutHandler, 'response'); once(request, 'response', cancelTimeout); }); } return cancelTimeouts; }; /***/ }), /***/ 28535: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); // When attaching listeners, it's very easy to forget about them. // Especially if you do error handling and set timeouts. // So instead of checking if it's proper to throw an error on every timeout ever, // use this simple tool which will remove all listeners you have attached. exports.default = () => { const handlers = []; return { once(origin, event, fn) { origin.once(event, fn); handlers.push({ origin, event, fn }); }, unhandleAll() { for (const handler of handlers) { const { origin, event, fn } = handler; origin.removeListener(event, fn); } handlers.length = 0; } }; }; /***/ }), /***/ 96959: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(80657); exports.default = (url) => { // Cast to URL url = url; const options = { protocol: url.protocol, hostname: is_1.default.string(url.hostname) && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, host: url.host, hash: url.hash, search: url.search, pathname: url.pathname, href: url.href, path: `${url.pathname || ''}${url.search || ''}` }; if (is_1.default.string(url.port) && url.port.length > 0) { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${url.username || ''}:${url.password || ''}`; } return options; }; /***/ }), /***/ 57440: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); class WeakableMap { constructor() { this.weakMap = new WeakMap(); this.map = new Map(); } set(key, value) { if (typeof key === 'object') { this.weakMap.set(key, value); } else { this.map.set(key, value); } } get(key) { if (typeof key === 'object') { return this.weakMap.get(key); } return this.map.get(key); } has(key) { if (typeof key === 'object') { return this.weakMap.has(key); } return this.map.has(key); } } exports.default = WeakableMap; /***/ }), /***/ 46427: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; 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" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultHandler = void 0; const is_1 = __webpack_require__(80657); const as_promise_1 = __webpack_require__(9291); const create_rejection_1 = __webpack_require__(36133); const core_1 = __webpack_require__(8178); const deep_freeze_1 = __webpack_require__(64638); const errors = { RequestError: as_promise_1.RequestError, CacheError: as_promise_1.CacheError, ReadError: as_promise_1.ReadError, HTTPError: as_promise_1.HTTPError, MaxRedirectsError: as_promise_1.MaxRedirectsError, TimeoutError: as_promise_1.TimeoutError, ParseError: as_promise_1.ParseError, CancelError: as_promise_1.CancelError, UnsupportedProtocolError: as_promise_1.UnsupportedProtocolError, UploadError: as_promise_1.UploadError }; // The `delay` package weighs 10KB (!) const delay = async (ms) => new Promise(resolve => { setTimeout(resolve, ms); }); const { normalizeArguments } = core_1.default; const mergeOptions = (...sources) => { let mergedOptions; for (const source of sources) { mergedOptions = normalizeArguments(undefined, source, mergedOptions); } return mergedOptions; }; const getPromiseOrStream = (options) => options.isStream ? new core_1.default(undefined, options) : as_promise_1.default(options); const isGotInstance = (value) => ('defaults' in value && 'options' in value.defaults); const aliases = [ 'get', 'post', 'put', 'patch', 'head', 'delete' ]; exports.defaultHandler = (options, next) => next(options); const callInitHooks = (hooks, options) => { if (hooks) { for (const hook of hooks) { hook(options); } } }; const create = (defaults) => { // Proxy properties from next handlers defaults._rawHandlers = defaults.handlers; defaults.handlers = defaults.handlers.map(fn => ((options, next) => { // This will be assigned by assigning result let root; const result = fn(options, newOptions => { root = next(newOptions); return root; }); if (result !== root && !options.isStream && root) { const typedResult = result; const { then: promiseThen, catch: promiseCatch, finally: promiseFianlly } = typedResult; Object.setPrototypeOf(typedResult, Object.getPrototypeOf(root)); Object.defineProperties(typedResult, Object.getOwnPropertyDescriptors(root)); // These should point to the new promise // eslint-disable-next-line promise/prefer-await-to-then typedResult.then = promiseThen; typedResult.catch = promiseCatch; typedResult.finally = promiseFianlly; } return result; })); // Got interface const got = ((url, options = {}, _defaults) => { var _a, _b; let iteration = 0; const iterateHandlers = (newOptions) => { return defaults.handlers[iteration++](newOptions, iteration === defaults.handlers.length ? getPromiseOrStream : iterateHandlers); }; // TODO: Remove this in Got 12. if (is_1.default.plainObject(url)) { const mergedOptions = { ...url, ...options }; core_1.setNonEnumerableProperties([url, options], mergedOptions); options = mergedOptions; url = undefined; } try { // Call `init` hooks let initHookError; try { callInitHooks(defaults.options.hooks.init, options); callInitHooks((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.init, options); } catch (error) { initHookError = error; } // Normalize options & call handlers const normalizedOptions = normalizeArguments(url, options, _defaults !== null && _defaults !== void 0 ? _defaults : defaults.options); normalizedOptions[core_1.kIsNormalizedAlready] = true; if (initHookError) { throw new as_promise_1.RequestError(initHookError.message, initHookError, normalizedOptions); } return iterateHandlers(normalizedOptions); } catch (error) { if (options.isStream) { throw error; } else { return create_rejection_1.default(error, defaults.options.hooks.beforeError, (_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforeError); } } }); got.extend = (...instancesOrOptions) => { const optionsArray = [defaults.options]; let handlers = [...defaults._rawHandlers]; let isMutableDefaults; for (const value of instancesOrOptions) { if (isGotInstance(value)) { optionsArray.push(value.defaults.options); handlers.push(...value.defaults._rawHandlers); isMutableDefaults = value.defaults.mutableDefaults; } else { optionsArray.push(value); if ('handlers' in value) { handlers.push(...value.handlers); } isMutableDefaults = value.mutableDefaults; } } handlers = handlers.filter(handler => handler !== exports.defaultHandler); if (handlers.length === 0) { handlers.push(exports.defaultHandler); } return create({ options: mergeOptions(...optionsArray), handlers, mutableDefaults: Boolean(isMutableDefaults) }); }; // Pagination const paginateEach = (async function* (url, options) { // TODO: Remove this `@ts-expect-error` when upgrading to TypeScript 4. // Error: Argument of type 'Merge> | undefined' is not assignable to parameter of type 'Options | undefined'. // @ts-expect-error let normalizedOptions = normalizeArguments(url, options, defaults.options); normalizedOptions.resolveBodyOnly = false; const pagination = normalizedOptions.pagination; if (!is_1.default.object(pagination)) { throw new TypeError('`options.pagination` must be implemented'); } const all = []; let { countLimit } = pagination; let numberOfRequests = 0; while (numberOfRequests < pagination.requestLimit) { if (numberOfRequests !== 0) { // eslint-disable-next-line no-await-in-loop await delay(pagination.backoff); } // @ts-expect-error FIXME! // TODO: Throw when result is not an instance of Response // eslint-disable-next-line no-await-in-loop const result = (await got(undefined, undefined, normalizedOptions)); // eslint-disable-next-line no-await-in-loop const parsed = await pagination.transform(result); const current = []; for (const item of parsed) { if (pagination.filter(item, all, current)) { if (!pagination.shouldContinue(item, all, current)) { return; } yield item; if (pagination.stackAllItems) { all.push(item); } current.push(item); if (--countLimit <= 0) { return; } } } const optionsToMerge = pagination.paginate(result, all, current); if (optionsToMerge === false) { return; } if (optionsToMerge === result.request.options) { normalizedOptions = result.request.options; } else if (optionsToMerge !== undefined) { normalizedOptions = normalizeArguments(undefined, optionsToMerge, normalizedOptions); } numberOfRequests++; } }); got.paginate = paginateEach; got.paginate.all = (async (url, options) => { const results = []; for await (const item of paginateEach(url, options)) { results.push(item); } return results; }); // For those who like very descriptive names got.paginate.each = paginateEach; // Stream API got.stream = ((url, options) => got(url, { ...options, isStream: true })); // Shortcuts for (const method of aliases) { got[method] = ((url, options) => got(url, { ...options, method })); got.stream[method] = ((url, options) => { return got(url, { ...options, method, isStream: true }); }); } Object.assign(got, errors); Object.defineProperty(got, 'defaults', { value: defaults.mutableDefaults ? defaults : deep_freeze_1.default(defaults), writable: defaults.mutableDefaults, configurable: defaults.mutableDefaults, enumerable: true }); got.mergeOptions = mergeOptions; return got; }; exports.default = create; __exportStar(__webpack_require__(38317), exports); /***/ }), /***/ 12210: /***/ (function(module, exports, __webpack_require__) { "use strict"; 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" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); const url_1 = __webpack_require__(78835); const create_1 = __webpack_require__(46427); const defaults = { options: { method: 'GET', retry: { limit: 2, methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ], statusCodes: [ 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 ], errorCodes: [ 'ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN' ], maxRetryAfter: undefined, calculateDelay: ({ computedValue }) => computedValue }, timeout: {}, headers: { 'user-agent': 'got (https://github.com/sindresorhus/got)' }, hooks: { init: [], beforeRequest: [], beforeRedirect: [], beforeRetry: [], beforeError: [], afterResponse: [] }, cache: undefined, dnsCache: undefined, decompress: true, throwHttpErrors: true, followRedirect: true, isStream: false, responseType: 'text', resolveBodyOnly: false, maxRedirects: 10, prefixUrl: '', methodRewriting: true, ignoreInvalidCookies: false, context: {}, // TODO: Set this to `true` when Got 12 gets released http2: false, allowGetBody: false, https: undefined, pagination: { transform: (response) => { if (response.request.options.responseType === 'json') { return response.body; } return JSON.parse(response.body); }, paginate: response => { if (!Reflect.has(response.headers, 'link')) { return false; } const items = response.headers.link.split(','); let next; for (const item of items) { const parsed = item.split(';'); if (parsed[1].includes('next')) { next = parsed[0].trimStart().trim(); next = next.slice(1, -1); break; } } if (next) { const options = { url: new url_1.URL(next) }; return options; } return false; }, filter: () => true, shouldContinue: () => true, countLimit: Infinity, backoff: 0, requestLimit: 10000, stackAllItems: true }, parseJson: (text) => JSON.parse(text), stringifyJson: (object) => JSON.stringify(object), cacheOptions: {} }, handlers: [create_1.defaultHandler], mutableDefaults: false }; const got = create_1.default(defaults); exports.default = got; // For CommonJS default export support module.exports = got; module.exports.default = got; module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267 __exportStar(__webpack_require__(46427), exports); __exportStar(__webpack_require__(9291), exports); /***/ }), /***/ 38317: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), /***/ 64638: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const is_1 = __webpack_require__(80657); function deepFreeze(object) { for (const value of Object.values(object)) { if (is_1.default.plainObject(value) || is_1.default.array(value)) { deepFreeze(value); } } return Object.freeze(object); } exports.default = deepFreeze; /***/ }), /***/ 45241: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const alreadyWarned = new Set(); exports.default = (message) => { if (alreadyWarned.has(message)) { return; } alreadyWarned.add(message); // @ts-expect-error Missing types. process.emitWarning(`Got: ${message}`, { type: 'DeprecationWarning' }); }; /***/ }), /***/ 30323: /***/ ((module) => { /* Breaks a Javascript string into individual user-perceived "characters" called extended grapheme clusters by implementing the Unicode UAX-29 standard, version 10.0.0 Usage: var splitter = new GraphemeSplitter(); //returns an array of strings, one string for each grapheme cluster var graphemes = splitter.splitGraphemes(string); */ function GraphemeSplitter(){ var CR = 0, LF = 1, Control = 2, Extend = 3, Regional_Indicator = 4, SpacingMark = 5, L = 6, V = 7, T = 8, LV = 9, LVT = 10, Other = 11, Prepend = 12, E_Base = 13, E_Modifier = 14, ZWJ = 15, Glue_After_Zwj = 16, E_Base_GAZ = 17; // BreakTypes var NotBreak = 0, BreakStart = 1, Break = 2, BreakLastRegional = 3, BreakPenultimateRegional = 4; function isSurrogate(str, pos) { return 0xd800 <= str.charCodeAt(pos) && str.charCodeAt(pos) <= 0xdbff && 0xdc00 <= str.charCodeAt(pos + 1) && str.charCodeAt(pos + 1) <= 0xdfff; } // Private function, gets a Unicode code point from a JavaScript UTF-16 string // handling surrogate pairs appropriately function codePointAt(str, idx){ if(idx === undefined){ idx = 0; } var code = str.charCodeAt(idx); // if a high surrogate if (0xD800 <= code && code <= 0xDBFF && idx < str.length - 1){ var hi = code; var low = str.charCodeAt(idx + 1); if (0xDC00 <= low && low <= 0xDFFF){ return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; } return hi; } // if a low surrogate if (0xDC00 <= code && code <= 0xDFFF && idx >= 1){ var hi = str.charCodeAt(idx - 1); var low = code; if (0xD800 <= hi && hi <= 0xDBFF){ return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; } return low; } //just return the char if an unmatched surrogate half or a //single-char codepoint return code; } // Private function, returns whether a break is allowed between the // two given grapheme breaking classes function shouldBreak(start, mid, end){ var all = [start].concat(mid).concat([end]); var previous = all[all.length - 2] var next = end // Lookahead termintor for: // GB10. (E_Base | EBG) Extend* ? E_Modifier var eModifierIndex = all.lastIndexOf(E_Modifier) if(eModifierIndex > 1 && all.slice(1, eModifierIndex).every(function(c){return c == Extend}) && [Extend, E_Base, E_Base_GAZ].indexOf(start) == -1){ return Break } // Lookahead termintor for: // GB12. ^ (RI RI)* RI ? RI // GB13. [^RI] (RI RI)* RI ? RI var rIIndex = all.lastIndexOf(Regional_Indicator) if(rIIndex > 0 && all.slice(1, rIIndex).every(function(c){return c == Regional_Indicator}) && [Prepend, Regional_Indicator].indexOf(previous) == -1) { if(all.filter(function(c){return c == Regional_Indicator}).length % 2 == 1) { return BreakLastRegional } else { return BreakPenultimateRegional } } // GB3. CR X LF if(previous == CR && next == LF){ return NotBreak; } // GB4. (Control|CR|LF) ÷ else if(previous == Control || previous == CR || previous == LF){ if(next == E_Modifier && mid.every(function(c){return c == Extend})){ return Break } else { return BreakStart } } // GB5. ÷ (Control|CR|LF) else if(next == Control || next == CR || next == LF){ return BreakStart; } // GB6. L X (L|V|LV|LVT) else if(previous == L && (next == L || next == V || next == LV || next == LVT)){ return NotBreak; } // GB7. (LV|V) X (V|T) else if((previous == LV || previous == V) && (next == V || next == T)){ return NotBreak; } // GB8. (LVT|T) X (T) else if((previous == LVT || previous == T) && next == T){ return NotBreak; } // GB9. X (Extend|ZWJ) else if (next == Extend || next == ZWJ){ return NotBreak; } // GB9a. X SpacingMark else if(next == SpacingMark){ return NotBreak; } // GB9b. Prepend X else if (previous == Prepend){ return NotBreak; } // GB10. (E_Base | EBG) Extend* ? E_Modifier var previousNonExtendIndex = all.indexOf(Extend) != -1 ? all.lastIndexOf(Extend) - 1 : all.length - 2; if([E_Base, E_Base_GAZ].indexOf(all[previousNonExtendIndex]) != -1 && all.slice(previousNonExtendIndex + 1, -1).every(function(c){return c == Extend}) && next == E_Modifier){ return NotBreak; } // GB11. ZWJ ? (Glue_After_Zwj | EBG) if(previous == ZWJ && [Glue_After_Zwj, E_Base_GAZ].indexOf(next) != -1) { return NotBreak; } // GB12. ^ (RI RI)* RI ? RI // GB13. [^RI] (RI RI)* RI ? RI if(mid.indexOf(Regional_Indicator) != -1) { return Break; } if(previous == Regional_Indicator && next == Regional_Indicator) { return NotBreak; } // GB999. Any ? Any return BreakStart; } // Returns the next grapheme break in the string after the given index this.nextBreak = function(string, index){ if(index === undefined){ index = 0; } if(index < 0){ return 0; } if(index >= string.length - 1){ return string.length; } var prev = getGraphemeBreakProperty(codePointAt(string, index)); var mid = [] for (var i = index + 1; i < string.length; i++) { // check for already processed low surrogates if(isSurrogate(string, i - 1)){ continue; } var next = getGraphemeBreakProperty(codePointAt(string, i)); if(shouldBreak(prev, mid, next)){ return i; } mid.push(next); } return string.length; }; // Breaks the given string into an array of grapheme cluster strings this.splitGraphemes = function(str){ var res = []; var index = 0; var brk; while((brk = this.nextBreak(str, index)) < str.length){ res.push(str.slice(index, brk)); index = brk; } if(index < str.length){ res.push(str.slice(index)); } return res; }; // Returns the iterator of grapheme clusters there are in the given string this.iterateGraphemes = function(str) { var index = 0; var res = { next: (function() { var value; var brk; if ((brk = this.nextBreak(str, index)) < str.length) { value = str.slice(index, brk); index = brk; return { value: value, done: false }; } if (index < str.length) { value = str.slice(index); index = str.length; return { value: value, done: false }; } return { value: undefined, done: true }; }).bind(this) }; // ES2015 @@iterator method (iterable) for spread syntax and for...of statement if (typeof Symbol !== 'undefined' && Symbol.iterator) { res[Symbol.iterator] = function() {return res}; } return res; }; // Returns the number of grapheme clusters there are in the given string this.countGraphemes = function(str){ var count = 0; var index = 0; var brk; while((brk = this.nextBreak(str, index)) < str.length){ index = brk; count++; } if(index < str.length){ count++; } return count; }; //given a Unicode code point, determines this symbol's grapheme break property function getGraphemeBreakProperty(code){ //grapheme break property for Unicode 10.0.0, //taken from http://www.unicode.org/Public/10.0.0/ucd/auxiliary/GraphemeBreakProperty.txt //and adapted to JavaScript rules if( (0x0600 <= code && code <= 0x0605) || // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE 0x06DD == code || // Cf ARABIC END OF AYAH 0x070F == code || // Cf SYRIAC ABBREVIATION MARK 0x08E2 == code || // Cf ARABIC DISPUTED END OF AYAH 0x0D4E == code || // Lo MALAYALAM LETTER DOT REPH 0x110BD == code || // Cf KAITHI NUMBER SIGN (0x111C2 <= code && code <= 0x111C3) || // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA 0x11A3A == code || // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA (0x11A86 <= code && code <= 0x11A89) || // Lo [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA 0x11D46 == code // Lo MASARAM GONDI REPHA ){ return Prepend; } if( 0x000D == code // Cc ){ return CR; } if( 0x000A == code // Cc ){ return LF; } if( (0x0000 <= code && code <= 0x0009) || // Cc [10] .. (0x000B <= code && code <= 0x000C) || // Cc [2] .. (0x000E <= code && code <= 0x001F) || // Cc [18] .. (0x007F <= code && code <= 0x009F) || // Cc [33] .. 0x00AD == code || // Cf SOFT HYPHEN 0x061C == code || // Cf ARABIC LETTER MARK 0x180E == code || // Cf MONGOLIAN VOWEL SEPARATOR 0x200B == code || // Cf ZERO WIDTH SPACE (0x200E <= code && code <= 0x200F) || // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK 0x2028 == code || // Zl LINE SEPARATOR 0x2029 == code || // Zp PARAGRAPH SEPARATOR (0x202A <= code && code <= 0x202E) || // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE (0x2060 <= code && code <= 0x2064) || // Cf [5] WORD JOINER..INVISIBLE PLUS 0x2065 == code || // Cn (0x2066 <= code && code <= 0x206F) || // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES (0xD800 <= code && code <= 0xDFFF) || // Cs [2048] .. 0xFEFF == code || // Cf ZERO WIDTH NO-BREAK SPACE (0xFFF0 <= code && code <= 0xFFF8) || // Cn [9] .. (0xFFF9 <= code && code <= 0xFFFB) || // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR (0x1BCA0 <= code && code <= 0x1BCA3) || // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP (0x1D173 <= code && code <= 0x1D17A) || // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE 0xE0000 == code || // Cn 0xE0001 == code || // Cf LANGUAGE TAG (0xE0002 <= code && code <= 0xE001F) || // Cn [30] .. (0xE0080 <= code && code <= 0xE00FF) || // Cn [128] .. (0xE01F0 <= code && code <= 0xE0FFF) // Cn [3600] .. ){ return Control; } if( (0x0300 <= code && code <= 0x036F) || // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X (0x0483 <= code && code <= 0x0487) || // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE (0x0488 <= code && code <= 0x0489) || // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN (0x0591 <= code && code <= 0x05BD) || // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG 0x05BF == code || // Mn HEBREW POINT RAFE (0x05C1 <= code && code <= 0x05C2) || // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT (0x05C4 <= code && code <= 0x05C5) || // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT 0x05C7 == code || // Mn HEBREW POINT QAMATS QATAN (0x0610 <= code && code <= 0x061A) || // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA (0x064B <= code && code <= 0x065F) || // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW 0x0670 == code || // Mn ARABIC LETTER SUPERSCRIPT ALEF (0x06D6 <= code && code <= 0x06DC) || // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN (0x06DF <= code && code <= 0x06E4) || // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA (0x06E7 <= code && code <= 0x06E8) || // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON (0x06EA <= code && code <= 0x06ED) || // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM 0x0711 == code || // Mn SYRIAC LETTER SUPERSCRIPT ALAPH (0x0730 <= code && code <= 0x074A) || // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH (0x07A6 <= code && code <= 0x07B0) || // Mn [11] THAANA ABAFILI..THAANA SUKUN (0x07EB <= code && code <= 0x07F3) || // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE (0x0816 <= code && code <= 0x0819) || // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH (0x081B <= code && code <= 0x0823) || // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A (0x0825 <= code && code <= 0x0827) || // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U (0x0829 <= code && code <= 0x082D) || // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA (0x0859 <= code && code <= 0x085B) || // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK (0x08D4 <= code && code <= 0x08E1) || // Mn [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA (0x08E3 <= code && code <= 0x0902) || // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA 0x093A == code || // Mn DEVANAGARI VOWEL SIGN OE 0x093C == code || // Mn DEVANAGARI SIGN NUKTA (0x0941 <= code && code <= 0x0948) || // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI 0x094D == code || // Mn DEVANAGARI SIGN VIRAMA (0x0951 <= code && code <= 0x0957) || // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE (0x0962 <= code && code <= 0x0963) || // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL 0x0981 == code || // Mn BENGALI SIGN CANDRABINDU 0x09BC == code || // Mn BENGALI SIGN NUKTA 0x09BE == code || // Mc BENGALI VOWEL SIGN AA (0x09C1 <= code && code <= 0x09C4) || // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR 0x09CD == code || // Mn BENGALI SIGN VIRAMA 0x09D7 == code || // Mc BENGALI AU LENGTH MARK (0x09E2 <= code && code <= 0x09E3) || // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL (0x0A01 <= code && code <= 0x0A02) || // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI 0x0A3C == code || // Mn GURMUKHI SIGN NUKTA (0x0A41 <= code && code <= 0x0A42) || // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU (0x0A47 <= code && code <= 0x0A48) || // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI (0x0A4B <= code && code <= 0x0A4D) || // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA 0x0A51 == code || // Mn GURMUKHI SIGN UDAAT (0x0A70 <= code && code <= 0x0A71) || // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK 0x0A75 == code || // Mn GURMUKHI SIGN YAKASH (0x0A81 <= code && code <= 0x0A82) || // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA 0x0ABC == code || // Mn GUJARATI SIGN NUKTA (0x0AC1 <= code && code <= 0x0AC5) || // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E (0x0AC7 <= code && code <= 0x0AC8) || // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI 0x0ACD == code || // Mn GUJARATI SIGN VIRAMA (0x0AE2 <= code && code <= 0x0AE3) || // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL (0x0AFA <= code && code <= 0x0AFF) || // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE 0x0B01 == code || // Mn ORIYA SIGN CANDRABINDU 0x0B3C == code || // Mn ORIYA SIGN NUKTA 0x0B3E == code || // Mc ORIYA VOWEL SIGN AA 0x0B3F == code || // Mn ORIYA VOWEL SIGN I (0x0B41 <= code && code <= 0x0B44) || // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR 0x0B4D == code || // Mn ORIYA SIGN VIRAMA 0x0B56 == code || // Mn ORIYA AI LENGTH MARK 0x0B57 == code || // Mc ORIYA AU LENGTH MARK (0x0B62 <= code && code <= 0x0B63) || // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL 0x0B82 == code || // Mn TAMIL SIGN ANUSVARA 0x0BBE == code || // Mc TAMIL VOWEL SIGN AA 0x0BC0 == code || // Mn TAMIL VOWEL SIGN II 0x0BCD == code || // Mn TAMIL SIGN VIRAMA 0x0BD7 == code || // Mc TAMIL AU LENGTH MARK 0x0C00 == code || // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE (0x0C3E <= code && code <= 0x0C40) || // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II (0x0C46 <= code && code <= 0x0C48) || // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI (0x0C4A <= code && code <= 0x0C4D) || // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA (0x0C55 <= code && code <= 0x0C56) || // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK (0x0C62 <= code && code <= 0x0C63) || // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL 0x0C81 == code || // Mn KANNADA SIGN CANDRABINDU 0x0CBC == code || // Mn KANNADA SIGN NUKTA 0x0CBF == code || // Mn KANNADA VOWEL SIGN I 0x0CC2 == code || // Mc KANNADA VOWEL SIGN UU 0x0CC6 == code || // Mn KANNADA VOWEL SIGN E (0x0CCC <= code && code <= 0x0CCD) || // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA (0x0CD5 <= code && code <= 0x0CD6) || // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK (0x0CE2 <= code && code <= 0x0CE3) || // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL (0x0D00 <= code && code <= 0x0D01) || // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU (0x0D3B <= code && code <= 0x0D3C) || // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA 0x0D3E == code || // Mc MALAYALAM VOWEL SIGN AA (0x0D41 <= code && code <= 0x0D44) || // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR 0x0D4D == code || // Mn MALAYALAM SIGN VIRAMA 0x0D57 == code || // Mc MALAYALAM AU LENGTH MARK (0x0D62 <= code && code <= 0x0D63) || // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL 0x0DCA == code || // Mn SINHALA SIGN AL-LAKUNA 0x0DCF == code || // Mc SINHALA VOWEL SIGN AELA-PILLA (0x0DD2 <= code && code <= 0x0DD4) || // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA 0x0DD6 == code || // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA 0x0DDF == code || // Mc SINHALA VOWEL SIGN GAYANUKITTA 0x0E31 == code || // Mn THAI CHARACTER MAI HAN-AKAT (0x0E34 <= code && code <= 0x0E3A) || // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU (0x0E47 <= code && code <= 0x0E4E) || // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN 0x0EB1 == code || // Mn LAO VOWEL SIGN MAI KAN (0x0EB4 <= code && code <= 0x0EB9) || // Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU (0x0EBB <= code && code <= 0x0EBC) || // Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO (0x0EC8 <= code && code <= 0x0ECD) || // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA (0x0F18 <= code && code <= 0x0F19) || // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS 0x0F35 == code || // Mn TIBETAN MARK NGAS BZUNG NYI ZLA 0x0F37 == code || // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS 0x0F39 == code || // Mn TIBETAN MARK TSA -PHRU (0x0F71 <= code && code <= 0x0F7E) || // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO (0x0F80 <= code && code <= 0x0F84) || // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA (0x0F86 <= code && code <= 0x0F87) || // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS (0x0F8D <= code && code <= 0x0F97) || // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA (0x0F99 <= code && code <= 0x0FBC) || // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA 0x0FC6 == code || // Mn TIBETAN SYMBOL PADMA GDAN (0x102D <= code && code <= 0x1030) || // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU (0x1032 <= code && code <= 0x1037) || // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW (0x1039 <= code && code <= 0x103A) || // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT (0x103D <= code && code <= 0x103E) || // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA (0x1058 <= code && code <= 0x1059) || // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL (0x105E <= code && code <= 0x1060) || // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA (0x1071 <= code && code <= 0x1074) || // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE 0x1082 == code || // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA (0x1085 <= code && code <= 0x1086) || // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y 0x108D == code || // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE 0x109D == code || // Mn MYANMAR VOWEL SIGN AITON AI (0x135D <= code && code <= 0x135F) || // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK (0x1712 <= code && code <= 0x1714) || // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA (0x1732 <= code && code <= 0x1734) || // Mn [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD (0x1752 <= code && code <= 0x1753) || // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U (0x1772 <= code && code <= 0x1773) || // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U (0x17B4 <= code && code <= 0x17B5) || // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA (0x17B7 <= code && code <= 0x17BD) || // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA 0x17C6 == code || // Mn KHMER SIGN NIKAHIT (0x17C9 <= code && code <= 0x17D3) || // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT 0x17DD == code || // Mn KHMER SIGN ATTHACAN (0x180B <= code && code <= 0x180D) || // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE (0x1885 <= code && code <= 0x1886) || // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA 0x18A9 == code || // Mn MONGOLIAN LETTER ALI GALI DAGALGA (0x1920 <= code && code <= 0x1922) || // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U (0x1927 <= code && code <= 0x1928) || // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O 0x1932 == code || // Mn LIMBU SMALL LETTER ANUSVARA (0x1939 <= code && code <= 0x193B) || // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I (0x1A17 <= code && code <= 0x1A18) || // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U 0x1A1B == code || // Mn BUGINESE VOWEL SIGN AE 0x1A56 == code || // Mn TAI THAM CONSONANT SIGN MEDIAL LA (0x1A58 <= code && code <= 0x1A5E) || // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA 0x1A60 == code || // Mn TAI THAM SIGN SAKOT 0x1A62 == code || // Mn TAI THAM VOWEL SIGN MAI SAT (0x1A65 <= code && code <= 0x1A6C) || // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW (0x1A73 <= code && code <= 0x1A7C) || // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN 0x1A7F == code || // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT (0x1AB0 <= code && code <= 0x1ABD) || // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW 0x1ABE == code || // Me COMBINING PARENTHESES OVERLAY (0x1B00 <= code && code <= 0x1B03) || // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG 0x1B34 == code || // Mn BALINESE SIGN REREKAN (0x1B36 <= code && code <= 0x1B3A) || // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA 0x1B3C == code || // Mn BALINESE VOWEL SIGN LA LENGA 0x1B42 == code || // Mn BALINESE VOWEL SIGN PEPET (0x1B6B <= code && code <= 0x1B73) || // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG (0x1B80 <= code && code <= 0x1B81) || // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR (0x1BA2 <= code && code <= 0x1BA5) || // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU (0x1BA8 <= code && code <= 0x1BA9) || // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG (0x1BAB <= code && code <= 0x1BAD) || // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA 0x1BE6 == code || // Mn BATAK SIGN TOMPI (0x1BE8 <= code && code <= 0x1BE9) || // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE 0x1BED == code || // Mn BATAK VOWEL SIGN KARO O (0x1BEF <= code && code <= 0x1BF1) || // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H (0x1C2C <= code && code <= 0x1C33) || // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T (0x1C36 <= code && code <= 0x1C37) || // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA (0x1CD0 <= code && code <= 0x1CD2) || // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA (0x1CD4 <= code && code <= 0x1CE0) || // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA (0x1CE2 <= code && code <= 0x1CE8) || // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL 0x1CED == code || // Mn VEDIC SIGN TIRYAK 0x1CF4 == code || // Mn VEDIC TONE CANDRA ABOVE (0x1CF8 <= code && code <= 0x1CF9) || // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE (0x1DC0 <= code && code <= 0x1DF9) || // Mn [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE BELOW (0x1DFB <= code && code <= 0x1DFF) || // Mn [5] COMBINING DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW 0x200C == code || // Cf ZERO WIDTH NON-JOINER (0x20D0 <= code && code <= 0x20DC) || // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE (0x20DD <= code && code <= 0x20E0) || // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH 0x20E1 == code || // Mn COMBINING LEFT RIGHT ARROW ABOVE (0x20E2 <= code && code <= 0x20E4) || // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE (0x20E5 <= code && code <= 0x20F0) || // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE (0x2CEF <= code && code <= 0x2CF1) || // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS 0x2D7F == code || // Mn TIFINAGH CONSONANT JOINER (0x2DE0 <= code && code <= 0x2DFF) || // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS (0x302A <= code && code <= 0x302D) || // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK (0x302E <= code && code <= 0x302F) || // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK (0x3099 <= code && code <= 0x309A) || // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK 0xA66F == code || // Mn COMBINING CYRILLIC VZMET (0xA670 <= code && code <= 0xA672) || // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN (0xA674 <= code && code <= 0xA67D) || // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK (0xA69E <= code && code <= 0xA69F) || // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E (0xA6F0 <= code && code <= 0xA6F1) || // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS 0xA802 == code || // Mn SYLOTI NAGRI SIGN DVISVARA 0xA806 == code || // Mn SYLOTI NAGRI SIGN HASANTA 0xA80B == code || // Mn SYLOTI NAGRI SIGN ANUSVARA (0xA825 <= code && code <= 0xA826) || // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E (0xA8C4 <= code && code <= 0xA8C5) || // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU (0xA8E0 <= code && code <= 0xA8F1) || // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA (0xA926 <= code && code <= 0xA92D) || // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU (0xA947 <= code && code <= 0xA951) || // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R (0xA980 <= code && code <= 0xA982) || // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR 0xA9B3 == code || // Mn JAVANESE SIGN CECAK TELU (0xA9B6 <= code && code <= 0xA9B9) || // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT 0xA9BC == code || // Mn JAVANESE VOWEL SIGN PEPET 0xA9E5 == code || // Mn MYANMAR SIGN SHAN SAW (0xAA29 <= code && code <= 0xAA2E) || // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE (0xAA31 <= code && code <= 0xAA32) || // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE (0xAA35 <= code && code <= 0xAA36) || // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA 0xAA43 == code || // Mn CHAM CONSONANT SIGN FINAL NG 0xAA4C == code || // Mn CHAM CONSONANT SIGN FINAL M 0xAA7C == code || // Mn MYANMAR SIGN TAI LAING TONE-2 0xAAB0 == code || // Mn TAI VIET MAI KANG (0xAAB2 <= code && code <= 0xAAB4) || // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U (0xAAB7 <= code && code <= 0xAAB8) || // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA (0xAABE <= code && code <= 0xAABF) || // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK 0xAAC1 == code || // Mn TAI VIET TONE MAI THO (0xAAEC <= code && code <= 0xAAED) || // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI 0xAAF6 == code || // Mn MEETEI MAYEK VIRAMA 0xABE5 == code || // Mn MEETEI MAYEK VOWEL SIGN ANAP 0xABE8 == code || // Mn MEETEI MAYEK VOWEL SIGN UNAP 0xABED == code || // Mn MEETEI MAYEK APUN IYEK 0xFB1E == code || // Mn HEBREW POINT JUDEO-SPANISH VARIKA (0xFE00 <= code && code <= 0xFE0F) || // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 (0xFE20 <= code && code <= 0xFE2F) || // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF (0xFF9E <= code && code <= 0xFF9F) || // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK 0x101FD == code || // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE 0x102E0 == code || // Mn COPTIC EPACT THOUSANDS MARK (0x10376 <= code && code <= 0x1037A) || // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII (0x10A01 <= code && code <= 0x10A03) || // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R (0x10A05 <= code && code <= 0x10A06) || // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O (0x10A0C <= code && code <= 0x10A0F) || // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA (0x10A38 <= code && code <= 0x10A3A) || // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW 0x10A3F == code || // Mn KHAROSHTHI VIRAMA (0x10AE5 <= code && code <= 0x10AE6) || // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW 0x11001 == code || // Mn BRAHMI SIGN ANUSVARA (0x11038 <= code && code <= 0x11046) || // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA (0x1107F <= code && code <= 0x11081) || // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA (0x110B3 <= code && code <= 0x110B6) || // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI (0x110B9 <= code && code <= 0x110BA) || // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA (0x11100 <= code && code <= 0x11102) || // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA (0x11127 <= code && code <= 0x1112B) || // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU (0x1112D <= code && code <= 0x11134) || // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA 0x11173 == code || // Mn MAHAJANI SIGN NUKTA (0x11180 <= code && code <= 0x11181) || // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA (0x111B6 <= code && code <= 0x111BE) || // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O (0x111CA <= code && code <= 0x111CC) || // Mn [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK (0x1122F <= code && code <= 0x11231) || // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI 0x11234 == code || // Mn KHOJKI SIGN ANUSVARA (0x11236 <= code && code <= 0x11237) || // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA 0x1123E == code || // Mn KHOJKI SIGN SUKUN 0x112DF == code || // Mn KHUDAWADI SIGN ANUSVARA (0x112E3 <= code && code <= 0x112EA) || // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA (0x11300 <= code && code <= 0x11301) || // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU 0x1133C == code || // Mn GRANTHA SIGN NUKTA 0x1133E == code || // Mc GRANTHA VOWEL SIGN AA 0x11340 == code || // Mn GRANTHA VOWEL SIGN II 0x11357 == code || // Mc GRANTHA AU LENGTH MARK (0x11366 <= code && code <= 0x1136C) || // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX (0x11370 <= code && code <= 0x11374) || // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA (0x11438 <= code && code <= 0x1143F) || // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI (0x11442 <= code && code <= 0x11444) || // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA 0x11446 == code || // Mn NEWA SIGN NUKTA 0x114B0 == code || // Mc TIRHUTA VOWEL SIGN AA (0x114B3 <= code && code <= 0x114B8) || // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL 0x114BA == code || // Mn TIRHUTA VOWEL SIGN SHORT E 0x114BD == code || // Mc TIRHUTA VOWEL SIGN SHORT O (0x114BF <= code && code <= 0x114C0) || // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA (0x114C2 <= code && code <= 0x114C3) || // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA 0x115AF == code || // Mc SIDDHAM VOWEL SIGN AA (0x115B2 <= code && code <= 0x115B5) || // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR (0x115BC <= code && code <= 0x115BD) || // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA (0x115BF <= code && code <= 0x115C0) || // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA (0x115DC <= code && code <= 0x115DD) || // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU (0x11633 <= code && code <= 0x1163A) || // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI 0x1163D == code || // Mn MODI SIGN ANUSVARA (0x1163F <= code && code <= 0x11640) || // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA 0x116AB == code || // Mn TAKRI SIGN ANUSVARA 0x116AD == code || // Mn TAKRI VOWEL SIGN AA (0x116B0 <= code && code <= 0x116B5) || // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU 0x116B7 == code || // Mn TAKRI SIGN NUKTA (0x1171D <= code && code <= 0x1171F) || // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA (0x11722 <= code && code <= 0x11725) || // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU (0x11727 <= code && code <= 0x1172B) || // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER (0x11A01 <= code && code <= 0x11A06) || // Mn [6] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL SIGN O (0x11A09 <= code && code <= 0x11A0A) || // Mn [2] ZANABAZAR SQUARE VOWEL SIGN REVERSED I..ZANABAZAR SQUARE VOWEL LENGTH MARK (0x11A33 <= code && code <= 0x11A38) || // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA (0x11A3B <= code && code <= 0x11A3E) || // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA 0x11A47 == code || // Mn ZANABAZAR SQUARE SUBJOINER (0x11A51 <= code && code <= 0x11A56) || // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE (0x11A59 <= code && code <= 0x11A5B) || // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK (0x11A8A <= code && code <= 0x11A96) || // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA (0x11A98 <= code && code <= 0x11A99) || // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER (0x11C30 <= code && code <= 0x11C36) || // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L (0x11C38 <= code && code <= 0x11C3D) || // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA 0x11C3F == code || // Mn BHAIKSUKI SIGN VIRAMA (0x11C92 <= code && code <= 0x11CA7) || // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA (0x11CAA <= code && code <= 0x11CB0) || // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA (0x11CB2 <= code && code <= 0x11CB3) || // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E (0x11CB5 <= code && code <= 0x11CB6) || // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU (0x11D31 <= code && code <= 0x11D36) || // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R 0x11D3A == code || // Mn MASARAM GONDI VOWEL SIGN E (0x11D3C <= code && code <= 0x11D3D) || // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O (0x11D3F <= code && code <= 0x11D45) || // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA 0x11D47 == code || // Mn MASARAM GONDI RA-KARA (0x16AF0 <= code && code <= 0x16AF4) || // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE (0x16B30 <= code && code <= 0x16B36) || // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM (0x16F8F <= code && code <= 0x16F92) || // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW (0x1BC9D <= code && code <= 0x1BC9E) || // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK 0x1D165 == code || // Mc MUSICAL SYMBOL COMBINING STEM (0x1D167 <= code && code <= 0x1D169) || // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 (0x1D16E <= code && code <= 0x1D172) || // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 (0x1D17B <= code && code <= 0x1D182) || // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE (0x1D185 <= code && code <= 0x1D18B) || // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE (0x1D1AA <= code && code <= 0x1D1AD) || // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO (0x1D242 <= code && code <= 0x1D244) || // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME (0x1DA00 <= code && code <= 0x1DA36) || // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN (0x1DA3B <= code && code <= 0x1DA6C) || // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT 0x1DA75 == code || // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS 0x1DA84 == code || // Mn SIGNWRITING LOCATION HEAD NECK (0x1DA9B <= code && code <= 0x1DA9F) || // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 (0x1DAA1 <= code && code <= 0x1DAAF) || // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 (0x1E000 <= code && code <= 0x1E006) || // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE (0x1E008 <= code && code <= 0x1E018) || // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU (0x1E01B <= code && code <= 0x1E021) || // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI (0x1E023 <= code && code <= 0x1E024) || // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS (0x1E026 <= code && code <= 0x1E02A) || // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA (0x1E8D0 <= code && code <= 0x1E8D6) || // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS (0x1E944 <= code && code <= 0x1E94A) || // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA (0xE0020 <= code && code <= 0xE007F) || // Cf [96] TAG SPACE..CANCEL TAG (0xE0100 <= code && code <= 0xE01EF) // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 ){ return Extend; } if( (0x1F1E6 <= code && code <= 0x1F1FF) // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z ){ return Regional_Indicator; } if( 0x0903 == code || // Mc DEVANAGARI SIGN VISARGA 0x093B == code || // Mc DEVANAGARI VOWEL SIGN OOE (0x093E <= code && code <= 0x0940) || // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II (0x0949 <= code && code <= 0x094C) || // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU (0x094E <= code && code <= 0x094F) || // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW (0x0982 <= code && code <= 0x0983) || // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA (0x09BF <= code && code <= 0x09C0) || // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II (0x09C7 <= code && code <= 0x09C8) || // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI (0x09CB <= code && code <= 0x09CC) || // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU 0x0A03 == code || // Mc GURMUKHI SIGN VISARGA (0x0A3E <= code && code <= 0x0A40) || // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II 0x0A83 == code || // Mc GUJARATI SIGN VISARGA (0x0ABE <= code && code <= 0x0AC0) || // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II 0x0AC9 == code || // Mc GUJARATI VOWEL SIGN CANDRA O (0x0ACB <= code && code <= 0x0ACC) || // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU (0x0B02 <= code && code <= 0x0B03) || // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA 0x0B40 == code || // Mc ORIYA VOWEL SIGN II (0x0B47 <= code && code <= 0x0B48) || // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI (0x0B4B <= code && code <= 0x0B4C) || // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU 0x0BBF == code || // Mc TAMIL VOWEL SIGN I (0x0BC1 <= code && code <= 0x0BC2) || // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU (0x0BC6 <= code && code <= 0x0BC8) || // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI (0x0BCA <= code && code <= 0x0BCC) || // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU (0x0C01 <= code && code <= 0x0C03) || // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA (0x0C41 <= code && code <= 0x0C44) || // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR (0x0C82 <= code && code <= 0x0C83) || // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA 0x0CBE == code || // Mc KANNADA VOWEL SIGN AA (0x0CC0 <= code && code <= 0x0CC1) || // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U (0x0CC3 <= code && code <= 0x0CC4) || // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR (0x0CC7 <= code && code <= 0x0CC8) || // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI (0x0CCA <= code && code <= 0x0CCB) || // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO (0x0D02 <= code && code <= 0x0D03) || // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA (0x0D3F <= code && code <= 0x0D40) || // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II (0x0D46 <= code && code <= 0x0D48) || // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI (0x0D4A <= code && code <= 0x0D4C) || // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU (0x0D82 <= code && code <= 0x0D83) || // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA (0x0DD0 <= code && code <= 0x0DD1) || // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA (0x0DD8 <= code && code <= 0x0DDE) || // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA (0x0DF2 <= code && code <= 0x0DF3) || // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA 0x0E33 == code || // Lo THAI CHARACTER SARA AM 0x0EB3 == code || // Lo LAO VOWEL SIGN AM (0x0F3E <= code && code <= 0x0F3F) || // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES 0x0F7F == code || // Mc TIBETAN SIGN RNAM BCAD 0x1031 == code || // Mc MYANMAR VOWEL SIGN E (0x103B <= code && code <= 0x103C) || // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA (0x1056 <= code && code <= 0x1057) || // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR 0x1084 == code || // Mc MYANMAR VOWEL SIGN SHAN E 0x17B6 == code || // Mc KHMER VOWEL SIGN AA (0x17BE <= code && code <= 0x17C5) || // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU (0x17C7 <= code && code <= 0x17C8) || // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU (0x1923 <= code && code <= 0x1926) || // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU (0x1929 <= code && code <= 0x192B) || // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA (0x1930 <= code && code <= 0x1931) || // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA (0x1933 <= code && code <= 0x1938) || // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA (0x1A19 <= code && code <= 0x1A1A) || // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O 0x1A55 == code || // Mc TAI THAM CONSONANT SIGN MEDIAL RA 0x1A57 == code || // Mc TAI THAM CONSONANT SIGN LA TANG LAI (0x1A6D <= code && code <= 0x1A72) || // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI 0x1B04 == code || // Mc BALINESE SIGN BISAH 0x1B35 == code || // Mc BALINESE VOWEL SIGN TEDUNG 0x1B3B == code || // Mc BALINESE VOWEL SIGN RA REPA TEDUNG (0x1B3D <= code && code <= 0x1B41) || // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG (0x1B43 <= code && code <= 0x1B44) || // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG 0x1B82 == code || // Mc SUNDANESE SIGN PANGWISAD 0x1BA1 == code || // Mc SUNDANESE CONSONANT SIGN PAMINGKAL (0x1BA6 <= code && code <= 0x1BA7) || // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG 0x1BAA == code || // Mc SUNDANESE SIGN PAMAAEH 0x1BE7 == code || // Mc BATAK VOWEL SIGN E (0x1BEA <= code && code <= 0x1BEC) || // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O 0x1BEE == code || // Mc BATAK VOWEL SIGN U (0x1BF2 <= code && code <= 0x1BF3) || // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN (0x1C24 <= code && code <= 0x1C2B) || // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU (0x1C34 <= code && code <= 0x1C35) || // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG 0x1CE1 == code || // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA (0x1CF2 <= code && code <= 0x1CF3) || // Mc [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA 0x1CF7 == code || // Mc VEDIC SIGN ATIKRAMA (0xA823 <= code && code <= 0xA824) || // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I 0xA827 == code || // Mc SYLOTI NAGRI VOWEL SIGN OO (0xA880 <= code && code <= 0xA881) || // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA (0xA8B4 <= code && code <= 0xA8C3) || // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU (0xA952 <= code && code <= 0xA953) || // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA 0xA983 == code || // Mc JAVANESE SIGN WIGNYAN (0xA9B4 <= code && code <= 0xA9B5) || // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG (0xA9BA <= code && code <= 0xA9BB) || // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE (0xA9BD <= code && code <= 0xA9C0) || // Mc [4] JAVANESE CONSONANT SIGN KERET..JAVANESE PANGKON (0xAA2F <= code && code <= 0xAA30) || // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI (0xAA33 <= code && code <= 0xAA34) || // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA 0xAA4D == code || // Mc CHAM CONSONANT SIGN FINAL H 0xAAEB == code || // Mc MEETEI MAYEK VOWEL SIGN II (0xAAEE <= code && code <= 0xAAEF) || // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU 0xAAF5 == code || // Mc MEETEI MAYEK VOWEL SIGN VISARGA (0xABE3 <= code && code <= 0xABE4) || // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP (0xABE6 <= code && code <= 0xABE7) || // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP (0xABE9 <= code && code <= 0xABEA) || // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG 0xABEC == code || // Mc MEETEI MAYEK LUM IYEK 0x11000 == code || // Mc BRAHMI SIGN CANDRABINDU 0x11002 == code || // Mc BRAHMI SIGN VISARGA 0x11082 == code || // Mc KAITHI SIGN VISARGA (0x110B0 <= code && code <= 0x110B2) || // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II (0x110B7 <= code && code <= 0x110B8) || // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU 0x1112C == code || // Mc CHAKMA VOWEL SIGN E 0x11182 == code || // Mc SHARADA SIGN VISARGA (0x111B3 <= code && code <= 0x111B5) || // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II (0x111BF <= code && code <= 0x111C0) || // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA (0x1122C <= code && code <= 0x1122E) || // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II (0x11232 <= code && code <= 0x11233) || // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU 0x11235 == code || // Mc KHOJKI SIGN VIRAMA (0x112E0 <= code && code <= 0x112E2) || // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II (0x11302 <= code && code <= 0x11303) || // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA 0x1133F == code || // Mc GRANTHA VOWEL SIGN I (0x11341 <= code && code <= 0x11344) || // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR (0x11347 <= code && code <= 0x11348) || // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI (0x1134B <= code && code <= 0x1134D) || // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA (0x11362 <= code && code <= 0x11363) || // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL (0x11435 <= code && code <= 0x11437) || // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II (0x11440 <= code && code <= 0x11441) || // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU 0x11445 == code || // Mc NEWA SIGN VISARGA (0x114B1 <= code && code <= 0x114B2) || // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II 0x114B9 == code || // Mc TIRHUTA VOWEL SIGN E (0x114BB <= code && code <= 0x114BC) || // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O 0x114BE == code || // Mc TIRHUTA VOWEL SIGN AU 0x114C1 == code || // Mc TIRHUTA SIGN VISARGA (0x115B0 <= code && code <= 0x115B1) || // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II (0x115B8 <= code && code <= 0x115BB) || // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU 0x115BE == code || // Mc SIDDHAM SIGN VISARGA (0x11630 <= code && code <= 0x11632) || // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II (0x1163B <= code && code <= 0x1163C) || // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU 0x1163E == code || // Mc MODI SIGN VISARGA 0x116AC == code || // Mc TAKRI SIGN VISARGA (0x116AE <= code && code <= 0x116AF) || // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II 0x116B6 == code || // Mc TAKRI SIGN VIRAMA (0x11720 <= code && code <= 0x11721) || // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA 0x11726 == code || // Mc AHOM VOWEL SIGN E (0x11A07 <= code && code <= 0x11A08) || // Mc [2] ZANABAZAR SQUARE VOWEL SIGN AI..ZANABAZAR SQUARE VOWEL SIGN AU 0x11A39 == code || // Mc ZANABAZAR SQUARE SIGN VISARGA (0x11A57 <= code && code <= 0x11A58) || // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU 0x11A97 == code || // Mc SOYOMBO SIGN VISARGA 0x11C2F == code || // Mc BHAIKSUKI VOWEL SIGN AA 0x11C3E == code || // Mc BHAIKSUKI SIGN VISARGA 0x11CA9 == code || // Mc MARCHEN SUBJOINED LETTER YA 0x11CB1 == code || // Mc MARCHEN VOWEL SIGN I 0x11CB4 == code || // Mc MARCHEN VOWEL SIGN O (0x16F51 <= code && code <= 0x16F7E) || // Mc [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG 0x1D166 == code || // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM 0x1D16D == code // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT ){ return SpacingMark; } if( (0x1100 <= code && code <= 0x115F) || // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER (0xA960 <= code && code <= 0xA97C) // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH ){ return L; } if( (0x1160 <= code && code <= 0x11A7) || // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE (0xD7B0 <= code && code <= 0xD7C6) // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E ){ return V; } if( (0x11A8 <= code && code <= 0x11FF) || // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN (0xD7CB <= code && code <= 0xD7FB) // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH ){ return T; } if( 0xAC00 == code || // Lo HANGUL SYLLABLE GA 0xAC1C == code || // Lo HANGUL SYLLABLE GAE 0xAC38 == code || // Lo HANGUL SYLLABLE GYA 0xAC54 == code || // Lo HANGUL SYLLABLE GYAE 0xAC70 == code || // Lo HANGUL SYLLABLE GEO 0xAC8C == code || // Lo HANGUL SYLLABLE GE 0xACA8 == code || // Lo HANGUL SYLLABLE GYEO 0xACC4 == code || // Lo HANGUL SYLLABLE GYE 0xACE0 == code || // Lo HANGUL SYLLABLE GO 0xACFC == code || // Lo HANGUL SYLLABLE GWA 0xAD18 == code || // Lo HANGUL SYLLABLE GWAE 0xAD34 == code || // Lo HANGUL SYLLABLE GOE 0xAD50 == code || // Lo HANGUL SYLLABLE GYO 0xAD6C == code || // Lo HANGUL SYLLABLE GU 0xAD88 == code || // Lo HANGUL SYLLABLE GWEO 0xADA4 == code || // Lo HANGUL SYLLABLE GWE 0xADC0 == code || // Lo HANGUL SYLLABLE GWI 0xADDC == code || // Lo HANGUL SYLLABLE GYU 0xADF8 == code || // Lo HANGUL SYLLABLE GEU 0xAE14 == code || // Lo HANGUL SYLLABLE GYI 0xAE30 == code || // Lo HANGUL SYLLABLE GI 0xAE4C == code || // Lo HANGUL SYLLABLE GGA 0xAE68 == code || // Lo HANGUL SYLLABLE GGAE 0xAE84 == code || // Lo HANGUL SYLLABLE GGYA 0xAEA0 == code || // Lo HANGUL SYLLABLE GGYAE 0xAEBC == code || // Lo HANGUL SYLLABLE GGEO 0xAED8 == code || // Lo HANGUL SYLLABLE GGE 0xAEF4 == code || // Lo HANGUL SYLLABLE GGYEO 0xAF10 == code || // Lo HANGUL SYLLABLE GGYE 0xAF2C == code || // Lo HANGUL SYLLABLE GGO 0xAF48 == code || // Lo HANGUL SYLLABLE GGWA 0xAF64 == code || // Lo HANGUL SYLLABLE GGWAE 0xAF80 == code || // Lo HANGUL SYLLABLE GGOE 0xAF9C == code || // Lo HANGUL SYLLABLE GGYO 0xAFB8 == code || // Lo HANGUL SYLLABLE GGU 0xAFD4 == code || // Lo HANGUL SYLLABLE GGWEO 0xAFF0 == code || // Lo HANGUL SYLLABLE GGWE 0xB00C == code || // Lo HANGUL SYLLABLE GGWI 0xB028 == code || // Lo HANGUL SYLLABLE GGYU 0xB044 == code || // Lo HANGUL SYLLABLE GGEU 0xB060 == code || // Lo HANGUL SYLLABLE GGYI 0xB07C == code || // Lo HANGUL SYLLABLE GGI 0xB098 == code || // Lo HANGUL SYLLABLE NA 0xB0B4 == code || // Lo HANGUL SYLLABLE NAE 0xB0D0 == code || // Lo HANGUL SYLLABLE NYA 0xB0EC == code || // Lo HANGUL SYLLABLE NYAE 0xB108 == code || // Lo HANGUL SYLLABLE NEO 0xB124 == code || // Lo HANGUL SYLLABLE NE 0xB140 == code || // Lo HANGUL SYLLABLE NYEO 0xB15C == code || // Lo HANGUL SYLLABLE NYE 0xB178 == code || // Lo HANGUL SYLLABLE NO 0xB194 == code || // Lo HANGUL SYLLABLE NWA 0xB1B0 == code || // Lo HANGUL SYLLABLE NWAE 0xB1CC == code || // Lo HANGUL SYLLABLE NOE 0xB1E8 == code || // Lo HANGUL SYLLABLE NYO 0xB204 == code || // Lo HANGUL SYLLABLE NU 0xB220 == code || // Lo HANGUL SYLLABLE NWEO 0xB23C == code || // Lo HANGUL SYLLABLE NWE 0xB258 == code || // Lo HANGUL SYLLABLE NWI 0xB274 == code || // Lo HANGUL SYLLABLE NYU 0xB290 == code || // Lo HANGUL SYLLABLE NEU 0xB2AC == code || // Lo HANGUL SYLLABLE NYI 0xB2C8 == code || // Lo HANGUL SYLLABLE NI 0xB2E4 == code || // Lo HANGUL SYLLABLE DA 0xB300 == code || // Lo HANGUL SYLLABLE DAE 0xB31C == code || // Lo HANGUL SYLLABLE DYA 0xB338 == code || // Lo HANGUL SYLLABLE DYAE 0xB354 == code || // Lo HANGUL SYLLABLE DEO 0xB370 == code || // Lo HANGUL SYLLABLE DE 0xB38C == code || // Lo HANGUL SYLLABLE DYEO 0xB3A8 == code || // Lo HANGUL SYLLABLE DYE 0xB3C4 == code || // Lo HANGUL SYLLABLE DO 0xB3E0 == code || // Lo HANGUL SYLLABLE DWA 0xB3FC == code || // Lo HANGUL SYLLABLE DWAE 0xB418 == code || // Lo HANGUL SYLLABLE DOE 0xB434 == code || // Lo HANGUL SYLLABLE DYO 0xB450 == code || // Lo HANGUL SYLLABLE DU 0xB46C == code || // Lo HANGUL SYLLABLE DWEO 0xB488 == code || // Lo HANGUL SYLLABLE DWE 0xB4A4 == code || // Lo HANGUL SYLLABLE DWI 0xB4C0 == code || // Lo HANGUL SYLLABLE DYU 0xB4DC == code || // Lo HANGUL SYLLABLE DEU 0xB4F8 == code || // Lo HANGUL SYLLABLE DYI 0xB514 == code || // Lo HANGUL SYLLABLE DI 0xB530 == code || // Lo HANGUL SYLLABLE DDA 0xB54C == code || // Lo HANGUL SYLLABLE DDAE 0xB568 == code || // Lo HANGUL SYLLABLE DDYA 0xB584 == code || // Lo HANGUL SYLLABLE DDYAE 0xB5A0 == code || // Lo HANGUL SYLLABLE DDEO 0xB5BC == code || // Lo HANGUL SYLLABLE DDE 0xB5D8 == code || // Lo HANGUL SYLLABLE DDYEO 0xB5F4 == code || // Lo HANGUL SYLLABLE DDYE 0xB610 == code || // Lo HANGUL SYLLABLE DDO 0xB62C == code || // Lo HANGUL SYLLABLE DDWA 0xB648 == code || // Lo HANGUL SYLLABLE DDWAE 0xB664 == code || // Lo HANGUL SYLLABLE DDOE 0xB680 == code || // Lo HANGUL SYLLABLE DDYO 0xB69C == code || // Lo HANGUL SYLLABLE DDU 0xB6B8 == code || // Lo HANGUL SYLLABLE DDWEO 0xB6D4 == code || // Lo HANGUL SYLLABLE DDWE 0xB6F0 == code || // Lo HANGUL SYLLABLE DDWI 0xB70C == code || // Lo HANGUL SYLLABLE DDYU 0xB728 == code || // Lo HANGUL SYLLABLE DDEU 0xB744 == code || // Lo HANGUL SYLLABLE DDYI 0xB760 == code || // Lo HANGUL SYLLABLE DDI 0xB77C == code || // Lo HANGUL SYLLABLE RA 0xB798 == code || // Lo HANGUL SYLLABLE RAE 0xB7B4 == code || // Lo HANGUL SYLLABLE RYA 0xB7D0 == code || // Lo HANGUL SYLLABLE RYAE 0xB7EC == code || // Lo HANGUL SYLLABLE REO 0xB808 == code || // Lo HANGUL SYLLABLE RE 0xB824 == code || // Lo HANGUL SYLLABLE RYEO 0xB840 == code || // Lo HANGUL SYLLABLE RYE 0xB85C == code || // Lo HANGUL SYLLABLE RO 0xB878 == code || // Lo HANGUL SYLLABLE RWA 0xB894 == code || // Lo HANGUL SYLLABLE RWAE 0xB8B0 == code || // Lo HANGUL SYLLABLE ROE 0xB8CC == code || // Lo HANGUL SYLLABLE RYO 0xB8E8 == code || // Lo HANGUL SYLLABLE RU 0xB904 == code || // Lo HANGUL SYLLABLE RWEO 0xB920 == code || // Lo HANGUL SYLLABLE RWE 0xB93C == code || // Lo HANGUL SYLLABLE RWI 0xB958 == code || // Lo HANGUL SYLLABLE RYU 0xB974 == code || // Lo HANGUL SYLLABLE REU 0xB990 == code || // Lo HANGUL SYLLABLE RYI 0xB9AC == code || // Lo HANGUL SYLLABLE RI 0xB9C8 == code || // Lo HANGUL SYLLABLE MA 0xB9E4 == code || // Lo HANGUL SYLLABLE MAE 0xBA00 == code || // Lo HANGUL SYLLABLE MYA 0xBA1C == code || // Lo HANGUL SYLLABLE MYAE 0xBA38 == code || // Lo HANGUL SYLLABLE MEO 0xBA54 == code || // Lo HANGUL SYLLABLE ME 0xBA70 == code || // Lo HANGUL SYLLABLE MYEO 0xBA8C == code || // Lo HANGUL SYLLABLE MYE 0xBAA8 == code || // Lo HANGUL SYLLABLE MO 0xBAC4 == code || // Lo HANGUL SYLLABLE MWA 0xBAE0 == code || // Lo HANGUL SYLLABLE MWAE 0xBAFC == code || // Lo HANGUL SYLLABLE MOE 0xBB18 == code || // Lo HANGUL SYLLABLE MYO 0xBB34 == code || // Lo HANGUL SYLLABLE MU 0xBB50 == code || // Lo HANGUL SYLLABLE MWEO 0xBB6C == code || // Lo HANGUL SYLLABLE MWE 0xBB88 == code || // Lo HANGUL SYLLABLE MWI 0xBBA4 == code || // Lo HANGUL SYLLABLE MYU 0xBBC0 == code || // Lo HANGUL SYLLABLE MEU 0xBBDC == code || // Lo HANGUL SYLLABLE MYI 0xBBF8 == code || // Lo HANGUL SYLLABLE MI 0xBC14 == code || // Lo HANGUL SYLLABLE BA 0xBC30 == code || // Lo HANGUL SYLLABLE BAE 0xBC4C == code || // Lo HANGUL SYLLABLE BYA 0xBC68 == code || // Lo HANGUL SYLLABLE BYAE 0xBC84 == code || // Lo HANGUL SYLLABLE BEO 0xBCA0 == code || // Lo HANGUL SYLLABLE BE 0xBCBC == code || // Lo HANGUL SYLLABLE BYEO 0xBCD8 == code || // Lo HANGUL SYLLABLE BYE 0xBCF4 == code || // Lo HANGUL SYLLABLE BO 0xBD10 == code || // Lo HANGUL SYLLABLE BWA 0xBD2C == code || // Lo HANGUL SYLLABLE BWAE 0xBD48 == code || // Lo HANGUL SYLLABLE BOE 0xBD64 == code || // Lo HANGUL SYLLABLE BYO 0xBD80 == code || // Lo HANGUL SYLLABLE BU 0xBD9C == code || // Lo HANGUL SYLLABLE BWEO 0xBDB8 == code || // Lo HANGUL SYLLABLE BWE 0xBDD4 == code || // Lo HANGUL SYLLABLE BWI 0xBDF0 == code || // Lo HANGUL SYLLABLE BYU 0xBE0C == code || // Lo HANGUL SYLLABLE BEU 0xBE28 == code || // Lo HANGUL SYLLABLE BYI 0xBE44 == code || // Lo HANGUL SYLLABLE BI 0xBE60 == code || // Lo HANGUL SYLLABLE BBA 0xBE7C == code || // Lo HANGUL SYLLABLE BBAE 0xBE98 == code || // Lo HANGUL SYLLABLE BBYA 0xBEB4 == code || // Lo HANGUL SYLLABLE BBYAE 0xBED0 == code || // Lo HANGUL SYLLABLE BBEO 0xBEEC == code || // Lo HANGUL SYLLABLE BBE 0xBF08 == code || // Lo HANGUL SYLLABLE BBYEO 0xBF24 == code || // Lo HANGUL SYLLABLE BBYE 0xBF40 == code || // Lo HANGUL SYLLABLE BBO 0xBF5C == code || // Lo HANGUL SYLLABLE BBWA 0xBF78 == code || // Lo HANGUL SYLLABLE BBWAE 0xBF94 == code || // Lo HANGUL SYLLABLE BBOE 0xBFB0 == code || // Lo HANGUL SYLLABLE BBYO 0xBFCC == code || // Lo HANGUL SYLLABLE BBU 0xBFE8 == code || // Lo HANGUL SYLLABLE BBWEO 0xC004 == code || // Lo HANGUL SYLLABLE BBWE 0xC020 == code || // Lo HANGUL SYLLABLE BBWI 0xC03C == code || // Lo HANGUL SYLLABLE BBYU 0xC058 == code || // Lo HANGUL SYLLABLE BBEU 0xC074 == code || // Lo HANGUL SYLLABLE BBYI 0xC090 == code || // Lo HANGUL SYLLABLE BBI 0xC0AC == code || // Lo HANGUL SYLLABLE SA 0xC0C8 == code || // Lo HANGUL SYLLABLE SAE 0xC0E4 == code || // Lo HANGUL SYLLABLE SYA 0xC100 == code || // Lo HANGUL SYLLABLE SYAE 0xC11C == code || // Lo HANGUL SYLLABLE SEO 0xC138 == code || // Lo HANGUL SYLLABLE SE 0xC154 == code || // Lo HANGUL SYLLABLE SYEO 0xC170 == code || // Lo HANGUL SYLLABLE SYE 0xC18C == code || // Lo HANGUL SYLLABLE SO 0xC1A8 == code || // Lo HANGUL SYLLABLE SWA 0xC1C4 == code || // Lo HANGUL SYLLABLE SWAE 0xC1E0 == code || // Lo HANGUL SYLLABLE SOE 0xC1FC == code || // Lo HANGUL SYLLABLE SYO 0xC218 == code || // Lo HANGUL SYLLABLE SU 0xC234 == code || // Lo HANGUL SYLLABLE SWEO 0xC250 == code || // Lo HANGUL SYLLABLE SWE 0xC26C == code || // Lo HANGUL SYLLABLE SWI 0xC288 == code || // Lo HANGUL SYLLABLE SYU 0xC2A4 == code || // Lo HANGUL SYLLABLE SEU 0xC2C0 == code || // Lo HANGUL SYLLABLE SYI 0xC2DC == code || // Lo HANGUL SYLLABLE SI 0xC2F8 == code || // Lo HANGUL SYLLABLE SSA 0xC314 == code || // Lo HANGUL SYLLABLE SSAE 0xC330 == code || // Lo HANGUL SYLLABLE SSYA 0xC34C == code || // Lo HANGUL SYLLABLE SSYAE 0xC368 == code || // Lo HANGUL SYLLABLE SSEO 0xC384 == code || // Lo HANGUL SYLLABLE SSE 0xC3A0 == code || // Lo HANGUL SYLLABLE SSYEO 0xC3BC == code || // Lo HANGUL SYLLABLE SSYE 0xC3D8 == code || // Lo HANGUL SYLLABLE SSO 0xC3F4 == code || // Lo HANGUL SYLLABLE SSWA 0xC410 == code || // Lo HANGUL SYLLABLE SSWAE 0xC42C == code || // Lo HANGUL SYLLABLE SSOE 0xC448 == code || // Lo HANGUL SYLLABLE SSYO 0xC464 == code || // Lo HANGUL SYLLABLE SSU 0xC480 == code || // Lo HANGUL SYLLABLE SSWEO 0xC49C == code || // Lo HANGUL SYLLABLE SSWE 0xC4B8 == code || // Lo HANGUL SYLLABLE SSWI 0xC4D4 == code || // Lo HANGUL SYLLABLE SSYU 0xC4F0 == code || // Lo HANGUL SYLLABLE SSEU 0xC50C == code || // Lo HANGUL SYLLABLE SSYI 0xC528 == code || // Lo HANGUL SYLLABLE SSI 0xC544 == code || // Lo HANGUL SYLLABLE A 0xC560 == code || // Lo HANGUL SYLLABLE AE 0xC57C == code || // Lo HANGUL SYLLABLE YA 0xC598 == code || // Lo HANGUL SYLLABLE YAE 0xC5B4 == code || // Lo HANGUL SYLLABLE EO 0xC5D0 == code || // Lo HANGUL SYLLABLE E 0xC5EC == code || // Lo HANGUL SYLLABLE YEO 0xC608 == code || // Lo HANGUL SYLLABLE YE 0xC624 == code || // Lo HANGUL SYLLABLE O 0xC640 == code || // Lo HANGUL SYLLABLE WA 0xC65C == code || // Lo HANGUL SYLLABLE WAE 0xC678 == code || // Lo HANGUL SYLLABLE OE 0xC694 == code || // Lo HANGUL SYLLABLE YO 0xC6B0 == code || // Lo HANGUL SYLLABLE U 0xC6CC == code || // Lo HANGUL SYLLABLE WEO 0xC6E8 == code || // Lo HANGUL SYLLABLE WE 0xC704 == code || // Lo HANGUL SYLLABLE WI 0xC720 == code || // Lo HANGUL SYLLABLE YU 0xC73C == code || // Lo HANGUL SYLLABLE EU 0xC758 == code || // Lo HANGUL SYLLABLE YI 0xC774 == code || // Lo HANGUL SYLLABLE I 0xC790 == code || // Lo HANGUL SYLLABLE JA 0xC7AC == code || // Lo HANGUL SYLLABLE JAE 0xC7C8 == code || // Lo HANGUL SYLLABLE JYA 0xC7E4 == code || // Lo HANGUL SYLLABLE JYAE 0xC800 == code || // Lo HANGUL SYLLABLE JEO 0xC81C == code || // Lo HANGUL SYLLABLE JE 0xC838 == code || // Lo HANGUL SYLLABLE JYEO 0xC854 == code || // Lo HANGUL SYLLABLE JYE 0xC870 == code || // Lo HANGUL SYLLABLE JO 0xC88C == code || // Lo HANGUL SYLLABLE JWA 0xC8A8 == code || // Lo HANGUL SYLLABLE JWAE 0xC8C4 == code || // Lo HANGUL SYLLABLE JOE 0xC8E0 == code || // Lo HANGUL SYLLABLE JYO 0xC8FC == code || // Lo HANGUL SYLLABLE JU 0xC918 == code || // Lo HANGUL SYLLABLE JWEO 0xC934 == code || // Lo HANGUL SYLLABLE JWE 0xC950 == code || // Lo HANGUL SYLLABLE JWI 0xC96C == code || // Lo HANGUL SYLLABLE JYU 0xC988 == code || // Lo HANGUL SYLLABLE JEU 0xC9A4 == code || // Lo HANGUL SYLLABLE JYI 0xC9C0 == code || // Lo HANGUL SYLLABLE JI 0xC9DC == code || // Lo HANGUL SYLLABLE JJA 0xC9F8 == code || // Lo HANGUL SYLLABLE JJAE 0xCA14 == code || // Lo HANGUL SYLLABLE JJYA 0xCA30 == code || // Lo HANGUL SYLLABLE JJYAE 0xCA4C == code || // Lo HANGUL SYLLABLE JJEO 0xCA68 == code || // Lo HANGUL SYLLABLE JJE 0xCA84 == code || // Lo HANGUL SYLLABLE JJYEO 0xCAA0 == code || // Lo HANGUL SYLLABLE JJYE 0xCABC == code || // Lo HANGUL SYLLABLE JJO 0xCAD8 == code || // Lo HANGUL SYLLABLE JJWA 0xCAF4 == code || // Lo HANGUL SYLLABLE JJWAE 0xCB10 == code || // Lo HANGUL SYLLABLE JJOE 0xCB2C == code || // Lo HANGUL SYLLABLE JJYO 0xCB48 == code || // Lo HANGUL SYLLABLE JJU 0xCB64 == code || // Lo HANGUL SYLLABLE JJWEO 0xCB80 == code || // Lo HANGUL SYLLABLE JJWE 0xCB9C == code || // Lo HANGUL SYLLABLE JJWI 0xCBB8 == code || // Lo HANGUL SYLLABLE JJYU 0xCBD4 == code || // Lo HANGUL SYLLABLE JJEU 0xCBF0 == code || // Lo HANGUL SYLLABLE JJYI 0xCC0C == code || // Lo HANGUL SYLLABLE JJI 0xCC28 == code || // Lo HANGUL SYLLABLE CA 0xCC44 == code || // Lo HANGUL SYLLABLE CAE 0xCC60 == code || // Lo HANGUL SYLLABLE CYA 0xCC7C == code || // Lo HANGUL SYLLABLE CYAE 0xCC98 == code || // Lo HANGUL SYLLABLE CEO 0xCCB4 == code || // Lo HANGUL SYLLABLE CE 0xCCD0 == code || // Lo HANGUL SYLLABLE CYEO 0xCCEC == code || // Lo HANGUL SYLLABLE CYE 0xCD08 == code || // Lo HANGUL SYLLABLE CO 0xCD24 == code || // Lo HANGUL SYLLABLE CWA 0xCD40 == code || // Lo HANGUL SYLLABLE CWAE 0xCD5C == code || // Lo HANGUL SYLLABLE COE 0xCD78 == code || // Lo HANGUL SYLLABLE CYO 0xCD94 == code || // Lo HANGUL SYLLABLE CU 0xCDB0 == code || // Lo HANGUL SYLLABLE CWEO 0xCDCC == code || // Lo HANGUL SYLLABLE CWE 0xCDE8 == code || // Lo HANGUL SYLLABLE CWI 0xCE04 == code || // Lo HANGUL SYLLABLE CYU 0xCE20 == code || // Lo HANGUL SYLLABLE CEU 0xCE3C == code || // Lo HANGUL SYLLABLE CYI 0xCE58 == code || // Lo HANGUL SYLLABLE CI 0xCE74 == code || // Lo HANGUL SYLLABLE KA 0xCE90 == code || // Lo HANGUL SYLLABLE KAE 0xCEAC == code || // Lo HANGUL SYLLABLE KYA 0xCEC8 == code || // Lo HANGUL SYLLABLE KYAE 0xCEE4 == code || // Lo HANGUL SYLLABLE KEO 0xCF00 == code || // Lo HANGUL SYLLABLE KE 0xCF1C == code || // Lo HANGUL SYLLABLE KYEO 0xCF38 == code || // Lo HANGUL SYLLABLE KYE 0xCF54 == code || // Lo HANGUL SYLLABLE KO 0xCF70 == code || // Lo HANGUL SYLLABLE KWA 0xCF8C == code || // Lo HANGUL SYLLABLE KWAE 0xCFA8 == code || // Lo HANGUL SYLLABLE KOE 0xCFC4 == code || // Lo HANGUL SYLLABLE KYO 0xCFE0 == code || // Lo HANGUL SYLLABLE KU 0xCFFC == code || // Lo HANGUL SYLLABLE KWEO 0xD018 == code || // Lo HANGUL SYLLABLE KWE 0xD034 == code || // Lo HANGUL SYLLABLE KWI 0xD050 == code || // Lo HANGUL SYLLABLE KYU 0xD06C == code || // Lo HANGUL SYLLABLE KEU 0xD088 == code || // Lo HANGUL SYLLABLE KYI 0xD0A4 == code || // Lo HANGUL SYLLABLE KI 0xD0C0 == code || // Lo HANGUL SYLLABLE TA 0xD0DC == code || // Lo HANGUL SYLLABLE TAE 0xD0F8 == code || // Lo HANGUL SYLLABLE TYA 0xD114 == code || // Lo HANGUL SYLLABLE TYAE 0xD130 == code || // Lo HANGUL SYLLABLE TEO 0xD14C == code || // Lo HANGUL SYLLABLE TE 0xD168 == code || // Lo HANGUL SYLLABLE TYEO 0xD184 == code || // Lo HANGUL SYLLABLE TYE 0xD1A0 == code || // Lo HANGUL SYLLABLE TO 0xD1BC == code || // Lo HANGUL SYLLABLE TWA 0xD1D8 == code || // Lo HANGUL SYLLABLE TWAE 0xD1F4 == code || // Lo HANGUL SYLLABLE TOE 0xD210 == code || // Lo HANGUL SYLLABLE TYO 0xD22C == code || // Lo HANGUL SYLLABLE TU 0xD248 == code || // Lo HANGUL SYLLABLE TWEO 0xD264 == code || // Lo HANGUL SYLLABLE TWE 0xD280 == code || // Lo HANGUL SYLLABLE TWI 0xD29C == code || // Lo HANGUL SYLLABLE TYU 0xD2B8 == code || // Lo HANGUL SYLLABLE TEU 0xD2D4 == code || // Lo HANGUL SYLLABLE TYI 0xD2F0 == code || // Lo HANGUL SYLLABLE TI 0xD30C == code || // Lo HANGUL SYLLABLE PA 0xD328 == code || // Lo HANGUL SYLLABLE PAE 0xD344 == code || // Lo HANGUL SYLLABLE PYA 0xD360 == code || // Lo HANGUL SYLLABLE PYAE 0xD37C == code || // Lo HANGUL SYLLABLE PEO 0xD398 == code || // Lo HANGUL SYLLABLE PE 0xD3B4 == code || // Lo HANGUL SYLLABLE PYEO 0xD3D0 == code || // Lo HANGUL SYLLABLE PYE 0xD3EC == code || // Lo HANGUL SYLLABLE PO 0xD408 == code || // Lo HANGUL SYLLABLE PWA 0xD424 == code || // Lo HANGUL SYLLABLE PWAE 0xD440 == code || // Lo HANGUL SYLLABLE POE 0xD45C == code || // Lo HANGUL SYLLABLE PYO 0xD478 == code || // Lo HANGUL SYLLABLE PU 0xD494 == code || // Lo HANGUL SYLLABLE PWEO 0xD4B0 == code || // Lo HANGUL SYLLABLE PWE 0xD4CC == code || // Lo HANGUL SYLLABLE PWI 0xD4E8 == code || // Lo HANGUL SYLLABLE PYU 0xD504 == code || // Lo HANGUL SYLLABLE PEU 0xD520 == code || // Lo HANGUL SYLLABLE PYI 0xD53C == code || // Lo HANGUL SYLLABLE PI 0xD558 == code || // Lo HANGUL SYLLABLE HA 0xD574 == code || // Lo HANGUL SYLLABLE HAE 0xD590 == code || // Lo HANGUL SYLLABLE HYA 0xD5AC == code || // Lo HANGUL SYLLABLE HYAE 0xD5C8 == code || // Lo HANGUL SYLLABLE HEO 0xD5E4 == code || // Lo HANGUL SYLLABLE HE 0xD600 == code || // Lo HANGUL SYLLABLE HYEO 0xD61C == code || // Lo HANGUL SYLLABLE HYE 0xD638 == code || // Lo HANGUL SYLLABLE HO 0xD654 == code || // Lo HANGUL SYLLABLE HWA 0xD670 == code || // Lo HANGUL SYLLABLE HWAE 0xD68C == code || // Lo HANGUL SYLLABLE HOE 0xD6A8 == code || // Lo HANGUL SYLLABLE HYO 0xD6C4 == code || // Lo HANGUL SYLLABLE HU 0xD6E0 == code || // Lo HANGUL SYLLABLE HWEO 0xD6FC == code || // Lo HANGUL SYLLABLE HWE 0xD718 == code || // Lo HANGUL SYLLABLE HWI 0xD734 == code || // Lo HANGUL SYLLABLE HYU 0xD750 == code || // Lo HANGUL SYLLABLE HEU 0xD76C == code || // Lo HANGUL SYLLABLE HYI 0xD788 == code // Lo HANGUL SYLLABLE HI ){ return LV; } if( (0xAC01 <= code && code <= 0xAC1B) || // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH (0xAC1D <= code && code <= 0xAC37) || // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH (0xAC39 <= code && code <= 0xAC53) || // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH (0xAC55 <= code && code <= 0xAC6F) || // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH (0xAC71 <= code && code <= 0xAC8B) || // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH (0xAC8D <= code && code <= 0xACA7) || // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH (0xACA9 <= code && code <= 0xACC3) || // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH (0xACC5 <= code && code <= 0xACDF) || // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH (0xACE1 <= code && code <= 0xACFB) || // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH (0xACFD <= code && code <= 0xAD17) || // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH (0xAD19 <= code && code <= 0xAD33) || // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH (0xAD35 <= code && code <= 0xAD4F) || // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH (0xAD51 <= code && code <= 0xAD6B) || // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH (0xAD6D <= code && code <= 0xAD87) || // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH (0xAD89 <= code && code <= 0xADA3) || // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH (0xADA5 <= code && code <= 0xADBF) || // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH (0xADC1 <= code && code <= 0xADDB) || // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH (0xADDD <= code && code <= 0xADF7) || // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH (0xADF9 <= code && code <= 0xAE13) || // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH (0xAE15 <= code && code <= 0xAE2F) || // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH (0xAE31 <= code && code <= 0xAE4B) || // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH (0xAE4D <= code && code <= 0xAE67) || // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH (0xAE69 <= code && code <= 0xAE83) || // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH (0xAE85 <= code && code <= 0xAE9F) || // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH (0xAEA1 <= code && code <= 0xAEBB) || // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH (0xAEBD <= code && code <= 0xAED7) || // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH (0xAED9 <= code && code <= 0xAEF3) || // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH (0xAEF5 <= code && code <= 0xAF0F) || // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH (0xAF11 <= code && code <= 0xAF2B) || // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH (0xAF2D <= code && code <= 0xAF47) || // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH (0xAF49 <= code && code <= 0xAF63) || // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH (0xAF65 <= code && code <= 0xAF7F) || // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH (0xAF81 <= code && code <= 0xAF9B) || // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH (0xAF9D <= code && code <= 0xAFB7) || // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH (0xAFB9 <= code && code <= 0xAFD3) || // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH (0xAFD5 <= code && code <= 0xAFEF) || // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH (0xAFF1 <= code && code <= 0xB00B) || // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH (0xB00D <= code && code <= 0xB027) || // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH (0xB029 <= code && code <= 0xB043) || // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH (0xB045 <= code && code <= 0xB05F) || // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH (0xB061 <= code && code <= 0xB07B) || // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH (0xB07D <= code && code <= 0xB097) || // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH (0xB099 <= code && code <= 0xB0B3) || // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH (0xB0B5 <= code && code <= 0xB0CF) || // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH (0xB0D1 <= code && code <= 0xB0EB) || // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH (0xB0ED <= code && code <= 0xB107) || // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH (0xB109 <= code && code <= 0xB123) || // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH (0xB125 <= code && code <= 0xB13F) || // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH (0xB141 <= code && code <= 0xB15B) || // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH (0xB15D <= code && code <= 0xB177) || // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH (0xB179 <= code && code <= 0xB193) || // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH (0xB195 <= code && code <= 0xB1AF) || // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH (0xB1B1 <= code && code <= 0xB1CB) || // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH (0xB1CD <= code && code <= 0xB1E7) || // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH (0xB1E9 <= code && code <= 0xB203) || // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH (0xB205 <= code && code <= 0xB21F) || // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH (0xB221 <= code && code <= 0xB23B) || // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH (0xB23D <= code && code <= 0xB257) || // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH (0xB259 <= code && code <= 0xB273) || // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH (0xB275 <= code && code <= 0xB28F) || // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH (0xB291 <= code && code <= 0xB2AB) || // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH (0xB2AD <= code && code <= 0xB2C7) || // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH (0xB2C9 <= code && code <= 0xB2E3) || // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH (0xB2E5 <= code && code <= 0xB2FF) || // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH (0xB301 <= code && code <= 0xB31B) || // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH (0xB31D <= code && code <= 0xB337) || // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH (0xB339 <= code && code <= 0xB353) || // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH (0xB355 <= code && code <= 0xB36F) || // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH (0xB371 <= code && code <= 0xB38B) || // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH (0xB38D <= code && code <= 0xB3A7) || // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH (0xB3A9 <= code && code <= 0xB3C3) || // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH (0xB3C5 <= code && code <= 0xB3DF) || // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH (0xB3E1 <= code && code <= 0xB3FB) || // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH (0xB3FD <= code && code <= 0xB417) || // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH (0xB419 <= code && code <= 0xB433) || // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH (0xB435 <= code && code <= 0xB44F) || // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH (0xB451 <= code && code <= 0xB46B) || // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH (0xB46D <= code && code <= 0xB487) || // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH (0xB489 <= code && code <= 0xB4A3) || // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH (0xB4A5 <= code && code <= 0xB4BF) || // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH (0xB4C1 <= code && code <= 0xB4DB) || // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH (0xB4DD <= code && code <= 0xB4F7) || // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH (0xB4F9 <= code && code <= 0xB513) || // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH (0xB515 <= code && code <= 0xB52F) || // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH (0xB531 <= code && code <= 0xB54B) || // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH (0xB54D <= code && code <= 0xB567) || // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH (0xB569 <= code && code <= 0xB583) || // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH (0xB585 <= code && code <= 0xB59F) || // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH (0xB5A1 <= code && code <= 0xB5BB) || // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH (0xB5BD <= code && code <= 0xB5D7) || // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH (0xB5D9 <= code && code <= 0xB5F3) || // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH (0xB5F5 <= code && code <= 0xB60F) || // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH (0xB611 <= code && code <= 0xB62B) || // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH (0xB62D <= code && code <= 0xB647) || // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH (0xB649 <= code && code <= 0xB663) || // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH (0xB665 <= code && code <= 0xB67F) || // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH (0xB681 <= code && code <= 0xB69B) || // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH (0xB69D <= code && code <= 0xB6B7) || // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH (0xB6B9 <= code && code <= 0xB6D3) || // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH (0xB6D5 <= code && code <= 0xB6EF) || // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH (0xB6F1 <= code && code <= 0xB70B) || // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH (0xB70D <= code && code <= 0xB727) || // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH (0xB729 <= code && code <= 0xB743) || // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH (0xB745 <= code && code <= 0xB75F) || // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH (0xB761 <= code && code <= 0xB77B) || // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH (0xB77D <= code && code <= 0xB797) || // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH (0xB799 <= code && code <= 0xB7B3) || // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH (0xB7B5 <= code && code <= 0xB7CF) || // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH (0xB7D1 <= code && code <= 0xB7EB) || // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH (0xB7ED <= code && code <= 0xB807) || // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH (0xB809 <= code && code <= 0xB823) || // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH (0xB825 <= code && code <= 0xB83F) || // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH (0xB841 <= code && code <= 0xB85B) || // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH (0xB85D <= code && code <= 0xB877) || // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH (0xB879 <= code && code <= 0xB893) || // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH (0xB895 <= code && code <= 0xB8AF) || // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH (0xB8B1 <= code && code <= 0xB8CB) || // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH (0xB8CD <= code && code <= 0xB8E7) || // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH (0xB8E9 <= code && code <= 0xB903) || // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH (0xB905 <= code && code <= 0xB91F) || // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH (0xB921 <= code && code <= 0xB93B) || // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH (0xB93D <= code && code <= 0xB957) || // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH (0xB959 <= code && code <= 0xB973) || // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH (0xB975 <= code && code <= 0xB98F) || // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH (0xB991 <= code && code <= 0xB9AB) || // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH (0xB9AD <= code && code <= 0xB9C7) || // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH (0xB9C9 <= code && code <= 0xB9E3) || // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH (0xB9E5 <= code && code <= 0xB9FF) || // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH (0xBA01 <= code && code <= 0xBA1B) || // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH (0xBA1D <= code && code <= 0xBA37) || // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH (0xBA39 <= code && code <= 0xBA53) || // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH (0xBA55 <= code && code <= 0xBA6F) || // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH (0xBA71 <= code && code <= 0xBA8B) || // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH (0xBA8D <= code && code <= 0xBAA7) || // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH (0xBAA9 <= code && code <= 0xBAC3) || // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH (0xBAC5 <= code && code <= 0xBADF) || // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH (0xBAE1 <= code && code <= 0xBAFB) || // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH (0xBAFD <= code && code <= 0xBB17) || // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH (0xBB19 <= code && code <= 0xBB33) || // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH (0xBB35 <= code && code <= 0xBB4F) || // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH (0xBB51 <= code && code <= 0xBB6B) || // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH (0xBB6D <= code && code <= 0xBB87) || // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH (0xBB89 <= code && code <= 0xBBA3) || // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH (0xBBA5 <= code && code <= 0xBBBF) || // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH (0xBBC1 <= code && code <= 0xBBDB) || // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH (0xBBDD <= code && code <= 0xBBF7) || // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH (0xBBF9 <= code && code <= 0xBC13) || // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH (0xBC15 <= code && code <= 0xBC2F) || // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH (0xBC31 <= code && code <= 0xBC4B) || // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH (0xBC4D <= code && code <= 0xBC67) || // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH (0xBC69 <= code && code <= 0xBC83) || // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH (0xBC85 <= code && code <= 0xBC9F) || // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH (0xBCA1 <= code && code <= 0xBCBB) || // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH (0xBCBD <= code && code <= 0xBCD7) || // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH (0xBCD9 <= code && code <= 0xBCF3) || // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH (0xBCF5 <= code && code <= 0xBD0F) || // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH (0xBD11 <= code && code <= 0xBD2B) || // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH (0xBD2D <= code && code <= 0xBD47) || // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH (0xBD49 <= code && code <= 0xBD63) || // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH (0xBD65 <= code && code <= 0xBD7F) || // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH (0xBD81 <= code && code <= 0xBD9B) || // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH (0xBD9D <= code && code <= 0xBDB7) || // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH (0xBDB9 <= code && code <= 0xBDD3) || // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH (0xBDD5 <= code && code <= 0xBDEF) || // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH (0xBDF1 <= code && code <= 0xBE0B) || // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH (0xBE0D <= code && code <= 0xBE27) || // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH (0xBE29 <= code && code <= 0xBE43) || // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH (0xBE45 <= code && code <= 0xBE5F) || // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH (0xBE61 <= code && code <= 0xBE7B) || // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH (0xBE7D <= code && code <= 0xBE97) || // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH (0xBE99 <= code && code <= 0xBEB3) || // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH (0xBEB5 <= code && code <= 0xBECF) || // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH (0xBED1 <= code && code <= 0xBEEB) || // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH (0xBEED <= code && code <= 0xBF07) || // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH (0xBF09 <= code && code <= 0xBF23) || // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH (0xBF25 <= code && code <= 0xBF3F) || // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH (0xBF41 <= code && code <= 0xBF5B) || // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH (0xBF5D <= code && code <= 0xBF77) || // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH (0xBF79 <= code && code <= 0xBF93) || // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH (0xBF95 <= code && code <= 0xBFAF) || // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH (0xBFB1 <= code && code <= 0xBFCB) || // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH (0xBFCD <= code && code <= 0xBFE7) || // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH (0xBFE9 <= code && code <= 0xC003) || // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH (0xC005 <= code && code <= 0xC01F) || // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH (0xC021 <= code && code <= 0xC03B) || // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH (0xC03D <= code && code <= 0xC057) || // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH (0xC059 <= code && code <= 0xC073) || // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH (0xC075 <= code && code <= 0xC08F) || // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH (0xC091 <= code && code <= 0xC0AB) || // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH (0xC0AD <= code && code <= 0xC0C7) || // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH (0xC0C9 <= code && code <= 0xC0E3) || // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH (0xC0E5 <= code && code <= 0xC0FF) || // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH (0xC101 <= code && code <= 0xC11B) || // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH (0xC11D <= code && code <= 0xC137) || // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH (0xC139 <= code && code <= 0xC153) || // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH (0xC155 <= code && code <= 0xC16F) || // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH (0xC171 <= code && code <= 0xC18B) || // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH (0xC18D <= code && code <= 0xC1A7) || // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH (0xC1A9 <= code && code <= 0xC1C3) || // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH (0xC1C5 <= code && code <= 0xC1DF) || // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH (0xC1E1 <= code && code <= 0xC1FB) || // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH (0xC1FD <= code && code <= 0xC217) || // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH (0xC219 <= code && code <= 0xC233) || // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH (0xC235 <= code && code <= 0xC24F) || // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH (0xC251 <= code && code <= 0xC26B) || // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH (0xC26D <= code && code <= 0xC287) || // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH (0xC289 <= code && code <= 0xC2A3) || // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH (0xC2A5 <= code && code <= 0xC2BF) || // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH (0xC2C1 <= code && code <= 0xC2DB) || // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH (0xC2DD <= code && code <= 0xC2F7) || // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH (0xC2F9 <= code && code <= 0xC313) || // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH (0xC315 <= code && code <= 0xC32F) || // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH (0xC331 <= code && code <= 0xC34B) || // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH (0xC34D <= code && code <= 0xC367) || // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH (0xC369 <= code && code <= 0xC383) || // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH (0xC385 <= code && code <= 0xC39F) || // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH (0xC3A1 <= code && code <= 0xC3BB) || // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH (0xC3BD <= code && code <= 0xC3D7) || // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH (0xC3D9 <= code && code <= 0xC3F3) || // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH (0xC3F5 <= code && code <= 0xC40F) || // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH (0xC411 <= code && code <= 0xC42B) || // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH (0xC42D <= code && code <= 0xC447) || // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH (0xC449 <= code && code <= 0xC463) || // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH (0xC465 <= code && code <= 0xC47F) || // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH (0xC481 <= code && code <= 0xC49B) || // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH (0xC49D <= code && code <= 0xC4B7) || // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH (0xC4B9 <= code && code <= 0xC4D3) || // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH (0xC4D5 <= code && code <= 0xC4EF) || // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH (0xC4F1 <= code && code <= 0xC50B) || // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH (0xC50D <= code && code <= 0xC527) || // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH (0xC529 <= code && code <= 0xC543) || // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH (0xC545 <= code && code <= 0xC55F) || // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH (0xC561 <= code && code <= 0xC57B) || // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH (0xC57D <= code && code <= 0xC597) || // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH (0xC599 <= code && code <= 0xC5B3) || // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH (0xC5B5 <= code && code <= 0xC5CF) || // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH (0xC5D1 <= code && code <= 0xC5EB) || // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH (0xC5ED <= code && code <= 0xC607) || // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH (0xC609 <= code && code <= 0xC623) || // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH (0xC625 <= code && code <= 0xC63F) || // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH (0xC641 <= code && code <= 0xC65B) || // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH (0xC65D <= code && code <= 0xC677) || // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH (0xC679 <= code && code <= 0xC693) || // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH (0xC695 <= code && code <= 0xC6AF) || // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH (0xC6B1 <= code && code <= 0xC6CB) || // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH (0xC6CD <= code && code <= 0xC6E7) || // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH (0xC6E9 <= code && code <= 0xC703) || // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH (0xC705 <= code && code <= 0xC71F) || // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH (0xC721 <= code && code <= 0xC73B) || // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH (0xC73D <= code && code <= 0xC757) || // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH (0xC759 <= code && code <= 0xC773) || // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH (0xC775 <= code && code <= 0xC78F) || // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH (0xC791 <= code && code <= 0xC7AB) || // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH (0xC7AD <= code && code <= 0xC7C7) || // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH (0xC7C9 <= code && code <= 0xC7E3) || // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH (0xC7E5 <= code && code <= 0xC7FF) || // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH (0xC801 <= code && code <= 0xC81B) || // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH (0xC81D <= code && code <= 0xC837) || // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH (0xC839 <= code && code <= 0xC853) || // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH (0xC855 <= code && code <= 0xC86F) || // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH (0xC871 <= code && code <= 0xC88B) || // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH (0xC88D <= code && code <= 0xC8A7) || // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH (0xC8A9 <= code && code <= 0xC8C3) || // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH (0xC8C5 <= code && code <= 0xC8DF) || // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH (0xC8E1 <= code && code <= 0xC8FB) || // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH (0xC8FD <= code && code <= 0xC917) || // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH (0xC919 <= code && code <= 0xC933) || // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH (0xC935 <= code && code <= 0xC94F) || // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH (0xC951 <= code && code <= 0xC96B) || // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH (0xC96D <= code && code <= 0xC987) || // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH (0xC989 <= code && code <= 0xC9A3) || // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH (0xC9A5 <= code && code <= 0xC9BF) || // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH (0xC9C1 <= code && code <= 0xC9DB) || // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH (0xC9DD <= code && code <= 0xC9F7) || // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH (0xC9F9 <= code && code <= 0xCA13) || // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH (0xCA15 <= code && code <= 0xCA2F) || // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH (0xCA31 <= code && code <= 0xCA4B) || // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH (0xCA4D <= code && code <= 0xCA67) || // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH (0xCA69 <= code && code <= 0xCA83) || // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH (0xCA85 <= code && code <= 0xCA9F) || // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH (0xCAA1 <= code && code <= 0xCABB) || // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH (0xCABD <= code && code <= 0xCAD7) || // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH (0xCAD9 <= code && code <= 0xCAF3) || // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH (0xCAF5 <= code && code <= 0xCB0F) || // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH (0xCB11 <= code && code <= 0xCB2B) || // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH (0xCB2D <= code && code <= 0xCB47) || // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH (0xCB49 <= code && code <= 0xCB63) || // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH (0xCB65 <= code && code <= 0xCB7F) || // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH (0xCB81 <= code && code <= 0xCB9B) || // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH (0xCB9D <= code && code <= 0xCBB7) || // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH (0xCBB9 <= code && code <= 0xCBD3) || // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH (0xCBD5 <= code && code <= 0xCBEF) || // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH (0xCBF1 <= code && code <= 0xCC0B) || // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH (0xCC0D <= code && code <= 0xCC27) || // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH (0xCC29 <= code && code <= 0xCC43) || // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH (0xCC45 <= code && code <= 0xCC5F) || // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH (0xCC61 <= code && code <= 0xCC7B) || // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH (0xCC7D <= code && code <= 0xCC97) || // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH (0xCC99 <= code && code <= 0xCCB3) || // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH (0xCCB5 <= code && code <= 0xCCCF) || // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH (0xCCD1 <= code && code <= 0xCCEB) || // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH (0xCCED <= code && code <= 0xCD07) || // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH (0xCD09 <= code && code <= 0xCD23) || // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH (0xCD25 <= code && code <= 0xCD3F) || // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH (0xCD41 <= code && code <= 0xCD5B) || // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH (0xCD5D <= code && code <= 0xCD77) || // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH (0xCD79 <= code && code <= 0xCD93) || // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH (0xCD95 <= code && code <= 0xCDAF) || // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH (0xCDB1 <= code && code <= 0xCDCB) || // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH (0xCDCD <= code && code <= 0xCDE7) || // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH (0xCDE9 <= code && code <= 0xCE03) || // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH (0xCE05 <= code && code <= 0xCE1F) || // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH (0xCE21 <= code && code <= 0xCE3B) || // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH (0xCE3D <= code && code <= 0xCE57) || // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH (0xCE59 <= code && code <= 0xCE73) || // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH (0xCE75 <= code && code <= 0xCE8F) || // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH (0xCE91 <= code && code <= 0xCEAB) || // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH (0xCEAD <= code && code <= 0xCEC7) || // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH (0xCEC9 <= code && code <= 0xCEE3) || // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH (0xCEE5 <= code && code <= 0xCEFF) || // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH (0xCF01 <= code && code <= 0xCF1B) || // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH (0xCF1D <= code && code <= 0xCF37) || // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH (0xCF39 <= code && code <= 0xCF53) || // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH (0xCF55 <= code && code <= 0xCF6F) || // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH (0xCF71 <= code && code <= 0xCF8B) || // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH (0xCF8D <= code && code <= 0xCFA7) || // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH (0xCFA9 <= code && code <= 0xCFC3) || // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH (0xCFC5 <= code && code <= 0xCFDF) || // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH (0xCFE1 <= code && code <= 0xCFFB) || // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH (0xCFFD <= code && code <= 0xD017) || // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH (0xD019 <= code && code <= 0xD033) || // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH (0xD035 <= code && code <= 0xD04F) || // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH (0xD051 <= code && code <= 0xD06B) || // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH (0xD06D <= code && code <= 0xD087) || // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH (0xD089 <= code && code <= 0xD0A3) || // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH (0xD0A5 <= code && code <= 0xD0BF) || // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH (0xD0C1 <= code && code <= 0xD0DB) || // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH (0xD0DD <= code && code <= 0xD0F7) || // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH (0xD0F9 <= code && code <= 0xD113) || // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH (0xD115 <= code && code <= 0xD12F) || // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH (0xD131 <= code && code <= 0xD14B) || // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH (0xD14D <= code && code <= 0xD167) || // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH (0xD169 <= code && code <= 0xD183) || // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH (0xD185 <= code && code <= 0xD19F) || // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH (0xD1A1 <= code && code <= 0xD1BB) || // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH (0xD1BD <= code && code <= 0xD1D7) || // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH (0xD1D9 <= code && code <= 0xD1F3) || // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH (0xD1F5 <= code && code <= 0xD20F) || // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH (0xD211 <= code && code <= 0xD22B) || // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH (0xD22D <= code && code <= 0xD247) || // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH (0xD249 <= code && code <= 0xD263) || // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH (0xD265 <= code && code <= 0xD27F) || // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH (0xD281 <= code && code <= 0xD29B) || // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH (0xD29D <= code && code <= 0xD2B7) || // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH (0xD2B9 <= code && code <= 0xD2D3) || // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH (0xD2D5 <= code && code <= 0xD2EF) || // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH (0xD2F1 <= code && code <= 0xD30B) || // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH (0xD30D <= code && code <= 0xD327) || // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH (0xD329 <= code && code <= 0xD343) || // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH (0xD345 <= code && code <= 0xD35F) || // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH (0xD361 <= code && code <= 0xD37B) || // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH (0xD37D <= code && code <= 0xD397) || // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH (0xD399 <= code && code <= 0xD3B3) || // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH (0xD3B5 <= code && code <= 0xD3CF) || // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH (0xD3D1 <= code && code <= 0xD3EB) || // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH (0xD3ED <= code && code <= 0xD407) || // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH (0xD409 <= code && code <= 0xD423) || // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH (0xD425 <= code && code <= 0xD43F) || // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH (0xD441 <= code && code <= 0xD45B) || // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH (0xD45D <= code && code <= 0xD477) || // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH (0xD479 <= code && code <= 0xD493) || // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH (0xD495 <= code && code <= 0xD4AF) || // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH (0xD4B1 <= code && code <= 0xD4CB) || // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH (0xD4CD <= code && code <= 0xD4E7) || // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH (0xD4E9 <= code && code <= 0xD503) || // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH (0xD505 <= code && code <= 0xD51F) || // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH (0xD521 <= code && code <= 0xD53B) || // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH (0xD53D <= code && code <= 0xD557) || // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH (0xD559 <= code && code <= 0xD573) || // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH (0xD575 <= code && code <= 0xD58F) || // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH (0xD591 <= code && code <= 0xD5AB) || // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH (0xD5AD <= code && code <= 0xD5C7) || // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH (0xD5C9 <= code && code <= 0xD5E3) || // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH (0xD5E5 <= code && code <= 0xD5FF) || // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH (0xD601 <= code && code <= 0xD61B) || // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH (0xD61D <= code && code <= 0xD637) || // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH (0xD639 <= code && code <= 0xD653) || // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH (0xD655 <= code && code <= 0xD66F) || // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH (0xD671 <= code && code <= 0xD68B) || // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH (0xD68D <= code && code <= 0xD6A7) || // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH (0xD6A9 <= code && code <= 0xD6C3) || // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH (0xD6C5 <= code && code <= 0xD6DF) || // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH (0xD6E1 <= code && code <= 0xD6FB) || // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH (0xD6FD <= code && code <= 0xD717) || // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH (0xD719 <= code && code <= 0xD733) || // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH (0xD735 <= code && code <= 0xD74F) || // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH (0xD751 <= code && code <= 0xD76B) || // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH (0xD76D <= code && code <= 0xD787) || // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH (0xD789 <= code && code <= 0xD7A3) // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH ){ return LVT; } if( 0x261D == code || // So WHITE UP POINTING INDEX 0x26F9 == code || // So PERSON WITH BALL (0x270A <= code && code <= 0x270D) || // So [4] RAISED FIST..WRITING HAND 0x1F385 == code || // So FATHER CHRISTMAS (0x1F3C2 <= code && code <= 0x1F3C4) || // So [3] SNOWBOARDER..SURFER 0x1F3C7 == code || // So HORSE RACING (0x1F3CA <= code && code <= 0x1F3CC) || // So [3] SWIMMER..GOLFER (0x1F442 <= code && code <= 0x1F443) || // So [2] EAR..NOSE (0x1F446 <= code && code <= 0x1F450) || // So [11] WHITE UP POINTING BACKHAND INDEX..OPEN HANDS SIGN 0x1F46E == code || // So POLICE OFFICER (0x1F470 <= code && code <= 0x1F478) || // So [9] BRIDE WITH VEIL..PRINCESS 0x1F47C == code || // So BABY ANGEL (0x1F481 <= code && code <= 0x1F483) || // So [3] INFORMATION DESK PERSON..DANCER (0x1F485 <= code && code <= 0x1F487) || // So [3] NAIL POLISH..HAIRCUT 0x1F4AA == code || // So FLEXED BICEPS (0x1F574 <= code && code <= 0x1F575) || // So [2] MAN IN BUSINESS SUIT LEVITATING..SLEUTH OR SPY 0x1F57A == code || // So MAN DANCING 0x1F590 == code || // So RAISED HAND WITH FINGERS SPLAYED (0x1F595 <= code && code <= 0x1F596) || // So [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS (0x1F645 <= code && code <= 0x1F647) || // So [3] FACE WITH NO GOOD GESTURE..PERSON BOWING DEEPLY (0x1F64B <= code && code <= 0x1F64F) || // So [5] HAPPY PERSON RAISING ONE HAND..PERSON WITH FOLDED HANDS 0x1F6A3 == code || // So ROWBOAT (0x1F6B4 <= code && code <= 0x1F6B6) || // So [3] BICYCLIST..PEDESTRIAN 0x1F6C0 == code || // So BATH 0x1F6CC == code || // So SLEEPING ACCOMMODATION (0x1F918 <= code && code <= 0x1F91C) || // So [5] SIGN OF THE HORNS..RIGHT-FACING FIST (0x1F91E <= code && code <= 0x1F91F) || // So [2] HAND WITH INDEX AND MIDDLE FINGERS CROSSED..I LOVE YOU HAND SIGN 0x1F926 == code || // So FACE PALM (0x1F930 <= code && code <= 0x1F939) || // So [10] PREGNANT WOMAN..JUGGLING (0x1F93D <= code && code <= 0x1F93E) || // So [2] WATER POLO..HANDBALL (0x1F9D1 <= code && code <= 0x1F9DD) // So [13] ADULT..ELF ){ return E_Base; } if( (0x1F3FB <= code && code <= 0x1F3FF) // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 ){ return E_Modifier; } if( 0x200D == code // Cf ZERO WIDTH JOINER ){ return ZWJ; } if( 0x2640 == code || // So FEMALE SIGN 0x2642 == code || // So MALE SIGN (0x2695 <= code && code <= 0x2696) || // So [2] STAFF OF AESCULAPIUS..SCALES 0x2708 == code || // So AIRPLANE 0x2764 == code || // So HEAVY BLACK HEART 0x1F308 == code || // So RAINBOW 0x1F33E == code || // So EAR OF RICE 0x1F373 == code || // So COOKING 0x1F393 == code || // So GRADUATION CAP 0x1F3A4 == code || // So MICROPHONE 0x1F3A8 == code || // So ARTIST PALETTE 0x1F3EB == code || // So SCHOOL 0x1F3ED == code || // So FACTORY 0x1F48B == code || // So KISS MARK (0x1F4BB <= code && code <= 0x1F4BC) || // So [2] PERSONAL COMPUTER..BRIEFCASE 0x1F527 == code || // So WRENCH 0x1F52C == code || // So MICROSCOPE 0x1F5E8 == code || // So LEFT SPEECH BUBBLE 0x1F680 == code || // So ROCKET 0x1F692 == code // So FIRE ENGINE ){ return Glue_After_Zwj; } if( (0x1F466 <= code && code <= 0x1F469) // So [4] BOY..WOMAN ){ return E_Base_GAZ; } //all unlisted characters have a grapheme break property of "Other" return Other; } return this; } if ( true && module.exports) { module.exports = GraphemeSplitter; } /***/ }), /***/ 65923: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var zlib = __webpack_require__(78761) var peek = __webpack_require__(20335) var through = __webpack_require__(88526) var pumpify = __webpack_require__(4850) var isGzip = __webpack_require__(40004) var isDeflate = __webpack_require__(55197) var isCompressed = function (data) { if (isGzip(data)) return 1 if (isDeflate(data)) return 2 return 0 } var gunzip = function (maxRecursion) { if (maxRecursion === undefined) maxRecursion = 3 return peek({newline: false, maxBuffer: 10}, function (data, swap) { if (maxRecursion < 0) return swap(new Error('Maximum recursion reached')) switch (isCompressed(data)) { case 1: swap(null, pumpify(zlib.createGunzip(), gunzip(maxRecursion - 1))) break case 2: swap(null, pumpify(zlib.createInflate(), gunzip(maxRecursion - 1))) break default: swap(null, through()) } }) } module.exports = gunzip /***/ }), /***/ 70789: /***/ ((module) => { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /***/ 13419: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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. /**/ var pna = __webpack_require__(88212); /**/ /**/ var objectKeys = Object.keys || function (obj) { var keys = []; for (var key in obj) { keys.push(key); }return keys; }; /**/ module.exports = Duplex; /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ var Readable = __webpack_require__(78310); var Writable = __webpack_require__(94149); 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); }; /***/ }), /***/ 66848: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(81776); /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ 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); }; /***/ }), /***/ 78310: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 pna = __webpack_require__(88212); /**/ module.exports = Readable; /**/ var isArray = __webpack_require__(70789); /**/ /**/ var Duplex; /**/ Readable.ReadableState = ReadableState; /**/ var EE = __webpack_require__(28614).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; }; /**/ /**/ var Stream = __webpack_require__(15577); /**/ /**/ var Buffer = __webpack_require__(89509).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } /**/ /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ /**/ var debugUtil = __webpack_require__(31669); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); } else { debug = function () {}; } /**/ var BufferList = __webpack_require__(21610); var destroyImpl = __webpack_require__(22436); 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 || __webpack_require__(13419); 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 = __webpack_require__(50399)/* .StringDecoder */ .s; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { Duplex = Duplex || __webpack_require__(13419); 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 = __webpack_require__(50399)/* .StringDecoder */ .s; 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; } /***/ }), /***/ 81776: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(13419); /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ 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); } /***/ }), /***/ 94149: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // 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. /**/ var pna = __webpack_require__(88212); /**/ module.exports = Writable; /* */ 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); }; } /* */ /**/ var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; /**/ /**/ var Duplex; /**/ Writable.WritableState = WritableState; /**/ var util = Object.create(__webpack_require__(16497)); util.inherits = __webpack_require__(94378); /**/ /**/ var internalUtil = { deprecate: __webpack_require__(41159) }; /**/ /**/ var Stream = __webpack_require__(15577); /**/ /**/ var Buffer = __webpack_require__(89509).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } /**/ var destroyImpl = __webpack_require__(22436); util.inherits(Writable, Stream); function nop() {} function WritableState(options, stream) { Duplex = Duplex || __webpack_require__(13419); 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 || __webpack_require__(13419); // 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) { /**/ asyncWrite(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; 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); }; /***/ }), /***/ 21610: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Buffer = __webpack_require__(89509).Buffer; var util = __webpack_require__(31669); 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; }; } /***/ }), /***/ 22436: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /**/ var pna = __webpack_require__(88212); /**/ // 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 }; /***/ }), /***/ 15577: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = __webpack_require__(92413); /***/ }), /***/ 26863: /***/ ((module, exports, __webpack_require__) => { var Stream = __webpack_require__(92413); 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 = __webpack_require__(78310); exports.Stream = Stream || exports; exports.Readable = exports; exports.Writable = __webpack_require__(94149); exports.Duplex = __webpack_require__(13419); exports.Transform = __webpack_require__(81776); exports.PassThrough = __webpack_require__(66848); } /***/ }), /***/ 50399: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; // 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 = __webpack_require__(89509).Buffer; /**/ 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.s = 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) : ''; } /***/ }), /***/ 88526: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Transform = __webpack_require__(26863).Transform , inherits = __webpack_require__(31669).inherits , xtend = __webpack_require__(47529) function DestroyableTransform(opts) { Transform.call(this, opts) this._destroyed = false } inherits(DestroyableTransform, Transform) DestroyableTransform.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') }) } // a noop _transform function function noop (chunk, enc, callback) { callback(null, chunk) } // create a new export function, used by both the main export and // the .ctor export, contains common logic for dealing with arguments function through2 (construct) { return function (options, transform, flush) { if (typeof options == 'function') { flush = transform transform = options options = {} } if (typeof transform != 'function') transform = noop if (typeof flush != 'function') flush = null return construct(options, transform, flush) } } // main export, just make me a transform stream! module.exports = through2(function (options, transform, flush) { var t2 = new DestroyableTransform(options) t2._transform = transform if (flush) t2._flush = flush return t2 }) // make me a reusable prototype that I can `new`, or implicitly `new` // with a constructor call module.exports.ctor = through2(function (options, transform, flush) { function Through2 (override) { if (!(this instanceof Through2)) return new Through2(override) this.options = xtend(options, override) DestroyableTransform.call(this, this.options) } inherits(Through2, DestroyableTransform) Through2.prototype._transform = transform if (flush) Through2.prototype._flush = flush return Through2 }) module.exports.obj = through2(function (options, transform, flush) { var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) t2._transform = transform if (flush) t2._flush = flush return t2 }) /***/ }), /***/ 21354: /***/ ((module) => { "use strict"; class QuickLRU { constructor(options = {}) { if (!(options.maxSize && options.maxSize > 0)) { throw new TypeError('`maxSize` must be a number greater than 0'); } this.maxSize = options.maxSize; this.onEviction = options.onEviction; this.cache = new Map(); this.oldCache = new Map(); this._size = 0; } _set(key, value) { this.cache.set(key, value); this._size++; if (this._size >= this.maxSize) { this._size = 0; if (typeof this.onEviction === 'function') { for (const [key, value] of this.oldCache.entries()) { this.onEviction(key, value); } } this.oldCache = this.cache; this.cache = new Map(); } } get(key) { if (this.cache.has(key)) { return this.cache.get(key); } if (this.oldCache.has(key)) { const value = this.oldCache.get(key); this.oldCache.delete(key); this._set(key, value); return value; } } set(key, value) { if (this.cache.has(key)) { this.cache.set(key, value); } else { this._set(key, value); } return this; } has(key) { return this.cache.has(key) || this.oldCache.has(key); } peek(key) { if (this.cache.has(key)) { return this.cache.get(key); } if (this.oldCache.has(key)) { return this.oldCache.get(key); } } delete(key) { const deleted = this.cache.delete(key); if (deleted) { this._size--; } return this.oldCache.delete(key) || deleted; } clear() { this.cache.clear(); this.oldCache.clear(); this._size = 0; } * keys() { for (const [key] of this) { yield key; } } * values() { for (const [, value] of this) { yield value; } } * [Symbol.iterator]() { for (const item of this.cache) { yield item; } for (const item of this.oldCache) { const [key] = item; if (!this.cache.has(key)) { yield item; } } } get size() { let oldCacheSize = 0; for (const key of this.oldCache.keys()) { if (!this.cache.has(key)) { oldCacheSize++; } } return Math.min(this._size + oldCacheSize, this.maxSize); } } module.exports = QuickLRU; /***/ }), /***/ 24685: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const EventEmitter = __webpack_require__(28614); const tls = __webpack_require__(4016); const http2 = __webpack_require__(97565); const QuickLRU = __webpack_require__(21354); const kCurrentStreamsCount = Symbol('currentStreamsCount'); const kRequest = Symbol('request'); const kOriginSet = Symbol('cachedOriginSet'); const kGracefullyClosing = Symbol('gracefullyClosing'); const nameKeys = [ // `http2.connect()` options 'maxDeflateDynamicTableSize', 'maxSessionMemory', 'maxHeaderListPairs', 'maxOutstandingPings', 'maxReservedRemoteStreams', 'maxSendHeaderBlockLength', 'paddingStrategy', // `tls.connect()` options 'localAddress', 'path', 'rejectUnauthorized', 'minDHSize', // `tls.createSecureContext()` options 'ca', 'cert', 'clientCertEngine', 'ciphers', 'key', 'pfx', 'servername', 'minVersion', 'maxVersion', 'secureProtocol', 'crl', 'honorCipherOrder', 'ecdhCurve', 'dhparam', 'secureOptions', 'sessionIdContext' ]; const getSortedIndex = (array, value, compare) => { let low = 0; let high = array.length; while (low < high) { const mid = (low + high) >>> 1; /* istanbul ignore next */ if (compare(array[mid], value)) { // This never gets called because we use descending sort. Better to have this anyway. low = mid + 1; } else { high = mid; } } return low; }; const compareSessions = (a, b) => { return a.remoteSettings.maxConcurrentStreams > b.remoteSettings.maxConcurrentStreams; }; // See https://tools.ietf.org/html/rfc8336 const closeCoveredSessions = (where, session) => { // Clients SHOULD NOT emit new requests on any connection whose Origin // Set is a proper subset of another connection's Origin Set, and they // SHOULD close it once all outstanding requests are satisfied. for (const coveredSession of where) { if ( // The set is a proper subset when its length is less than the other set. coveredSession[kOriginSet].length < session[kOriginSet].length && // And the other set includes all elements of the subset. coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && // Makes sure that the session can handle all requests from the covered session. coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams ) { // This allows pending requests to finish and prevents making new requests. gracefullyClose(coveredSession); } } }; // This is basically inverted `closeCoveredSessions(...)`. const closeSessionIfCovered = (where, coveredSession) => { for (const session of where) { if ( coveredSession[kOriginSet].length < session[kOriginSet].length && coveredSession[kOriginSet].every(origin => session[kOriginSet].includes(origin)) && coveredSession[kCurrentStreamsCount] + session[kCurrentStreamsCount] <= session.remoteSettings.maxConcurrentStreams ) { gracefullyClose(coveredSession); } } }; const getSessions = ({agent, isFree}) => { const result = {}; // eslint-disable-next-line guard-for-in for (const normalizedOptions in agent.sessions) { const sessions = agent.sessions[normalizedOptions]; const filtered = sessions.filter(session => { const result = session[Agent.kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; return isFree ? result : !result; }); if (filtered.length !== 0) { result[normalizedOptions] = filtered; } } return result; }; const gracefullyClose = session => { session[kGracefullyClosing] = true; if (session[kCurrentStreamsCount] === 0) { session.close(); } }; class Agent extends EventEmitter { constructor({timeout = 60000, maxSessions = Infinity, maxFreeSessions = 10, maxCachedTlsSessions = 100} = {}) { super(); // A session is considered busy when its current streams count // is equal to or greater than the `maxConcurrentStreams` value. // A session is considered free when its current streams count // is less than the `maxConcurrentStreams` value. // SESSIONS[NORMALIZED_OPTIONS] = []; this.sessions = {}; // The queue for creating new sessions. It looks like this: // QUEUE[NORMALIZED_OPTIONS][NORMALIZED_ORIGIN] = ENTRY_FUNCTION // // The entry function has `listeners`, `completed` and `destroyed` properties. // `listeners` is an array of objects containing `resolve` and `reject` functions. // `completed` is a boolean. It's set to true after ENTRY_FUNCTION is executed. // `destroyed` is a boolean. If it's set to true, the session will be destroyed if hasn't connected yet. this.queue = {}; // Each session will use this timeout value. this.timeout = timeout; // Max sessions in total this.maxSessions = maxSessions; // Max free sessions in total // TODO: decreasing `maxFreeSessions` should close some sessions this.maxFreeSessions = maxFreeSessions; this._freeSessionsCount = 0; this._sessionsCount = 0; // We don't support push streams by default. this.settings = { enablePush: false }; // Reusing TLS sessions increases performance. this.tlsSessionCache = new QuickLRU({maxSize: maxCachedTlsSessions}); } static normalizeOrigin(url, servername) { if (typeof url === 'string') { url = new URL(url); } if (servername && url.hostname !== servername) { url.hostname = servername; } return url.origin; } normalizeOptions(options) { let normalized = ''; if (options) { for (const key of nameKeys) { if (options[key]) { normalized += `:${options[key]}`; } } } return normalized; } _tryToCreateNewSession(normalizedOptions, normalizedOrigin) { if (!(normalizedOptions in this.queue) || !(normalizedOrigin in this.queue[normalizedOptions])) { return; } const item = this.queue[normalizedOptions][normalizedOrigin]; // The entry function can be run only once. // BUG: The session may be never created when: // - the first condition is false AND // - this function is never called with the same arguments in the future. if (this._sessionsCount < this.maxSessions && !item.completed) { item.completed = true; item(); } } getSession(origin, options, listeners) { return new Promise((resolve, reject) => { if (Array.isArray(listeners)) { listeners = [...listeners]; // Resolve the current promise ASAP, we're just moving the listeners. // They will be executed at a different time. resolve(); } else { listeners = [{resolve, reject}]; } const normalizedOptions = this.normalizeOptions(options); const normalizedOrigin = Agent.normalizeOrigin(origin, options && options.servername); if (normalizedOrigin === undefined) { for (const {reject} of listeners) { reject(new TypeError('The `origin` argument needs to be a string or an URL object')); } return; } if (normalizedOptions in this.sessions) { const sessions = this.sessions[normalizedOptions]; let maxConcurrentStreams = -1; let currentStreamsCount = -1; let optimalSession; // We could just do this.sessions[normalizedOptions].find(...) but that isn't optimal. // Additionally, we are looking for session which has biggest current pending streams count. for (const session of sessions) { const sessionMaxConcurrentStreams = session.remoteSettings.maxConcurrentStreams; if (sessionMaxConcurrentStreams < maxConcurrentStreams) { break; } if (session[kOriginSet].includes(normalizedOrigin)) { const sessionCurrentStreamsCount = session[kCurrentStreamsCount]; if ( sessionCurrentStreamsCount >= sessionMaxConcurrentStreams || session[kGracefullyClosing] || // Unfortunately the `close` event isn't called immediately, // so `session.destroyed` is `true`, but `session.closed` is `false`. session.destroyed ) { continue; } // We only need set this once. if (!optimalSession) { maxConcurrentStreams = sessionMaxConcurrentStreams; } // We're looking for the session which has biggest current pending stream count, // in order to minimalize the amount of active sessions. if (sessionCurrentStreamsCount > currentStreamsCount) { optimalSession = session; currentStreamsCount = sessionCurrentStreamsCount; } } } if (optimalSession) { /* istanbul ignore next: safety check */ if (listeners.length !== 1) { for (const {reject} of listeners) { const error = new Error( `Expected the length of listeners to be 1, got ${listeners.length}.\n` + 'Please report this to https://github.com/szmarczak/http2-wrapper/' ); reject(error); } return; } listeners[0].resolve(optimalSession); return; } } if (normalizedOptions in this.queue) { if (normalizedOrigin in this.queue[normalizedOptions]) { // There's already an item in the queue, just attach ourselves to it. this.queue[normalizedOptions][normalizedOrigin].listeners.push(...listeners); // This shouldn't be executed here. // See the comment inside _tryToCreateNewSession. this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); return; } } else { this.queue[normalizedOptions] = {}; } // The entry must be removed from the queue IMMEDIATELY when: // 1. the session connects successfully, // 2. an error occurs. const removeFromQueue = () => { // Our entry can be replaced. We cannot remove the new one. if (normalizedOptions in this.queue && this.queue[normalizedOptions][normalizedOrigin] === entry) { delete this.queue[normalizedOptions][normalizedOrigin]; if (Object.keys(this.queue[normalizedOptions]).length === 0) { delete this.queue[normalizedOptions]; } } }; // The main logic is here const entry = () => { const name = `${normalizedOrigin}:${normalizedOptions}`; let receivedSettings = false; try { const session = http2.connect(origin, { createConnection: this.createConnection, settings: this.settings, session: this.tlsSessionCache.get(name), ...options }); session[kCurrentStreamsCount] = 0; session[kGracefullyClosing] = false; const isFree = () => session[kCurrentStreamsCount] < session.remoteSettings.maxConcurrentStreams; let wasFree = true; session.socket.once('session', tlsSession => { this.tlsSessionCache.set(name, tlsSession); }); session.once('error', error => { // Listeners are empty when the session successfully connected. for (const {reject} of listeners) { reject(error); } // The connection got broken, purge the cache. this.tlsSessionCache.delete(name); }); session.setTimeout(this.timeout, () => { // Terminates all streams owned by this session. // TODO: Maybe the streams should have a "Session timed out" error? session.destroy(); }); session.once('close', () => { if (receivedSettings) { // 1. If it wasn't free then no need to decrease because // it has been decreased already in session.request(). // 2. `stream.once('close')` won't increment the count // because the session is already closed. if (wasFree) { this._freeSessionsCount--; } this._sessionsCount--; // This cannot be moved to the stream logic, // because there may be a session that hadn't made a single request. const where = this.sessions[normalizedOptions]; where.splice(where.indexOf(session), 1); if (where.length === 0) { delete this.sessions[normalizedOptions]; } } else { // Broken connection const error = new Error('Session closed without receiving a SETTINGS frame'); error.code = 'HTTP2WRAPPER_NOSETTINGS'; for (const {reject} of listeners) { reject(error); } removeFromQueue(); } // There may be another session awaiting. this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); }); // Iterates over the queue and processes listeners. const processListeners = () => { if (!(normalizedOptions in this.queue) || !isFree()) { return; } for (const origin of session[kOriginSet]) { if (origin in this.queue[normalizedOptions]) { const {listeners} = this.queue[normalizedOptions][origin]; // Prevents session overloading. while (listeners.length !== 0 && isFree()) { // We assume `resolve(...)` calls `request(...)` *directly*, // otherwise the session will get overloaded. listeners.shift().resolve(session); } const where = this.queue[normalizedOptions]; if (where[origin].listeners.length === 0) { delete where[origin]; if (Object.keys(where).length === 0) { delete this.queue[normalizedOptions]; break; } } // We're no longer free, no point in continuing. if (!isFree()) { break; } } } }; // The Origin Set cannot shrink. No need to check if it suddenly became covered by another one. session.on('origin', () => { session[kOriginSet] = session.originSet; if (!isFree()) { // The session is full. return; } processListeners(); // Close covered sessions (if possible). closeCoveredSessions(this.sessions[normalizedOptions], session); }); session.once('remoteSettings', () => { // Fix Node.js bug preventing the process from exiting session.ref(); session.unref(); this._sessionsCount++; // The Agent could have been destroyed already. if (entry.destroyed) { const error = new Error('Agent has been destroyed'); for (const listener of listeners) { listener.reject(error); } session.destroy(); return; } session[kOriginSet] = session.originSet; { const where = this.sessions; if (normalizedOptions in where) { const sessions = where[normalizedOptions]; sessions.splice(getSortedIndex(sessions, session, compareSessions), 0, session); } else { where[normalizedOptions] = [session]; } } this._freeSessionsCount += 1; receivedSettings = true; this.emit('session', session); processListeners(); removeFromQueue(); // TODO: Close last recently used (or least used?) session if (session[kCurrentStreamsCount] === 0 && this._freeSessionsCount > this.maxFreeSessions) { session.close(); } // Check if we haven't managed to execute all listeners. if (listeners.length !== 0) { // Request for a new session with predefined listeners. this.getSession(normalizedOrigin, options, listeners); listeners.length = 0; } // `session.remoteSettings.maxConcurrentStreams` might get increased session.on('remoteSettings', () => { processListeners(); // In case the Origin Set changes closeCoveredSessions(this.sessions[normalizedOptions], session); }); }); // Shim `session.request()` in order to catch all streams session[kRequest] = session.request; session.request = (headers, streamOptions) => { if (session[kGracefullyClosing]) { throw new Error('The session is gracefully closing. No new streams are allowed.'); } const stream = session[kRequest](headers, streamOptions); // The process won't exit until the session is closed or all requests are gone. session.ref(); ++session[kCurrentStreamsCount]; if (session[kCurrentStreamsCount] === session.remoteSettings.maxConcurrentStreams) { this._freeSessionsCount--; } stream.once('close', () => { wasFree = isFree(); --session[kCurrentStreamsCount]; if (!session.destroyed && !session.closed) { closeSessionIfCovered(this.sessions[normalizedOptions], session); if (isFree() && !session.closed) { if (!wasFree) { this._freeSessionsCount++; wasFree = true; } const isEmpty = session[kCurrentStreamsCount] === 0; if (isEmpty) { session.unref(); } if ( isEmpty && ( this._freeSessionsCount > this.maxFreeSessions || session[kGracefullyClosing] ) ) { session.close(); } else { closeCoveredSessions(this.sessions[normalizedOptions], session); processListeners(); } } } }); return stream; }; } catch (error) { for (const listener of listeners) { listener.reject(error); } removeFromQueue(); } }; entry.listeners = listeners; entry.completed = false; entry.destroyed = false; this.queue[normalizedOptions][normalizedOrigin] = entry; this._tryToCreateNewSession(normalizedOptions, normalizedOrigin); }); } request(origin, options, headers, streamOptions) { return new Promise((resolve, reject) => { this.getSession(origin, options, [{ reject, resolve: session => { try { resolve(session.request(headers, streamOptions)); } catch (error) { reject(error); } } }]); }); } createConnection(origin, options) { return Agent.connect(origin, options); } static connect(origin, options) { options.ALPNProtocols = ['h2']; const port = origin.port || 443; const host = origin.hostname || origin.host; if (typeof options.servername === 'undefined') { options.servername = host; } return tls.connect(port, host, options); } closeFreeSessions() { for (const sessions of Object.values(this.sessions)) { for (const session of sessions) { if (session[kCurrentStreamsCount] === 0) { session.close(); } } } } destroy(reason) { for (const sessions of Object.values(this.sessions)) { for (const session of sessions) { session.destroy(reason); } } for (const entriesOfAuthority of Object.values(this.queue)) { for (const entry of Object.values(entriesOfAuthority)) { entry.destroyed = true; } } // New requests should NOT attach to destroyed sessions this.queue = {}; } get freeSessions() { return getSessions({agent: this, isFree: true}); } get busySessions() { return getSessions({agent: this, isFree: false}); } } Agent.kCurrentStreamsCount = kCurrentStreamsCount; Agent.kGracefullyClosing = kGracefullyClosing; module.exports = { Agent, globalAgent: new Agent() }; /***/ }), /***/ 86673: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http = __webpack_require__(98605); const https = __webpack_require__(57211); const resolveALPN = __webpack_require__(45322); const QuickLRU = __webpack_require__(21354); const Http2ClientRequest = __webpack_require__(52287); const calculateServerName = __webpack_require__(4017); const urlToOptions = __webpack_require__(15978); const cache = new QuickLRU({maxSize: 100}); const queue = new Map(); const installSocket = (agent, socket, options) => { socket._httpMessage = {shouldKeepAlive: true}; const onFree = () => { agent.emit('free', socket, options); }; socket.on('free', onFree); const onClose = () => { agent.removeSocket(socket, options); }; socket.on('close', onClose); const onRemove = () => { agent.removeSocket(socket, options); socket.off('close', onClose); socket.off('free', onFree); socket.off('agentRemove', onRemove); }; socket.on('agentRemove', onRemove); agent.emit('free', socket, options); }; const resolveProtocol = async options => { const name = `${options.host}:${options.port}:${options.ALPNProtocols.sort()}`; if (!cache.has(name)) { if (queue.has(name)) { const result = await queue.get(name); return result.alpnProtocol; } const {path, agent} = options; options.path = options.socketPath; const resultPromise = resolveALPN(options); queue.set(name, resultPromise); try { const {socket, alpnProtocol} = await resultPromise; cache.set(name, alpnProtocol); options.path = path; if (alpnProtocol === 'h2') { // https://github.com/nodejs/node/issues/33343 socket.destroy(); } else { const {globalAgent} = https; const defaultCreateConnection = https.Agent.prototype.createConnection; if (agent) { if (agent.createConnection === defaultCreateConnection) { installSocket(agent, socket, options); } else { socket.destroy(); } } else if (globalAgent.createConnection === defaultCreateConnection) { installSocket(globalAgent, socket, options); } else { socket.destroy(); } } queue.delete(name); return alpnProtocol; } catch (error) { queue.delete(name); throw error; } } return cache.get(name); }; module.exports = async (input, options, callback) => { if (typeof input === 'string' || input instanceof URL) { input = urlToOptions(new URL(input)); } if (typeof options === 'function') { callback = options; options = undefined; } options = { ALPNProtocols: ['h2', 'http/1.1'], ...input, ...options, resolveSocket: true }; if (!Array.isArray(options.ALPNProtocols) || options.ALPNProtocols.length === 0) { throw new Error('The `ALPNProtocols` option must be an Array with at least one entry'); } options.protocol = options.protocol || 'https:'; const isHttps = options.protocol === 'https:'; options.host = options.hostname || options.host || 'localhost'; options.session = options.tlsSession; options.servername = options.servername || calculateServerName(options); options.port = options.port || (isHttps ? 443 : 80); options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent; const agents = options.agent; if (agents) { if (agents.addRequest) { throw new Error('The `options.agent` object can contain only `http`, `https` or `http2` properties'); } options.agent = agents[isHttps ? 'https' : 'http']; } if (isHttps) { const protocol = await resolveProtocol(options); if (protocol === 'h2') { if (agents) { options.agent = agents.http2; } return new Http2ClientRequest(options, callback); } } return http.request(options, callback); }; module.exports.protocolCache = cache; /***/ }), /***/ 52287: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http2 = __webpack_require__(97565); const {Writable} = __webpack_require__(92413); const {Agent, globalAgent} = __webpack_require__(24685); const IncomingMessage = __webpack_require__(17138); const urlToOptions = __webpack_require__(15978); const proxyEvents = __webpack_require__(37306); const isRequestPseudoHeader = __webpack_require__(48202); const { ERR_INVALID_ARG_TYPE, ERR_INVALID_PROTOCOL, ERR_HTTP_HEADERS_SENT, ERR_INVALID_HTTP_TOKEN, ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR } = __webpack_require__(23190); const { HTTP2_HEADER_STATUS, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_METHOD_CONNECT } = http2.constants; const kHeaders = Symbol('headers'); const kOrigin = Symbol('origin'); const kSession = Symbol('session'); const kOptions = Symbol('options'); const kFlushedHeaders = Symbol('flushedHeaders'); const kJobs = Symbol('jobs'); const isValidHttpToken = /^[\^`\-\w!#$%&*+.|~]+$/; const isInvalidHeaderValue = /[^\t\u0020-\u007E\u0080-\u00FF]/; class ClientRequest extends Writable { constructor(input, options, callback) { super({ autoDestroy: false }); const hasInput = typeof input === 'string' || input instanceof URL; if (hasInput) { input = urlToOptions(input instanceof URL ? input : new URL(input)); } if (typeof options === 'function' || options === undefined) { // (options, callback) callback = options; options = hasInput ? input : {...input}; } else { // (input, options, callback) options = {...input, ...options}; } if (options.h2session) { this[kSession] = options.h2session; } else if (options.agent === false) { this.agent = new Agent({maxFreeSessions: 0}); } else if (typeof options.agent === 'undefined' || options.agent === null) { if (typeof options.createConnection === 'function') { // This is a workaround - we don't have to create the session on our own. this.agent = new Agent({maxFreeSessions: 0}); this.agent.createConnection = options.createConnection; } else { this.agent = globalAgent; } } else if (typeof options.agent.request === 'function') { this.agent = options.agent; } else { throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], options.agent); } if (options.protocol && options.protocol !== 'https:') { throw new ERR_INVALID_PROTOCOL(options.protocol, 'https:'); } const port = options.port || options.defaultPort || (this.agent && this.agent.defaultPort) || 443; const host = options.hostname || options.host || 'localhost'; // Don't enforce the origin via options. It may be changed in an Agent. delete options.hostname; delete options.host; delete options.port; const {timeout} = options; options.timeout = undefined; this[kHeaders] = Object.create(null); this[kJobs] = []; this.socket = null; this.connection = null; this.method = options.method || 'GET'; this.path = options.path; this.res = null; this.aborted = false; this.reusedSocket = false; if (options.headers) { for (const [header, value] of Object.entries(options.headers)) { this.setHeader(header, value); } } if (options.auth && !('authorization' in this[kHeaders])) { this[kHeaders].authorization = 'Basic ' + Buffer.from(options.auth).toString('base64'); } options.session = options.tlsSession; options.path = options.socketPath; this[kOptions] = options; // Clients that generate HTTP/2 requests directly SHOULD use the :authority pseudo-header field instead of the Host header field. if (port === 443) { this[kOrigin] = `https://${host}`; if (!(':authority' in this[kHeaders])) { this[kHeaders][':authority'] = host; } } else { this[kOrigin] = `https://${host}:${port}`; if (!(':authority' in this[kHeaders])) { this[kHeaders][':authority'] = `${host}:${port}`; } } if (timeout) { this.setTimeout(timeout); } if (callback) { this.once('response', callback); } this[kFlushedHeaders] = false; } get method() { return this[kHeaders][HTTP2_HEADER_METHOD]; } set method(value) { if (value) { this[kHeaders][HTTP2_HEADER_METHOD] = value.toUpperCase(); } } get path() { return this[kHeaders][HTTP2_HEADER_PATH]; } set path(value) { if (value) { this[kHeaders][HTTP2_HEADER_PATH] = value; } } get _mustNotHaveABody() { return this.method === 'GET' || this.method === 'HEAD' || this.method === 'DELETE'; } _write(chunk, encoding, callback) { // https://github.com/nodejs/node/blob/654df09ae0c5e17d1b52a900a545f0664d8c7627/lib/internal/http2/util.js#L148-L156 if (this._mustNotHaveABody) { callback(new Error('The GET, HEAD and DELETE methods must NOT have a body')); /* istanbul ignore next: Node.js 12 throws directly */ return; } this.flushHeaders(); const callWrite = () => this._request.write(chunk, encoding, callback); if (this._request) { callWrite(); } else { this[kJobs].push(callWrite); } } _final(callback) { if (this.destroyed) { return; } this.flushHeaders(); const callEnd = () => { // For GET, HEAD and DELETE if (this._mustNotHaveABody) { callback(); return; } this._request.end(callback); }; if (this._request) { callEnd(); } else { this[kJobs].push(callEnd); } } abort() { if (this.res && this.res.complete) { return; } if (!this.aborted) { process.nextTick(() => this.emit('abort')); } this.aborted = true; this.destroy(); } _destroy(error, callback) { if (this.res) { this.res._dump(); } if (this._request) { this._request.destroy(); } callback(error); } async flushHeaders() { if (this[kFlushedHeaders] || this.destroyed) { return; } this[kFlushedHeaders] = true; const isConnectMethod = this.method === HTTP2_METHOD_CONNECT; // The real magic is here const onStream = stream => { this._request = stream; if (this.destroyed) { stream.destroy(); return; } // Forwards `timeout`, `continue`, `close` and `error` events to this instance. if (!isConnectMethod) { proxyEvents(stream, this, ['timeout', 'continue', 'close', 'error']); } // Wait for the `finish` event. We don't want to emit the `response` event // before `request.end()` is called. const waitForEnd = fn => { return (...args) => { if (!this.writable && !this.destroyed) { fn(...args); } else { this.once('finish', () => { fn(...args); }); } }; }; // This event tells we are ready to listen for the data. stream.once('response', waitForEnd((headers, flags, rawHeaders) => { // If we were to emit raw request stream, it would be as fast as the native approach. // Note that wrapping the raw stream in a Proxy instance won't improve the performance (already tested it). const response = new IncomingMessage(this.socket, stream.readableHighWaterMark); this.res = response; response.req = this; response.statusCode = headers[HTTP2_HEADER_STATUS]; response.headers = headers; response.rawHeaders = rawHeaders; response.once('end', () => { if (this.aborted) { response.aborted = true; response.emit('aborted'); } else { response.complete = true; // Has no effect, just be consistent with the Node.js behavior response.socket = null; response.connection = null; } }); if (isConnectMethod) { response.upgrade = true; // The HTTP1 API says the socket is detached here, // but we can't do that so we pass the original HTTP2 request. if (this.emit('connect', response, stream, Buffer.alloc(0))) { this.emit('close'); } else { // No listeners attached, destroy the original request. stream.destroy(); } } else { // Forwards data stream.on('data', chunk => { if (!response._dumped && !response.push(chunk)) { stream.pause(); } }); stream.once('end', () => { response.push(null); }); if (!this.emit('response', response)) { // No listeners attached, dump the response. response._dump(); } } })); // Emits `information` event stream.once('headers', waitForEnd( headers => this.emit('information', {statusCode: headers[HTTP2_HEADER_STATUS]}) )); stream.once('trailers', waitForEnd((trailers, flags, rawTrailers) => { const {res} = this; // Assigns trailers to the response object. res.trailers = trailers; res.rawTrailers = rawTrailers; })); const {socket} = stream.session; this.socket = socket; this.connection = socket; for (const job of this[kJobs]) { job(); } this.emit('socket', this.socket); }; // Makes a HTTP2 request if (this[kSession]) { try { onStream(this[kSession].request(this[kHeaders])); } catch (error) { this.emit('error', error); } } else { this.reusedSocket = true; try { onStream(await this.agent.request(this[kOrigin], this[kOptions], this[kHeaders])); } catch (error) { this.emit('error', error); } } } getHeader(name) { if (typeof name !== 'string') { throw new ERR_INVALID_ARG_TYPE('name', 'string', name); } return this[kHeaders][name.toLowerCase()]; } get headersSent() { return this[kFlushedHeaders]; } removeHeader(name) { if (typeof name !== 'string') { throw new ERR_INVALID_ARG_TYPE('name', 'string', name); } if (this.headersSent) { throw new ERR_HTTP_HEADERS_SENT('remove'); } delete this[kHeaders][name.toLowerCase()]; } setHeader(name, value) { if (this.headersSent) { throw new ERR_HTTP_HEADERS_SENT('set'); } if (typeof name !== 'string' || (!isValidHttpToken.test(name) && !isRequestPseudoHeader(name))) { throw new ERR_INVALID_HTTP_TOKEN('Header name', name); } if (typeof value === 'undefined') { throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); } if (isInvalidHeaderValue.test(value)) { throw new ERR_INVALID_CHAR('header content', name); } this[kHeaders][name.toLowerCase()] = value; } setNoDelay() { // HTTP2 sockets cannot be malformed, do nothing. } setSocketKeepAlive() { // HTTP2 sockets cannot be malformed, do nothing. } setTimeout(ms, callback) { const applyTimeout = () => this._request.setTimeout(ms, callback); if (this._request) { applyTimeout(); } else { this[kJobs].push(applyTimeout); } return this; } get maxHeadersCount() { if (!this.destroyed && this._request) { return this._request.session.localSettings.maxHeaderListSize; } return undefined; } set maxHeadersCount(_value) { // Updating HTTP2 settings would affect all requests, do nothing. } } module.exports = ClientRequest; /***/ }), /***/ 17138: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const {Readable} = __webpack_require__(92413); class IncomingMessage extends Readable { constructor(socket, highWaterMark) { super({ highWaterMark, autoDestroy: false }); this.statusCode = null; this.statusMessage = ''; this.httpVersion = '2.0'; this.httpVersionMajor = 2; this.httpVersionMinor = 0; this.headers = {}; this.trailers = {}; this.req = null; this.aborted = false; this.complete = false; this.upgrade = null; this.rawHeaders = []; this.rawTrailers = []; this.socket = socket; this.connection = socket; this._dumped = false; } _destroy(error) { this.req._request.destroy(error); } setTimeout(ms, callback) { this.req.setTimeout(ms, callback); return this; } _dump() { if (!this._dumped) { this._dumped = true; this.removeAllListeners('data'); this.resume(); } } _read() { if (this.req) { this.req._request.resume(); } } } module.exports = IncomingMessage; /***/ }), /***/ 69758: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const http2 = __webpack_require__(97565); const agent = __webpack_require__(24685); const ClientRequest = __webpack_require__(52287); const IncomingMessage = __webpack_require__(17138); const auto = __webpack_require__(86673); const request = (url, options, callback) => { return new ClientRequest(url, options, callback); }; const get = (url, options, callback) => { // eslint-disable-next-line unicorn/prevent-abbreviations const req = new ClientRequest(url, options, callback); req.end(); return req; }; module.exports = { ...http2, ClientRequest, IncomingMessage, ...agent, request, get, auto }; /***/ }), /***/ 4017: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; const net = __webpack_require__(11631); /* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */ module.exports = options => { let servername = options.host; const hostHeader = options.headers && options.headers.host; if (hostHeader) { if (hostHeader.startsWith('[')) { const index = hostHeader.indexOf(']'); if (index === -1) { servername = hostHeader; } else { servername = hostHeader.slice(1, -1); } } else { servername = hostHeader.split(':', 1)[0]; } } if (net.isIP(servername)) { return ''; } return servername; }; /***/ }), /***/ 23190: /***/ ((module) => { "use strict"; /* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */ const makeError = (Base, key, getMessage) => { module.exports[key] = class NodeError extends Base { constructor(...args) { super(typeof getMessage === 'string' ? getMessage : getMessage(args)); this.name = `${super.name} [${key}]`; this.code = key; } }; }; makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => { const type = args[0].includes('.') ? 'property' : 'argument'; let valid = args[1]; const isManyTypes = Array.isArray(valid); if (isManyTypes) { valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`; } return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`; }); makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => { return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`; }); makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => { return `Cannot ${args[0]} headers after they are sent to the client`; }); makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => { return `${args[0]} must be a valid HTTP token [${args[1]}]`; }); makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => { return `Invalid value "${args[0]} for header "${args[1]}"`; }); makeError(TypeError, 'ERR_INVALID_CHAR', args => { return `Invalid character in ${args[0]} [${args[1]}]`; }); /***/ }), /***/ 48202: /***/ ((module) => { "use strict"; module.exports = header => { switch (header) { case ':method': case ':scheme': case ':authority': case ':path': return true; default: return false; } }; /***/ }), /***/ 37306: /***/ ((module) => { "use strict"; module.exports = (from, to, events) => { for (const event of events) { from.on(event, (...args) => to.emit(event, ...args)); } }; /***/ }), /***/ 15978: /***/ ((module) => { "use strict"; /* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */ module.exports = url => { const options = { protocol: url.protocol, hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, host: url.host, hash: url.hash, search: url.search, pathname: url.pathname, href: url.href, path: `${url.pathname || ''}${url.search || ''}` }; if (typeof url.port === 'string' && url.port.length !== 0) { options.port = Number(url.port); } if (url.username || url.password) { options.auth = `${url.username || ''}:${url.password || ''}`; } return options; }; /***/ }), /***/ 15151: /***/ ((module) => { // A simple implementation of make-array function makeArray (subject) { return Array.isArray(subject) ? subject : [subject] } const EMPTY = '' const SPACE = ' ' const ESCAPE = '\\' const REGEX_TEST_BLANK_LINE = /^\s+$/ const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ const REGEX_SPLITALL_CRLF = /\r?\n/g // /foo, // ./foo, // ../foo, // . // .. const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ const SLASH = '/' const KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') /* istanbul ignore next */ : 'node-ignore' const define = (object, key, value) => Object.defineProperty(object, key, {value}) const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g // Sanitize the range of a regular expression // The cases are complicated, see test cases for details const sanitizeRange = range => range.replace( REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match // Invalid range (out of order) which is ok for gitignore rules but // fatal for JavaScript regular expression, so eliminate it. : EMPTY ) // See fixtures #59 const cleanRangeBackSlash = slashes => { const {length} = slashes return slashes.slice(0, length - length % 2) } // > If the pattern ends with a slash, // > it is removed for the purpose of the following description, // > but it would only find a match with a directory. // > In other words, foo/ will match a directory foo and paths underneath it, // > but will not match a regular file or a symbolic link foo // > (this is consistent with the way how pathspec works in general in Git). // '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' // -> ignore-rules will not deal with it, because it costs extra `fs.stat` call // you could use option `mark: true` with `glob` // '`foo/`' should not continue with the '`..`' const REPLACERS = [ // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ // (a\ ) -> (a ) // (a ) -> (a) // (a \ ) -> (a ) /\\?\s+$/, match => match.indexOf('\\') === 0 ? SPACE : EMPTY ], // replace (\ ) with ' ' [ /\\\s/g, () => SPACE ], // Escape metacharacters // which is written down by users but means special for regular expressions. // > There are 12 characters with special meanings: // > - the backslash \, // > - the caret ^, // > - the dollar sign $, // > - the period or dot ., // > - the vertical bar or pipe symbol |, // > - the question mark ?, // > - the asterisk or star *, // > - the plus sign +, // > - the opening parenthesis (, // > - the closing parenthesis ), // > - and the opening square bracket [, // > - the opening curly brace {, // > These special characters are often called "metacharacters". [ /[\\$.|*+(){^]/g, match => `\\${match}` ], [ // > a question mark (?) matches a single character /(?!\\)\?/g, () => '[^/]' ], // leading slash [ // > A leading slash matches the beginning of the pathname. // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". // A leading slash matches the beginning of the pathname /^\//, () => '^' ], // replace special metacharacter slash after the leading slash [ /\//g, () => '\\/' ], [ // > A leading "**" followed by a slash means match in all directories. // > For example, "**/foo" matches file or directory "foo" anywhere, // > the same as pattern "foo". // > "**/foo/bar" matches file or directory "bar" anywhere that is directly // > under directory "foo". // Notice that the '*'s have been replaced as '\\*' /^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' () => '^(?:.*\\/)?' ], // starting [ // there will be no leading '/' // (which has been replaced by section "leading slash") // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, function startingReplacer () { // If has a slash `/` at the beginning or middle return !/\/(?!$)/.test(this) // > Prior to 2.22.1 // > If the pattern does not contain a slash /, // > Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, // git also treats it as a shell glob pattern // After 2.22.1 (compatible but clearer) // > If there is a separator at the beginning or middle (or both) // > of the pattern, then the pattern is relative to the directory // > level of the particular .gitignore file itself. // > Otherwise the pattern may also match at any level below // > the .gitignore level. ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for // > consumption by fnmatch(3) : '^' } ], // two globstars [ // Use lookahead assertions so that we could match more than one `'/**'` /\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` (_, index, str) => index + 6 < str.length // case: /**/ // > A slash followed by two consecutive asterisks then a slash matches // > zero or more directories. // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. // '/**/' ? '(?:\\/[^\\/]+)*' // case: /** // > A trailing `"/**"` matches everything inside. // #21: everything inside but it should not include the current folder : '\\/.+' ], // intermediate wildcards [ // Never replace escaped '*' // ignore rule '\*' will match the path '*' // 'abc.*/' -> go // 'abc.*' -> skip this rule /(^|[^\\]+)\\\*(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' (_, p1) => `${p1}[^\\/]*` ], [ // unescape, revert step 3 except for back slash // For example, if a user escape a '\\*', // after step 3, the result will be '\\\\\\*' /\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE ], [ // '\\\\' -> '\\' /\\\\/g, () => ESCAPE ], [ // > The range notation, e.g. [a-zA-Z], // > can be used to match one of the characters in a range. // `\` is escaped by step 3 /(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE // '\\[bar]' -> '\\\\[bar\\]' ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === ']' ? endEscape.length % 2 === 0 // A normal case, and it is a range notation // '[bar]' // '[bar\\\\]' ? `[${sanitizeRange(range)}${endEscape}]` // Invalid range notaton // '[bar\\]' -> '[bar\\\\]' : '[]' : '[]' ], // ending [ // 'js' will not match 'js.' // 'ab' will not match 'abc' /(?:[^*])$/, // WTF! // https://git-scm.com/docs/gitignore // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) // which re-fixes #24, #38 // > If there is a separator at the end of the pattern then the pattern // > will only match directories, otherwise the pattern can match both // > files and directories. // 'js*' will not match 'a.js' // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' match => /\/$/.test(match) // foo/ will not match 'foo' ? `${match}$` // foo matches 'foo' and 'foo/' : `${match}(?=$|\\/$)` ], // trailing wildcard [ /(\^|\\\/)?\\\*$/, (_, p1) => { const prefix = p1 // '\^': // '/*' does not match EMPTY // '/*' does not match everything // '\\\/': // 'abc/*' does not match 'abc/' ? `${p1}[^/]+` // 'a*' matches 'a' // 'a*' matches 'aa' : '[^/]*' return `${prefix}(?=$|\\/$)` } ], ] // A simple cache, because an ignore rule only has only one certain meaning const regexCache = Object.create(null) // @param {pattern} const makeRegex = (pattern, negative, ignorecase) => { const r = regexCache[pattern] if (r) { return r } // const replacers = negative // ? NEGATIVE_REPLACERS // : POSITIVE_REPLACERS const source = REPLACERS.reduce( (prev, current) => prev.replace(current[0], current[1].bind(pattern)), pattern ) return regexCache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source) } const isString = subject => typeof subject === 'string' // > A blank line matches no files, so it can serve as a separator for readability. const checkPattern = pattern => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) // > A line starting with # serves as a comment. && pattern.indexOf('#') !== 0 const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) class IgnoreRule { constructor ( origin, pattern, negative, regex ) { this.origin = origin this.pattern = pattern this.negative = negative this.regex = regex } } const createRule = (pattern, ignorecase) => { const origin = pattern let negative = false // > An optional prefix "!" which negates the pattern; if (pattern.indexOf('!') === 0) { negative = true pattern = pattern.substr(1) } pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that // > begin with a literal "!", for example, `"\!important!.txt"`. .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that // > begin with a hash. .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') const regex = makeRegex(pattern, negative, ignorecase) return new IgnoreRule( origin, pattern, negative, regex ) } const throwError = (message, Ctor) => { throw new Ctor(message) } const checkPath = (path, originalPath, doThrow) => { if (!isString(path)) { return doThrow( `path must be a string, but got \`${originalPath}\``, TypeError ) } // We don't know if we should ignore EMPTY, so throw if (!path) { return doThrow(`path must not be empty`, TypeError) } // Check if it is a relative path if (checkPath.isNotRelative(path)) { const r = '`path.relative()`d' return doThrow( `path should be a ${r} string, but got "${originalPath}"`, RangeError ) } return true } const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) checkPath.isNotRelative = isNotRelative checkPath.convert = p => p class Ignore { constructor ({ ignorecase = true } = {}) { this._rules = [] this._ignorecase = ignorecase define(this, KEY_IGNORE, true) this._initCache() } _initCache () { this._ignoreCache = Object.create(null) this._testCache = Object.create(null) } _addPattern (pattern) { // #32 if (pattern && pattern[KEY_IGNORE]) { this._rules = this._rules.concat(pattern._rules) this._added = true return } if (checkPattern(pattern)) { const rule = createRule(pattern, this._ignorecase) this._added = true this._rules.push(rule) } } // @param {Array | string | Ignore} pattern add (pattern) { this._added = false makeArray( isString(pattern) ? splitPattern(pattern) : pattern ).forEach(this._addPattern, this) // Some rules have just added to the ignore, // making the behavior changed. if (this._added) { this._initCache() } return this } // legacy addPattern (pattern) { return this.add(pattern) } // | ignored : unignored // negative | 0:0 | 0:1 | 1:0 | 1:1 // -------- | ------- | ------- | ------- | -------- // 0 | TEST | TEST | SKIP | X // 1 | TESTIF | SKIP | TEST | X // - SKIP: always skip // - TEST: always test // - TESTIF: only test if checkUnignored // - X: that never happen // @param {boolean} whether should check if the path is unignored, // setting `checkUnignored` to `false` could reduce additional // path matching. // @returns {TestResult} true if a file is ignored _testOne (path, checkUnignored) { let ignored = false let unignored = false this._rules.forEach(rule => { const {negative} = rule if ( unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored ) { return } const matched = rule.regex.test(path) if (matched) { ignored = !negative unignored = negative } }) return { ignored, unignored } } // @returns {TestResult} _test (originalPath, cache, checkUnignored, slices) { const path = originalPath // Supports nullable path && checkPath.convert(originalPath) checkPath(path, originalPath, throwError) return this._t(path, cache, checkUnignored, slices) } _t (path, cache, checkUnignored, slices) { if (path in cache) { return cache[path] } if (!slices) { // path/to/a.js // ['path', 'to', 'a.js'] slices = path.split(SLASH) } slices.pop() // If the path has no parent directory, just test it if (!slices.length) { return cache[path] = this._testOne(path, checkUnignored) } const parent = this._t( slices.join(SLASH) + SLASH, cache, checkUnignored, slices ) // If the path contains a parent directory, check the parent first return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of // > that file is excluded. ? parent : this._testOne(path, checkUnignored) } ignores (path) { return this._test(path, this._ignoreCache, false).ignored } createFilter () { return path => !this.ignores(path) } filter (paths) { return makeArray(paths).filter(this.createFilter()) } // @returns {TestResult} test (path) { return this._test(path, this._testCache, true) } } const factory = options => new Ignore(options) const returnFalse = () => false const isPathValid = path => checkPath(path && checkPath.convert(path), path, returnFalse) factory.isPathValid = isPathValid // Fixes typescript factory.default = factory module.exports = factory // Windows // -------------------------------------------------------------- /* istanbul ignore if */ if ( // Detect `process` so that it can run in browsers. typeof process !== 'undefined' && ( process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32' ) ) { /* eslint no-control-regex: "off" */ const makePosix = str => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, '/') checkPath.convert = makePosix // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' // 'd:\\foo' const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i checkPath.isNotRelative = path => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path) } /***/ }), /***/ 70624: /***/ ((module) => { "use strict"; var Mutation = global.MutationObserver || global.WebKitMutationObserver; var scheduleDrain; if (process.browser) { if (Mutation) { var called = 0; var observer = new Mutation(nextTick); var element = global.document.createTextNode(''); observer.observe(element, { characterData: true }); scheduleDrain = function () { element.data = (called = ++called % 2); }; } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { var channel = new global.MessageChannel(); channel.port1.onmessage = nextTick; scheduleDrain = function () { channel.port2.postMessage(0); }; } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { scheduleDrain = function () { // Create a